/* =========================================================
   ELDER LABORATORIES — PRODUCTS + CATEGORY LUXE LAYER
   Load AFTER product.css on BOTH pages. Markup is unchanged.
   Palette matches About: navy #0a1b33 / brand #234e86 / gold #c9a24b
   ========================================================= */

:root {
    --pl-navy: #0a1b33;
    --pl-brand: #234e86;
    --pl-gold: #c9a24b;
    --pl-gold-soft: #e8cf8e;
    --pl-canvas: #f7f9fd;
    --pl-ease: cubic-bezier(.2, .7, .2, 1);
}

/* =========================================================
   HERO — deep navy, white type, gold accents
   ========================================================= */
.category-hero {
    min-height: 460px;
    background: #072a4d;
}

/* keep the photo, but tint it navy instead of white */
.category-hero-background::after {
    background: linear-gradient(95deg,
        rgba(6,28,56,.96) 0%, rgba(10,45,86,.88) 34%,
        rgba(13,79,139,.50) 68%, rgba(13,79,139,.20) 100%);
}

/* molecule illustration on the right */
.category-hero::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 50%;
    background: url("/images/about/about-molecule.svg") right 4% center / contain no-repeat;
    opacity: .85;
    z-index: 2;
    pointer-events: none;
    animation: plFloat 9s ease-in-out infinite;
}
@keyframes plFloat { 50% { transform: translateY(-12px); } }

.category-hero-content {
    padding-top: 110px;
    padding-bottom: 150px;
}

.category-hero-content span {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--pl-gold-soft);
    letter-spacing: 3px;
}
.category-hero-content span::before {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--pl-gold);
}

.category-hero-content h1 {
    color: #fff;
    font-size: clamp(40px, 4.6vw, 62px);
    letter-spacing: -.5px;
}
/* hand-drawn gold underline, draws once on load */
.category-hero-content h1::after {
    content: "";
    display: block;
    width: 190px;
    height: 14px;
    margin-top: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14'%3E%3Cpath d='M3 9 C35 2 62 12 95 6 S160 3 187 8' fill='none' stroke='%23c9a24b' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat / 100% 100%;
    animation: plDraw 1.2s .5s var(--pl-ease) both;
}
@keyframes plDraw {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

.category-hero-content p {
    color: rgba(255,255,255,.86);
    font-size: 18px;
}

/* wave: fill matches the page canvas, single fine gold line */
.category-wave-fill  { fill: var(--pl-canvas); }
.category-wave-blue  {
    stroke: rgba(201,162,75,.9);
    stroke-width: 2px;
    opacity: 1;
    vector-effect: non-scaling-stroke;
}
.category-wave-white { display: none; }

/* =========================================================
   LISTING CANVAS
   ========================================================= */
.product-category-page { background: var(--pl-canvas); }

.category-products-section {
    background-color: var(--pl-canvas);
    background-image: radial-gradient(rgba(35,78,134,.08) 1px, transparent 1px);
    background-size: 26px 26px;
    padding: 50px 0 120px;
}

.category-products-header {
    padding-bottom: 26px;
    margin-bottom: 44px;
    border-bottom: 1px solid rgba(35,78,134,.12);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--pl-brand);
    letter-spacing: 3px;
}
.section-label::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--pl-gold);
}

.category-products-header h2 {
    color: var(--pl-navy);
    font-size: clamp(32px, 3.4vw, 44px);
    line-height: 1.1;
}

/* =========================================================
   SEARCH
   ========================================================= */
.category-search {
    height: 54px;
    border: 1px solid rgba(35,78,134,.14);
    box-shadow: 0 12px 26px -16px rgba(10,27,51,.35);
}
.category-search:focus-within {
    border-color: var(--pl-gold);
    box-shadow: 0 0 0 4px rgba(201,162,75,.16), 0 14px 30px -16px rgba(10,27,51,.4);
}
.category-search i { color: var(--pl-brand); }
.category-search input { color: var(--pl-navy); }

