/**
 * Shop Page Styles
 *
 * Custom styles for WooCommerce Shop Page (archive-product.php).
 * B2B Manufacturing aesthetic - refined, professional, modern.
 *
 * @package Kadence Child Theme
 */

/* ==========================================================================
   CSS VARIABLES
   ========================================================================== */

.shop-page-container {
    --shop-brand-orange: #FF6B00;
    --shop-brand-orange-dark: #E55A00;
    --shop-brand-orange-light: #FF8533;
    --shop-brand-blue: #007BFF;

    --shop-dark: #1a1a2e;
    --shop-dark-light: #252542;
    --shop-gray-900: #111827;
    --shop-gray-700: #374151;
    --shop-gray-500: #6b7280;
    --shop-gray-300: #d1d5db;
    --shop-gray-100: #f3f4f6;
    --shop-white: #ffffff;

    --shop-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shop-font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

    --shop-radius-sm: 4px;
    --shop-radius-md: 8px;
    --shop-radius-lg: 12px;

    --shop-transition-fast: 150ms ease;
    --shop-transition-base: 250ms ease;
    --shop-transition-slow: 400ms ease;
}


/* ==========================================================================
   CONTAINER
   ========================================================================== */

.shop-page-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--shop-font-sans);
}


/* ==========================================================================
   SECTION 1: HERO AREA
   ========================================================================== */

.shop-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    overflow: hidden;
}

/* Gradient Background */
.shop-hero__background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            var(--shop-dark) 0%,
            var(--shop-dark-light) 50%,
            #1e3a5f 100%);
    z-index: 1;
}

/* CSS-Only Geometric Pattern Overlay */
.shop-hero__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image:
        linear-gradient(30deg, var(--shop-white) 12%, transparent 12.5%, transparent 87%, var(--shop-white) 87.5%, var(--shop-white)),
        linear-gradient(150deg, var(--shop-white) 12%, transparent 12.5%, transparent 87%, var(--shop-white) 87.5%, var(--shop-white)),
        linear-gradient(30deg, var(--shop-white) 12%, transparent 12.5%, transparent 87%, var(--shop-white) 87.5%, var(--shop-white)),
        linear-gradient(150deg, var(--shop-white) 12%, transparent 12.5%, transparent 87%, var(--shop-white) 87.5%, var(--shop-white)),
        linear-gradient(60deg, rgba(255, 255, 255, 0.5) 25%, transparent 25.5%, transparent 75%, rgba(255, 255, 255, 0.5) 75%, rgba(255, 255, 255, 0.5)),
        linear-gradient(60deg, rgba(255, 255, 255, 0.5) 25%, transparent 25.5%, transparent 75%, rgba(255, 255, 255, 0.5) 75%, rgba(255, 255, 255, 0.5));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

/* Hero Content */
.shop-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    color: var(--shop-white);
}

/* Badge */
.shop-hero__badge {
    display: inline-block;
    padding: 8px 20px;
    margin-bottom: 24px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--shop-brand-orange);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 50px;
}

/* Title */
.shop-hero__title {
    margin: 0 0 24px;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: var(--shop-brand-orange);
}

