/* ============================================
   ILORA - Category Page Styles
   Swiss Premium Standard
   ============================================ */

/* ─────────────────────────────────────────
   CATEGORY HERO — Swiss Premium Standard
   Sexy & Professional Look
   ───────────────────────────────────────── */

.category-hero {
    position: relative;
    padding: var(--space-24) 0 var(--space-20);
    text-align: center;
    /* Immersive Banner Background */
    background: linear-gradient(135deg,
            var(--category-color, var(--color-royal)) 0%,
            color-mix(in srgb, var(--category-color, var(--color-royal)), black 20%) 100%);
    overflow: hidden;
    color: var(--color-white);
}

/* Premium Accent Frame */
.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--category-color, var(--color-royal)) 20%,
            var(--category-color, var(--color-royal)) 80%,
            transparent 100%);
}

/* Background Texture/Noise (Optional for premium feel) */
.category-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* Decorative Accent Frame */
.hero-accent-frame {
    position: absolute;
    top: var(--space-8);
    left: var(--space-8);
    right: var(--space-8);
    bottom: var(--space-8);
    border: 1px solid rgba(46, 26, 71, 0.06);
    border-radius: var(--radius-2xl);
    pointer-events: none;
    opacity: 0;
    animation: frameReveal 1.2s var(--ease-premium) 0.5s forwards;
}

@keyframes frameReveal {
    to {
        opacity: 1;
    }
}

/* Premium Hero Content Wrapper */
.category-hero--premium .container {
    position: relative;
    z-index: 1;
}

.category-hero--premium .reveal-up,
.category-hero--premium .reveal-blur {
    /* Removed Glassmorphism Card Properties */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: var(--space-10) var(--space-8);
    max-width: 800px;
    margin: 0 auto;
}

/* Hero Overline with Brand Dot */
.hero-overline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-5);
}

.hero-overline-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--color-white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(46, 26, 71, 0.15);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(46, 26, 71, 0.08);
        transform: scale(1.1);
    }
}

/* Legacy Overline Support */
.category-overline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.category-overline .category-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background-color: var(--category-color, var(--color-royal));
    animation: dotPulse 2s ease-in-out infinite;
}

/* Hero Title */
.category-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, var(--text-6xl));
    font-weight: var(--font-regular);
    color: var(--color-white);
    margin-bottom: var(--space-6);
    letter-spacing: var(--tracking-tight);
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Promise Tagline — Italic Serif Benefit */
.hero-promise {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-style: italic;
    font-weight: var(--font-regular);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-2);
    letter-spacing: 0.01em;
}

/* Hero Divider — Gradient Line (White) */
.hero-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.8) 50%,
            transparent 100%);
    margin: var(--space-6) auto;
    opacity: 0.8;
}

/* Description */
.category-description {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: var(--leading-relaxed);
}

/* Mobile Optimizations */
@media (max-width: 639px) {
    .category-hero {
        padding: var(--space-16) 0 var(--space-12);
    }

    .category-hero--premium .reveal-up,
    .category-hero--premium .reveal-blur {
        padding: var(--space-6) var(--space-4);
        margin: 0 var(--space-2);
        border-radius: var(--radius-xl);
    }

    .hero-accent-frame {
        top: var(--space-4);
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }

    .hero-promise {
        font-size: var(--text-lg);
    }
}

/* ─────────────────────────────────────────
   BREADCRUMB
   ───────────────────────────────────────── */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.breadcrumb-link {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-base);
}

.breadcrumb-link:hover {
    color: var(--color-royal);
}

.breadcrumb-separator {
    color: var(--color-text-muted);
}

.breadcrumb-current {
    color: var(--color-charcoal);
    font-weight: var(--font-medium);
}

/* ─────────────────────────────────────────
   CATEGORY PRODUCTS SECTION
   ───────────────────────────────────────── */

.category-products {
    padding: var(--space-16) 0;
    background-color: var(--color-white);
}

/* ─────────────────────────────────────────
   PRODUCTS GRID - Swiss Premium Layout
   ───────────────────────────────────────── */

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-10);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ─────────────────────────────────────────
   PRODUCT CARD - Editorial BEM Structure
   Swiss Premium Standard
   ───────────────────────────────────────── */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--transition-slow) var(--ease-premium),
        box-shadow var(--transition-slow) var(--ease-premium);
    box-shadow:
        0 4px 20px rgba(46, 26, 71, 0.06),
        0 1px 4px rgba(46, 26, 71, 0.04);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 20px 60px rgba(46, 26, 71, 0.12),
        0 8px 24px rgba(46, 26, 71, 0.08);
}

