/* ==========================================================================
   VELIYATH GOLD & DIAMONDS
   CATEGORY / COLLECTIONS PAGE
   Luxury Editorial Jewellery Style (Refined Fluid Scale & Fixed Contrast)
   ========================================================================== */


/* ==========================================================================
   PAGE BASE
   ========================================================================== */

.category-page {
    background: var(--color-background, #ffffff);
    color: var(--color-text, #25211f);
    overflow: hidden;
}


/* ==========================================================================
   SHARED EYEBROW
   ========================================================================== */

.category-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    color: var(--color-gold, #b08d3c);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(10px, 0.8vw, 11.5px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.24em;
    line-height: 1.4;
    text-transform: uppercase;
}

/* Editorial line dividers flanking the eyebrow */
.category-section-eyebrow::before,
.category-section-eyebrow::after {
    content: "";
    width: 32px;
    height: 1px;
    background: currentColor;
    opacity: 0.75;
}


/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.category-hero {
    position: relative;
    padding: clamp(85px, 8.5vw, 125px) 0 clamp(75px, 7.5vw, 105px);
    background:
        radial-gradient(circle at 82% 24%, rgba(216, 184, 117, 0.14) 0%, transparent 36%),
        radial-gradient(circle at 18% 78%, rgba(125, 24, 54, 0.24) 0%, transparent 48%),
        linear-gradient(
            135deg,
            var(--color-maroon-dark, #2f0c19) 0%,
            var(--color-maroon, #421223) 55%,
            #55152b 100%
        );
    color: var(--color-text-white, #ffffff);
    overflow: hidden;
    isolation: isolate;
}

/* Editorial ambient halo rings */
.category-hero::before {
    content: "";
    position: absolute;
    width: 440px;
    height: 440px;
    top: -220px;
    right: -80px;
    border: 1px solid rgba(216, 184, 117, 0.16);
    border-radius: 50%;
    pointer-events: none;
}

.category-hero::after {
    content: "";
    position: absolute;
    width: 640px;
    height: 640px;
    bottom: -500px;
    left: -240px;
    border: 1px solid rgba(216, 184, 117, 0.10);
    border-radius: 50%;
    pointer-events: none;
}

.category-hero .container {
    position: relative;
    z-index: 2;
}

.category-hero-content {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.category-hero-content .category-section-eyebrow {
    margin-bottom: 22px;
    color: var(--color-gold-light, #c7a85d);
}

.category-hero-content h1 {
    margin: 0;
    color: var(--color-text-white, #ffffff);
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(38px, 4.8vw, 64px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.category-hero-content h1 span {
    color: var(--color-gold-light, #c7a85d);
    font-style: italic;
    font-weight: 400;
}

.category-hero-content p {
    max-width: 670px;
    margin: 22px auto 0;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(15px, 1.1vw, 17px);
    font-weight: 400;
    line-height: 1.82;
    letter-spacing: 0.01em;
    text-wrap: pretty;
}


/* ==========================================================================
   COLLECTION PRODUCTS / CATEGORY AREA
   ========================================================================== */

.category-products {
    padding: clamp(80px, 8vw, 120px) 0 clamp(90px, 9vw, 130px);
    background: var(--color-background-soft, #faf9f7);
}

.category-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: clamp(40px, 4vw, 56px);
    padding-bottom: 26px;
    border-bottom: 1px solid var(--color-border, #e4dfd8);
}

.category-header-content {
    max-width: 740px;
}

.category-header-content .category-section-eyebrow {
    margin-bottom: 14px;
}

.category-header-content h2 {
    margin: 0;
    color: var(--color-text-dark, #181514);
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(30px, 3.4vw, 45px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.category-header-content h2 span {
    color: var(--color-primary, #7d1836);
    font-style: italic;
    font-weight: 400;
}

.category-header-content p {
    max-width: 640px;
    margin: 14px 0 0;
    color: var(--color-text-muted, #6f6863);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(14.5px, 1.05vw, 16px);
    line-height: 1.78;
    text-wrap: pretty;
}

/* Collection Count Badge */
.category-product-count {
    flex-shrink: 0;
    padding: 11px 20px;
    border: 1px solid var(--color-border, #e4dfd8);
    border-radius: var(--radius-sm, 4px);
    background: var(--color-background, #ffffff);
    color: var(--color-primary, #7d1836);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(11px, 0.8vw, 12px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: var(--shadow-xs, 0 1px 4px rgba(25, 18, 14, 0.035));
}


/* ==========================================================================
   CATEGORY GRID
   ========================================================================== */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(24px, 2.6vw, 36px);
}


/* ==========================================================================
   CATEGORY CARD
   ========================================================================== */

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--color-background, #ffffff);
    border: 1px solid var(--color-border, #e4dfd8);
    border-radius: var(--radius-sm, 4px);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(25, 18, 14, 0.04);
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease;
}

.category-card:hover {
    transform: translateY(-7px);
    border-color: rgba(176, 141, 60, 0.55);
    box-shadow:
        0 14px 40px rgba(25, 18, 14, 0.09),
        0 2px 10px rgba(176, 141, 60, 0.12);
}


/* ==========================================================================
   CATEGORY CARD IMAGE
   ========================================================================== */

.category-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--color-background-light, #f7f4ef);
    overflow: hidden;
}

.category-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 65%,
        rgba(35, 7, 18, 0.16) 100%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-card-image::after {
    opacity: 0.6;
}

.category-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-card:hover .category-card-image img {
    transform: scale(1.06);
}


/* ==========================================================================
   IMAGE PLACEHOLDER
   ========================================================================== */

.category-card-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 280px;
    background:
        radial-gradient(
            circle at center,
            rgba(176, 141, 60, 0.12),
            transparent 65%
        ),
        var(--color-background-light, #f7f4ef);
    color: var(--color-primary, #7d1836);
}

.category-card-placeholder span {
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(26px, 2.2vw, 32px);
    font-weight: 500;
    letter-spacing: 0.08em;
}

.category-card-placeholder small {
    margin-top: 8px;
    color: var(--color-gold-dark, #92742c);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(9px, 0.75vw, 10.5px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.24em;
    text-transform: uppercase;
}


/* ==========================================================================
   CATEGORY CONTENT
   ========================================================================== */

.category-card-content {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px 28px 28px;
}

.category-card-number {
    display: block;
    margin-bottom: 10px;
    color: var(--color-gold-dark, #92742c);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(10.5px, 0.75vw, 11.5px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.2em;
}

.category-card-content h3 {
    margin: 0;
    color: var(--color-text-dark, #181514);
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(21px, 1.6vw, 25px);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.25;
    transition: color 0.25s ease;
}

.category-card:hover .category-card-content h3 {
    color: var(--color-primary, #7d1836);
}

.category-card-content p {
    margin: 10px 0 20px;
    color: var(--color-text-muted, #6f6863);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(13.5px, 0.95vw, 15px);
    font-weight: 400;
    line-height: 1.72;
    text-wrap: pretty;
}

/* Card Link */
.category-card-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--color-primary, #7d1836);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(11px, 0.8vw, 12.5px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.category-card-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 26px;
    height: 1px;
    background: var(--color-gold, #b08d3c);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .category-card-link::after {
    width: 100%;
}

.category-card-link > span {
    display: inline-block;
    font-size: 15px;
    color: var(--color-gold-dark, #92742c);
    transition: transform var(--transition-fast, 0.15s ease);
}

.category-card:hover .category-card-link > span {
    transform: translateX(4px);
}


/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.category-empty {
    padding: 85px 30px;
    border: 1px solid var(--color-border, #e4dfd8);
    background: var(--color-background, #ffffff);
    border-radius: var(--radius-sm, 4px);
}

.category-empty-content {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.category-empty-content h2 {
    margin: 0;
    color: var(--color-text-dark, #181514);
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 500;
}

.category-empty-content p {
    margin: 15px auto 28px;
    max-width: 520px;
    color: var(--color-text-muted, #6f6863);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(14px, 1vw, 15.5px);
    line-height: 1.75;
}


/* ==========================================================================
   CTA SECTION (FIXED HIGH-CONTRAST BUTTONS & ATMOSPHERIC GLOW)
   ========================================================================== */

.category-cta {
    position: relative;
    padding: clamp(80px, 8vw, 115px) clamp(24px, 4vw, 50px);
    background:
        radial-gradient(circle at 18% 22%, rgba(216, 184, 117, 0.14) 0%, transparent 36%),
        radial-gradient(circle at 82% 80%, rgba(125, 24, 54, 0.28) 0%, transparent 44%),
        linear-gradient(
            135deg,
            var(--color-maroon-dark, #2f0c19) 0%,
            var(--color-maroon, #421223) 55%,
            #1e050f 100%
        );
    color: var(--color-text-white, #ffffff);
    border-top: 1px solid rgba(216, 184, 117, 0.32);
    overflow: hidden;
    text-align: center;
}

.category-cta::before {
    content: "";
    position: absolute;
    width: 560px;
    height: 560px;
    top: -390px;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(216, 184, 117, 0.14);
    border-radius: 50%;
    pointer-events: none;
}

.category-cta-inner {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.category-cta-inner .category-section-eyebrow {
    margin-bottom: 20px;
    color: var(--color-gold-light, #c7a85d);
}

.category-cta-inner h2 {
    margin: 0;
    color: var(--color-text-white, #ffffff);
    font-family: var(--font-heading, "Playfair Display", Georgia, serif);
    font-size: clamp(34px, 4.2vw, 52px);
    font-weight: 500;
    line-height: 1.14;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.category-cta-inner h2 span {
    color: var(--color-gold-light, #c7a85d);
    font-style: italic;
    font-weight: 400;
}

.category-cta-inner p {
    max-width: 640px;
    margin: 18px auto 36px;
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(14.5px, 1.05vw, 16.5px);
    line-height: 1.82;
    text-wrap: pretty;
}

/* Actions Container */
.category-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Base CTA Button */
.category-cta-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 185px;
    min-height: 48px;
    padding: 0 28px;
    border-radius: var(--radius-sm, 4px);
    font-family: var(--font-primary, "Inter", sans-serif);
    font-size: clamp(11px, 0.8vw, 12.5px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.category-cta-actions .btn:hover {
    transform: translateY(-2px);
}

/* Primary Button: Solid Crimson with Gold Accent */
.category-cta-actions .btn-primary,
.category-cta-actions .btn:first-child {
    background: var(--color-primary, #7d1836);
    border: 1px solid rgba(216, 184, 117, 0.45);
    color: var(--color-text-white, #ffffff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.category-cta-actions .btn-primary:hover,
.category-cta-actions .btn:first-child:hover {
    background: var(--color-primary-dark, #64122b);
    border-color: var(--color-gold-light, #c7a85d);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

/* 
   FIXED SECONDARY BUTTON (High-contrast Champagne Glassmorphic Border)
   Targets both explicit class and the second child directly
*/
.category-cta-actions .btn-secondary,
.category-cta-actions .btn-outline,
.category-cta-actions .btn:nth-child(2) {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(216, 184, 117, 0.65);
    color: #ffffff !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.category-cta-actions .btn-secondary:hover,
.category-cta-actions .btn-outline:hover,
.category-cta-actions .btn:nth-child(2):hover {
    background: rgba(216, 184, 117, 0.16);
    border-color: var(--color-gold-light, #c7a85d);
    color: var(--color-gold-light, #c7a85d) !important;
    box-shadow: 0 8px 25px rgba(216, 184, 117, 0.2);
}


/* ==========================================================================
   RESPONSIVE BREAKPOINTS (CONSOLIDATED)
   ========================================================================== */

@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 34px;
    }

    .category-section-eyebrow::before,
    .category-section-eyebrow::after {
        width: 22px;
    }

    .category-product-count {
        margin-top: 10px;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .category-card-content {
        padding: 22px 24px 26px;
    }

    .category-cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .category-cta-actions .btn {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .category-card-image {
        aspect-ratio: 1 / 0.92;
    }

    .category-card-content {
        padding: 20px 20px 24px;
    }

    .category-cta {
        padding: 60px 20px;
    }
}


/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

.category-card:focus-visible,
.category-cta-actions .btn:focus-visible {
    outline: 2px solid var(--color-gold, #b08d3c);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .category-card,
    .category-card-image img,
    .category-card-link > span,
    .category-card-link::after,
    .category-cta-actions .btn {
        transition: none !important;
    }

    .category-card:hover {
        transform: none !important;
    }

    .category-card:hover .category-card-image img {
        transform: none !important;
    }
}