/* =========================================================
   PRODUCT CARDS
   ========================================================= */
.category-product-grid { gap: 32px; }

.category-product-card {
    position: relative;
    border-radius: 20px;
    border: 1px solid rgba(35,78,134,.10);
    box-shadow: 0 20px 44px -28px rgba(10,27,51,.35);
    /* one orchestrated entrance; works for AJAX-inserted cards too */
    animation: plRise .8s var(--pl-ease) both;
}
.category-product-card:nth-child(3n+2) { animation-delay: .08s; }
.category-product-card:nth-child(3n+3) { animation-delay: .16s; }
@keyframes plRise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

/* gold rule that grows in on hover */
.category-product-card::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pl-gold), var(--pl-gold-soft));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--pl-ease);
}
.category-product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(201,162,75,.55);
    box-shadow: 0 32px 58px -26px rgba(10,27,51,.42);
}
.category-product-card:hover::after { transform: scaleX(1); }

/* image stage */
.category-product-image {
    background:
        radial-gradient(260px 200px at 50% 45%, #ffffff 0%, #eef4fb 100%);
    border-bottom: 1px solid rgba(35,78,134,.08);
}
.category-product-image img {
    filter: drop-shadow(0 18px 18px rgba(10,27,51,.16));
}

/* content */
.category-product-content { padding: 24px 26px 28px; }

.category-product-content .product-category {
    padding: 5px 12px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(201,162,75,.12);
    border: 1px solid rgba(201,162,75,.45);
    color: #8a6a1f;
    font-size: 10.5px;
    letter-spacing: 1.4px;
}
.category-product-content h3 {
    color: var(--pl-navy);
    font-size: 25px;
}
.category-product-content p {
    color: #5b7088;
    font-size: 14.5px;
}

/* Read More — navy pill, gold on hover */
.category-product-content a {
    min-height: 42px;
    padding: 10px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #147bc1, var(--pl-brand));
    box-shadow: 0 12px 24px -12px rgba(35,78,134,.6);
    letter-spacing: .8px;
}
.category-product-content a:hover {
    background: linear-gradient(135deg, var(--pl-gold), #b98a2c);
    color: var(--pl-navy);
    box-shadow: 0 14px 26px -12px rgba(185,138,44,.6);
}

/* empty / no results */
.no-products {
    color: var(--pl-brand);
    font-size: 16px;
    border: 1px dashed rgba(201,162,75,.6);
    border-radius: 20px;
    background: #fff;
}

/* keyboard focus */
.category-product-content a:focus-visible,
.category-search .search-button:focus-visible {
    outline: 3px solid var(--pl-gold);
    outline-offset: 3px;
}

/* =========================================================
   LOGO — keep it inside the white header on these pages
   ========================================================= */
body:has(.category-hero) .brand-area {
    height: 85px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
body:has(.category-hero) .brand-logo {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    height: 100% !important;
}
body:has(.category-hero) .brand-logo-image {
    position: static !important;
    width: auto !important;
    height: 68px !important;
    max-width: 190px !important;
    object-fit: contain !important;
    transform: none !important;
}
body:has(.category-hero) .brand-tagline { display: none !important; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
    .category-hero::after { width: 70%; opacity: .4; }
    .category-products-header { gap: 20px; }
    .category-product-card:nth-child(n) { animation-delay: 0s; }
}

@media (max-width: 575px) {
    .category-hero { min-height: 380px; }
    .category-hero::after { width: 100%; opacity: .22; background-position: center; }
    .category-hero-content { padding-top: 80px; padding-bottom: 120px; }
    .category-hero-content h1::after { width: 140px; }
    .category-product-content { padding: 20px 20px 24px; }
    body:has(.category-hero) .brand-logo-image { height: 56px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .category-hero::after,
    .category-hero-content h1::after,
    .category-product-card { animation: none !important; }
    .category-product-card,
    .category-product-card::after { transition: none; }
}