.shop-hero__highlight {
    color: var(--shop-brand-orange);
    background: linear-gradient(135deg,
            var(--shop-brand-orange) 0%,
            var(--shop-brand-orange-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Description */
.shop-hero__description {
    margin: 0 0 40px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button - Physical 3D Effect */
.shop-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--shop-white);
    background: linear-gradient(180deg,
            var(--shop-brand-orange-light) 0%,
            var(--shop-brand-orange) 50%,
            var(--shop-brand-orange-dark) 100%);
    border: none;
    border-radius: var(--shop-radius-md);
    box-shadow:
        0 4px 0 0 #b34700,
        0 6px 20px rgba(255, 107, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition:
        transform var(--shop-transition-fast),
        box-shadow var(--shop-transition-fast);
    position: relative;
    top: 0;
}

.shop-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 0 0 #b34700,
        0 10px 30px rgba(255, 107, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    color: var(--shop-white);
}

.shop-hero__cta:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 0 #b34700,
        0 2px 10px rgba(255, 107, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shop-hero__cta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-hero__cta-text {
    white-space: nowrap;
}


/* ==========================================================================
   SECTION 2: PARENT CATEGORIES GRID
   ========================================================================== */

.shop-categories {
    padding: 80px 40px;
    background: var(--shop-gray-100);
}

.shop-categories__header {
    max-width: 1400px;
    margin: 0 auto 48px;
    text-align: center;
}

.shop-categories__title {
    margin: 0 0 12px;
    font-size: 32px;
    font-weight: 700;
    color: var(--shop-gray-900);
    letter-spacing: -0.3px;
}

.shop-categories__subtitle {
    margin: 0;
    font-size: 16px;
    color: var(--shop-gray-500);
    line-height: 1.6;
}

/* Grid Layout - CSS Grid for robustness */
.shop-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Category Card */
.shop-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: none;
    background: var(--shop-white);
    border: 1px solid var(--shop-gray-300);
    border-radius: var(--shop-radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition:
        border-color var(--shop-transition-base),
        transform var(--shop-transition-base);
}

.shop-category-card:hover {
    border-color: var(--shop-brand-orange);
    transform: translateY(-4px);
}

.shop-category-card:active {
    transform: translateY(-2px) scale(0.99);
}

/* Card Image */
.shop-category-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--shop-gray-100);
    overflow: hidden;
}

.shop-category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--shop-transition-slow);
}

.shop-category-card:hover .shop-category-card__image img {
    transform: scale(1.05);
}

/* Placeholder */
.shop-category-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-gray-300);
}

/* Card Content */
.shop-category-card__content {
    padding: 20px;
    flex: 1;
}

.shop-category-card__name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--shop-gray-900);
    transition: color var(--shop-transition-fast);
}

.shop-category-card:hover .shop-category-card__name {
    color: var(--shop-brand-orange);
}

.shop-category-card__count {
    font-size: 13px;
    font-family: var(--shop-font-mono);
    color: var(--shop-gray-500);
    letter-spacing: 0.3px;
}

/* Arrow */
.shop-category-card__arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shop-gray-300);
    background: var(--shop-gray-100);
    border-radius: 50%;
    transition:
        color var(--shop-transition-base),
        background var(--shop-transition-base),
        transform var(--shop-transition-base);
}

.shop-category-card:hover .shop-category-card__arrow {
    color: var(--shop-white);
    background: var(--shop-brand-orange);
    transform: translateX(4px);
}

/* Empty State */
.shop-categories__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--shop-gray-500);
    font-size: 16px;
}


/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet Landscape */
@media (max-width: 1200px) {
    .shop-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Portrait */
@media (max-width: 900px) {
    .shop-hero {
        min-height: 450px;
        padding: 60px 24px;
    }

    .shop-hero__description {
        font-size: 16px;
    }

    .shop-categories {
        padding: 60px 24px;
    }

    .shop-categories__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .shop-hero {
        min-height: 400px;
        padding: 48px 20px;
    }

    .shop-hero__badge {
        padding: 6px 14px;
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .shop-hero__title {
        font-size: 28px;
    }

    .shop-hero__description {
        font-size: 15px;
        margin-bottom: 32px;
    }

    .shop-hero__cta {
        padding: 16px 28px;
        font-size: 12px;
        letter-spacing: 1px;
    }

    .shop-categories {
        padding: 48px 16px;
    }

    .shop-categories__title {
        font-size: 24px;
    }

    .shop-categories__subtitle {
        font-size: 14px;
    }

    .shop-categories__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .shop-category-card__content {
        padding: 16px;
    }

    .shop-category-card__name {
        font-size: 16px;
    }

    .shop-category-card__arrow {
        bottom: 16px;
        right: 16px;
    }
}