/* ============================================================
   ChemSmog homepage refinements — pass 3 (Figma exact)
   ============================================================ */

/* ---------- HERO SLIDER (fixed height, absolute slides) ---------- */
.cs-hero {
    position: relative;
    overflow: hidden;
    height: 620px !important;
    min-height: 0 !important;
    background: var(--cs-white) !important;
}
.cs-hero__slide {
    position: absolute !important;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease;
    z-index: 0;
}
.cs-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}
.cs-hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.cs-hero__content {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 64px !important;
}

/* Hero arrows — Figma: white rounded square w/ blue border + blue chevron */
.cs-hero__nav {
    position: absolute;
    bottom: 40px;
    right: 48px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cs-hero__arrow {
    width: 38px;
    height: 38px;
    border: 1px solid var(--cs-blue) !important;
    background: rgba(255,255,255,0.85) !important;
    backdrop-filter: blur(4px);
    border-radius: 6px !important;
    color: var(--cs-blue) !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, transform .15s ease;
}
.cs-hero__arrow:hover {
    background: var(--cs-blue) !important;
    color: var(--cs-white) !important;
    transform: translateY(-1px);
}

/* ---------- CATEGORY CARDS — shorter, less gap ---------- */
.cs-cat-card {
    aspect-ratio: auto !important;
    height: 330px !important;
    min-height: 0 !important;
    padding: 22px 14px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0 !important;
}
.cs-cat-card__title {
    margin: 0 !important;
    flex: 0 0 auto !important;
    min-height: 52px !important;       /* room for up to 3 lines so images align */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}
.cs-cat-card__img {
    margin-top: auto !important;       /* pin image to bottom */
    aspect-ratio: 1/1 !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

/* ---------- FEATURED — head with nav arrows ---------- */
.cs-featured__head {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cs-featured__head .cs-section__title {
    margin: 0 auto 40px !important;
}
.cs-featured__nav {
    position: absolute;
    right: 24px;
    top: 0;
    display: flex;
    gap: 10px;
}
.cs-featured__arrow {
    width: 38px;
    height: 38px;
    border: 1px solid var(--cs-blue);
    background: var(--cs-white);
    border-radius: 6px;
    color: var(--cs-blue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}
.cs-featured__arrow:hover {
    background: var(--cs-blue);
    color: var(--cs-white);
}

/* Featured grid: horizontal scroll track */
.cs-featured__grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc((100% - 24px*2 - 20px*4) / 5) !important;
    grid-template-columns: none !important;
    gap: 20px !important;
    max-width: 1440px;
    margin: 0 auto !important;
    padding: 4px 24px !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.cs-featured__grid::-webkit-scrollbar { display: none; }
.cs-featured__grid .cs-product-card {
    scroll-snap-align: start;
}

/* ---------- FEATURED PRODUCT CARD — exact Figma colors ---------- */
.cs-product-card__body {
    align-items: center !important;
    text-align: center !important;
    padding: 16px 14px 18px !important;
    gap: 6px !important;
}
.cs-product-card__vendor {
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: var(--cs-green) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}
.cs-product-card__name {
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    color: var(--cs-blue) !important;
    text-align: center !important;
    min-height: 0 !important;
    margin: 2px 0 !important;
}
.cs-product-card__pricerow {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}
.cs-product-card__price {
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 500 !important;
    font-size: 20px !important;
    color: var(--cs-blue) !important;
}
.cs-product-card__per {
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    color: #c4c4c4 !important;
}
.cs-product-card__co2 {
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: var(--cs-green) !important;
    margin-top: 6px !important;
}
.cs-product-card__co2 .leaf { color: var(--cs-green) !important; }

/* ---------- NEWS — exact Figma colors ---------- */
.cs-news__meta {
    color: var(--cs-green) !important;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
}
.cs-news-featured__title,
.cs-news-item__title {
    color: var(--cs-blue) !important;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 500 !important;
}
.cs-news-featured__title { font-size: 24px !important; }
.cs-news-item__title { font-size: 18px !important; }
.cs-news__more {
    color: var(--cs-blue) !important;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ---------- ABOUT heading line breaks ---------- */
.cs-about__text h2 br { display: block; }

@media (max-width: 1199px) {
    .cs-featured__grid { grid-auto-columns: calc((100% - 24px*2 - 20px*3) / 4) !important; }
}
@media (max-width: 991px) {
    .cs-featured__grid { grid-auto-columns: calc((100% - 24px*2 - 20px*2) / 3) !important; }
}
@media (max-width: 575px) {
    .cs-featured__grid { grid-auto-columns: calc((100% - 24px*2 - 20px) / 2) !important; }
    .cs-featured__nav { display: none; }
}
