/* ============================================================
   ChemSmog Homepage — Figma v4 (Homepage v1)
   Built section by section, no Farmart widgets.
   ============================================================ */

/* All shared box-sizing for our sections */
.cs-home, .cs-home * { box-sizing: border-box; }

/* Override Farmart .container-{xl,xxl,xxxl} weirdness inside our homepage */
.cs-home {
    font-family: var(--cs-font-primary);
    color: var(--cs-text);
}

/* Section wrapper */
.cs-section {
    width: 100%;
    padding: 64px 0;
}
.cs-section--tight { padding: 48px 0; }
.cs-section--no-pad { padding: 0; }
.cs-section__container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}
.cs-section__title {
    font-family: var(--cs-font-primary);
    font-weight: 700;
    font-size: 34px;
    color: var(--cs-navy);
    text-align: center;
    margin: 0 0 40px 0;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}
.cs-section__title.text-uppercase { text-transform: uppercase; }

/* ============================================================
   HERO
   ============================================================ */
.cs-hero {
    position: relative;
    width: 100%;
    min-height: 580px;
    background: var(--cs-navy);
    color: var(--cs-white);
    overflow: hidden;
}
.cs-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.cs-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11,64,84,0.55) 0%, rgba(11,64,84,0.2) 60%, rgba(11,64,84,0) 100%);
    z-index: 1;
}
.cs-hero__content {
    position: relative;
    z-index: 2;
    max-width: 1440px;
    margin: 0 auto;
    padding: 110px 64px;
}
.cs-hero__title {
    font-family: var(--cs-font-primary);
    font-weight: 700;
    font-size: 50px;
    line-height: 1.1;
    color: var(--cs-white);
    margin: 0 0 20px 0;
    text-transform: uppercase;
    max-width: 720px;
    letter-spacing: 0.5px;
}
.cs-hero__subtitle {
    font-size: 18px;
    line-height: 1.55;
    color: var(--cs-white);
    max-width: 560px;
    margin: 0;
    font-weight: 400;
    opacity: 0.95;
}
.cs-hero__nav {
    position: absolute;
    bottom: 32px;
    right: 32px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cs-hero__nav button {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    color: var(--cs-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}
.cs-hero__nav button:hover { background: rgba(255,255,255,0.3); }

/* ============================================================
   CATEGORIES ROW (7 cards)
   ============================================================ */
.cs-categories {
    padding: 32px 0 64px;
    background: var(--cs-white);
}
.cs-categories__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.cs-cat-card {
    border-radius: 8px;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    aspect-ratio: 9/13;
    text-align: center;
    color: var(--cs-white);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
    overflow: hidden;
}
.cs-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(11,64,84,0.15);
    color: var(--cs-white);
}
.cs-cat-card--beige { background: var(--cs-cat-beige, #d9b596); }
.cs-cat-card--peach { background: var(--cs-cat-peach, #e8b89a); }
.cs-cat-card--teal  { background: var(--cs-cat-teal, var(--cs-teal)); }
.cs-cat-card--blue  { background: #6abfb8; }

.cs-cat-card__title {
    font-family: var(--cs-font-primary);
    font-weight: 600;
    font-size: 18px;
    line-height: 1.2;
    color: var(--cs-white);
    margin: 0;
}
.cs-cat-card__img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 6px;
    margin-top: 16px;
}

/* ============================================================
   FEATURED PRODUCTS
   ============================================================ */
.cs-featured {
    background: var(--cs-white);
}
.cs-featured__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.cs-product-card {
    background: var(--cs-white);
    border: 1px solid var(--cs-divider);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
    text-decoration: none;
    color: inherit;
}
.cs-product-card:hover {
    box-shadow: 0 8px 24px rgba(11,64,84,0.1);
    transform: translateY(-2px);
    color: inherit;
}
.cs-product-card__media {
    position: relative;
    aspect-ratio: 1/1;
    background: var(--cs-bg);
    overflow: hidden;
}
.cs-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cs-product-card__ribbon {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--cs-blue);
    color: var(--cs-white);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}
.cs-product-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cs-product-card__vendor {
    font-size: 12px;
    color: var(--cs-text-light);
}
.cs-product-card__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--cs-navy);
    line-height: 1.3;
    margin: 0;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cs-product-card__pricerow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 4px;
}
.cs-product-card__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--cs-navy);
}
.cs-product-card__per {
    font-size: 12px;
    color: var(--cs-text-light);
}
.cs-product-card__co2 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--cs-green);
    font-weight: 500;
    margin-top: 4px;
}
.cs-product-card__co2 .leaf {
    width: 14px;
    height: 14px;
    color: var(--cs-green);
}

.cs-featured__cta {
    text-align: center;
    margin-top: 40px;
}
.cs-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(90deg, var(--cs-btn-g1) 0%, var(--cs-btn-g2) 100%);
    color: var(--cs-white);
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 2px 6px rgba(0,123,169,0.2);
}
.cs-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,123,169,0.3);
    color: var(--cs-white);
}