/* Featured variant */
.product-card--featured {
    box-shadow:
        0 8px 32px rgba(46, 26, 71, 0.1),
        0 2px 8px rgba(46, 26, 71, 0.06);
}

/* Product Image */
.product-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--color-off-white) 0%, #F5F5F5 100%);
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slower) var(--ease-premium);
    will-change: transform;
}

.product-card:hover .product-card__image img {
    transform: scale(1.06);
}

/* Category Ribbon */
.product-card__ribbon {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: var(--category-color, var(--color-royal));
    color: var(--color-white);
    font-family: var(--font-accent);
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Product Content */
.product-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: var(--space-6);
}

.product-card__tagline {
    font-family: var(--font-accent);
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--category-color, var(--color-royal));
    margin-bottom: var(--space-2);
}

.product-card__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--color-charcoal);
    margin-bottom: var(--space-3);
    line-height: var(--leading-tight);
}

.product-card__benefit {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

/* Key Ingredients Display */
.product-card__ingredients {
    font-family: var(--font-accent);
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    padding: var(--space-3);
    background: var(--color-off-white);
    border-radius: var(--radius-md);
    line-height: var(--leading-relaxed);
}

.product-card__ingredients strong {
    color: var(--color-charcoal);
    font-weight: var(--font-medium);
}

/* Product Footer */
.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-light);
    margin-top: auto;
}

.product-card__price {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--color-charcoal);
    letter-spacing: -0.01em;
}

.product-card__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target-min);
    height: var(--touch-target-min);
    border-radius: var(--radius-full);
    background: var(--color-off-white);
    color: var(--color-royal);
    transition:
        background var(--transition-base),
        color var(--transition-base),
        transform var(--transition-base);
}

.product-card__link:hover {
    background: var(--color-royal);
    color: var(--color-white);
    transform: translateX(4px);
}

/* Product Card Separator - Matches Category Ribbon */
.product-card__separator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--category-color, var(--color-royal)) 15%,
            var(--category-color, var(--color-royal)) 85%,
            transparent 100%);
    transform: scaleX(0.6);
    transition: transform 0.5s var(--ease-premium);
    z-index: 2;
}

.product-card:hover .product-card__separator {
    transform: scaleX(1);
}

/* ─────────────────────────────────────────
   FEATURED PRODUCT - Tablet Layout
   ───────────────────────────────────────── */

@media (min-width: 640px) {
    .product-card--featured {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1.2fr 1fr;
    }

    .product-card--featured .product-card__image {
        aspect-ratio: 3/4;
    }

    .product-card--featured .product-card__content {
        padding: var(--space-8);
        justify-content: center;
    }

    .product-card--featured .product-card__title {
        font-size: var(--text-2xl);
    }

    .product-card--featured .product-card__benefit {
        font-size: var(--text-base);
    }
}

/* Desktop: Featured card becomes normal */
@media (min-width: 1024px) {
    .product-card--featured {
        grid-column: auto;
        display: flex;
        flex-direction: column;
    }

    .product-card--featured .product-card__image {
        aspect-ratio: 4/5;
    }

    .product-card--featured .product-card__content {
        padding: var(--space-6);
    }

    .product-card--featured .product-card__title {
        font-size: var(--text-xl);
    }
}

/* ─────────────────────────────────────────
   BACK TO ALL LINK
   ───────────────────────────────────────── */

.back-to-all {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-royal);
    text-decoration: none;
    margin-top: var(--space-12);
    transition: opacity var(--transition-base);
}

.back-to-all:hover {
    opacity: 0.7;
}

.back-to-all svg {
    width: 16px;
    height: 16px;
}

/* ─────────────────────────────────────────
   CATEGORY OVERVIEW CARDS — Premium Edition
   (for /kolekcije/index.html)
   Sexy & Professional Look
   ───────────────────────────────────────── */

.category-card {
    position: relative;
    display: block;
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.5s var(--ease-premium),
        box-shadow 0.5s var(--ease-premium),
        border-color 0.3s ease;
    box-shadow:
        0 4px 20px rgba(46, 26, 71, 0.06),
        0 1px 4px rgba(46, 26, 71, 0.04);
    border: 1px solid transparent;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 24px 64px rgba(46, 26, 71, 0.14),
        0 12px 32px rgba(46, 26, 71, 0.1),
        0 0 0 1px rgba(46, 26, 71, 0.05);
    border-color: rgba(46, 26, 71, 0.08);
}