/* ============================================================
   ABOUT — "Chemsmog, where chemistry is an opportunity"
   ============================================================ */
.cs-about {
    background: var(--cs-white);
}
.cs-about__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.cs-about__text h2 {
    font-size: 42px;
    line-height: 1.1;
    color: var(--cs-blue);
    font-weight: 700;
    margin: 0 0 24px 0;
    text-transform: lowercase;
}
.cs-about__text p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--cs-text);
    margin: 0 0 16px 0;
}
.cs-about__image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--cs-bg);
}
.cs-about__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================
   BEFORE YOU BUY — 4 capsule cards on gradient
   ============================================================ */
.cs-before-buy {
    background: linear-gradient(90deg, var(--cs-green) 0%, var(--cs-teal) 50%, var(--cs-blue) 100%);
    padding: 80px 0;
    color: var(--cs-white);
}
.cs-before-buy__title {
    text-align: center;
    color: var(--cs-white);
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 56px 0;
    padding: 0 24px;
}
.cs-before-buy__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
}
.cs-step-card {
    background: var(--cs-white);
    border-radius: 200px;
    padding: 36px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--cs-blue);
    min-height: 420px;
}
.cs-step-card__num {
    font-size: 56px;
    font-weight: 700;
    color: var(--cs-teal);
    line-height: 1;
    margin-bottom: 8px;
    font-family: var(--cs-font-primary);
}
.cs-step-card__heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--cs-blue);
    text-transform: uppercase;
    margin: 0 0 16px 0;
    line-height: 1.2;
}
.cs-step-card__body {
    font-size: 14px;
    line-height: 1.5;
    color: var(--cs-blue);
    margin: 0 0 auto 0;
    flex: 1;
}
.cs-step-card__icon {
    margin-top: 20px;
    color: var(--cs-green);
    width: 48px;
    height: 48px;
}

/* ============================================================
   VIDEOS + NEWS
   ============================================================ */
.cs-videos__grid,
.cs-news__grid {
    display: grid;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.cs-videos__grid { grid-template-columns: repeat(3, 1fr); }
.cs-news__grid { grid-template-columns: repeat(2, 1fr); }

.cs-video-card {
    aspect-ratio: 16/10;
    background: var(--cs-bg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.cs-video-card iframe,
.cs-video-card img {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.cs-news-card {
    background: var(--cs-white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--cs-divider);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease;
}
.cs-news-card:hover {
    box-shadow: 0 8px 24px rgba(11,64,84,0.1);
    color: inherit;
}
.cs-news-card__img {
    aspect-ratio: 16/10;
    background: var(--cs-bg);
    overflow: hidden;
}
.cs-news-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cs-news-card__body { padding: 24px; }
.cs-news-card__meta {
    font-size: 12px;
    color: var(--cs-text-light);
    margin-bottom: 8px;
}
.cs-news-card__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--cs-navy);
    line-height: 1.3;
    margin: 0 0 12px 0;
}
.cs-news-card__more {
    font-size: 13px;
    font-weight: 600;
    color: var(--cs-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-news__cta {
    text-align: center;
    margin-top: 40px;
}

/* ============================================================
   TESTIMONIALS & MEMBERSHIPS
   ============================================================ */
.cs-testimonials {
    background: var(--cs-white);
    padding: 48px 0 80px;
}
.cs-testimonials__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}
.cs-testimonials__row img {
    max-height: 96px;
    width: auto;
    opacity: 0.7;
    transition: opacity .15s ease;
}
.cs-testimonials__row img:hover { opacity: 1; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1199px) {
    .cs-hero__title { font-size: 40px; }
    .cs-categories__grid { grid-template-columns: repeat(4, 1fr); }
    .cs-featured__grid { grid-template-columns: repeat(3, 1fr); }
    .cs-before-buy__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .cs-section { padding: 40px 0; }
    .cs-hero { min-height: 460px; }
    .cs-hero__content { padding: 60px 24px; }
    .cs-hero__title { font-size: 28px; }
    .cs-hero__subtitle { font-size: 15px; }
    .cs-categories__grid { grid-template-columns: repeat(2, 1fr); }
    .cs-featured__grid { grid-template-columns: repeat(2, 1fr); }
    .cs-about__container { grid-template-columns: 1fr; gap: 24px; }
    .cs-about__text h2 { font-size: 28px; }
    .cs-before-buy__grid { grid-template-columns: 1fr; }
    .cs-videos__grid { grid-template-columns: 1fr; }
    .cs-news__grid { grid-template-columns: 1fr; }
    .cs-section__title { font-size: 24px; }
}

/* Slide link (set per-slide in admin > Simple Sliders): stretched over the slide */
.cs-hero__link { position: absolute; inset: 0; z-index: 4; }
.cs-hero__nav { z-index: 6; }