/* Category Color Glow on Hover */
.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-2xl);
    opacity: 0;
    transition: opacity 0.5s var(--ease-premium);
    pointer-events: none;
    box-shadow:
        inset 0 0 0 2px var(--category-color, var(--color-royal)),
        0 0 40px rgba(46, 26, 71, 0.1);
}

.category-card:hover::after {
    opacity: 0.15;
}

/* Image Container with Premium Overlay */
.category-card__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-off-white) 0%, #F0F0F0 100%);
}

/* Premium Gradient Overlay */
.category-card__image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            transparent 0%,
            transparent 40%,
            rgba(46, 26, 71, 0.03) 70%,
            rgba(46, 26, 71, 0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card:hover .category-card__image::before {
    opacity: 1;
}

.category-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s var(--ease-premium);
    will-change: transform;
}

.category-card:hover .category-card__image img {
    transform: scale(1.08);
}

/* Premium Badge with Glassmorphism */
.category-card__badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    font-family: var(--font-accent);
    font-size: 10px;
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--color-charcoal);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 2;
}

/* Animated Ribbon with Gradient */
.category-card__ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--category-color, var(--color-royal)) 15%,
            var(--category-color, var(--color-royal)) 85%,
            transparent 100%);
    transform: scaleX(0.6);
    transition: transform 0.5s var(--ease-premium);
}

.category-card:hover .category-card__ribbon {
    transform: scaleX(1);
}

/* Content Area with Premium Padding */
.category-card__content {
    padding: var(--space-6) var(--space-6) var(--space-5);
    background: var(--color-white);
    position: relative;
}

/* Premium Name Typography */
.category-card__name {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    color: var(--color-charcoal);
    margin-bottom: var(--space-2);
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.category-card:hover .category-card__name {
    color: var(--category-color, var(--color-royal));
}

/* Refined Description */
.category-card__description {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

/* Premium CTA Link with Shimmer */
.category-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-accent);
    font-size: 11px;
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--category-color, var(--color-royal));
    transition:
        gap 0.3s var(--ease-premium),
        letter-spacing 0.3s ease;
    position: relative;
}

/* Shimmer Effect on Hover */
.category-card__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--category-color, var(--color-royal)) 50%,
            transparent 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-premium);
}

.category-card:hover .category-card__link {
    gap: var(--space-3);
    letter-spacing: var(--tracking-widest);
}

.category-card:hover .category-card__link::after {
    transform: scaleX(1);
}

.category-card__link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s var(--ease-premium);
}

.category-card:hover .category-card__link svg {
    transform: translateX(4px);
}

/* ─────────────────────────────────────────
   MOBILE HORIZONTAL SCROLL CAROUSEL
   ───────────────────────────────────────── */

@media (max-width: 639px) {
    .products-grid--carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--space-4);
        padding: var(--space-2) var(--space-4);
        margin: 0 calc(-1 * var(--space-4));
        /* Align items to stretch for equal height */
        align-items: stretch;
    }

    .products-grid--carousel::-webkit-scrollbar {
        display: none;
    }

    /* ─── Category Cards ─── */
    .products-grid--carousel .category-card {
        flex: 0 0 280px;
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
    }

    .products-grid--carousel .category-card__image {
        aspect-ratio: 4/3 !important;
        flex-shrink: 0;
    }

    .products-grid--carousel .category-card__content {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* ─── Product Cards ─── */
    .products-grid--carousel .product-card,
    .products-grid--carousel .product-card--featured {
        flex: 0 0 280px;
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
    }

    /* Fixed image height for consistency */
    .products-grid--carousel .product-card__image,
    .products-grid--carousel .product-card--featured .product-card__image {
        aspect-ratio: 4/5 !important;
        height: 220px !important;
        flex-shrink: 0;
    }

    .products-grid--carousel .product-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Content area fills remaining space */
    .products-grid--carousel .product-card__content {
        flex: 1;
        display: flex;
        flex-direction: column;
        padding: var(--space-4);
    }

    /* Footer stays at bottom */
    .products-grid--carousel .product-card__footer {
        margin-top: auto;
    }

    /* Compact text for carousel */
    .products-grid--carousel .product-card__benefit {
        font-size: var(--text-xs);
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .products-grid--carousel .product-card__ingredients {
        font-size: 10px;
        padding: var(--space-2);
        margin-bottom: var(--space-2);
    }
}