/* ============================================================
   DERMA FARM — HOMEPAGE PREMIUM EXTENSION
   Homepage-only components. Keeps PHP, cart and admin logic intact.
============================================================ */

:root {
    --df-berry: #9b2f63;
    --df-berry-dark: #741f48;
    --df-rose: #c86a91;
    --df-blush: #f6e4ed;
    --df-ivory: #fbf7f4;
    --df-ink: #241b22;
    --df-muted: #74666e;
    --df-border: rgba(62, 38, 49, .11);
    --df-shadow: 0 20px 55px rgba(55, 29, 43, .09);
}

/* Quick categories */
.df-quick-categories { background: #fff; border-bottom: 1px solid var(--df-border); }
.df-quick-categories-track { display: flex; gap: 12px; overflow-x: auto; padding: 16px 0; scrollbar-width: none; }
.df-quick-categories-track::-webkit-scrollbar { display: none; }
.df-quick-category { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--df-border); border-radius: 999px; color: var(--df-ink); background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; transition: .3s ease; }
.df-quick-category:hover { color: #fff; background: var(--df-berry); border-color: var(--df-berry); transform: translateY(-2px); }
.df-quick-category-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--df-blush); color: var(--df-berry); font-size: 13px; }
.df-quick-category:hover .df-quick-category-icon { background: rgba(255,255,255,.18); color: #fff; }

/* Campaign cards */
.df-campaign-section { padding: 76px 0 32px; background: #fff; overflow: hidden; }
.df-campaign-heading, .df-video-heading, .df-instagram-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.df-campaign-heading h2, .df-video-heading h2, .df-instagram-heading h2 { margin: 10px 0 0; color: var(--df-ink); font-family: "Playfair Display", Georgia, serif; font-size: clamp(34px, 4vw, 58px); line-height: 1; font-weight: 500; letter-spacing: -.04em; }
.df-campaign-heading h2 em, .df-video-heading h2 em, .df-instagram-heading h2 em { color: var(--df-berry); font-weight: 400; }
.df-carousel-controls { display: flex; align-items: center; gap: 12px; color: var(--df-muted); font-size: 11px; white-space: nowrap; }
.df-carousel-controls b { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--df-border); border-radius: 50%; color: var(--df-berry); font-size: 17px; }
/* =========================================
   CAMPAIGN SLIDER
========================================= */

.df-campaign-track {
    display: flex;
    gap: 24px;
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    scrollbar-width: none;
    -ms-overflow-style: none;

    padding: 8px 0 20px;
}

.df-campaign-track::-webkit-scrollbar {
    display: none;
}


/* =========================================
   BANNER CARD
========================================= */

.df-campaign-card {
    flex: 0 0 88%;

    position: relative;
    display: block;

    overflow: hidden;

    border-radius: 26px;

    background: #f8eee8;

    text-decoration: none;

    scroll-snap-align: start;

    box-shadow: 0 12px 35px rgba(42, 32, 24, 0.08);

    transition: transform 0.35s ease,
                box-shadow 0.35s ease;
}


/* Picture must fill card */
.df-campaign-card picture {
    display: block;
    width: 100%;
}


/* Desktop image */
.df-campaign-card img {
    display: block;

    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;

    object-fit: contain;
}


/* =========================================
   DESKTOP HOVER
========================================= */

@media (hover: hover) {

    .df-campaign-card:hover {
        transform: translateY(-4px);

        box-shadow:
            0 18px 45px rgba(42, 32, 24, 0.13);
    }

    .df-campaign-card:hover img {
        transform: scale(1.01);
    }
}


/* =========================================
   TABLET
========================================= */

@media (min-width: 600px) and (max-width: 991px) {

    .df-campaign-track {
        gap: 18px;
    }

    .df-campaign-card {
        flex-basis: 92%;
        border-radius: 22px;
    }

    .df-campaign-card img {
        aspect-ratio: 16 / 9;
    }
}


/* =========================================
   MOBILE — TRUE FULL SCREEN EDGE-TO-EDGE
========================================= */

@media (max-width: 599px) {

    .df-campaign-track {
        display: flex;

        width: 100vw;
        max-width: 100vw;

        /* Break out of any parent/container padding */
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);

        padding: 0;

        gap: 0;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;

        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .df-campaign-track::-webkit-scrollbar {
        display: none;
    }


    /* =========================================
       FULL SCREEN CARD
    ========================================= */

    .df-campaign-card {

        flex: 0 0 100vw;

        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;

        height: 100vw;

        aspect-ratio: 1 / 1;

        margin: 0;
        padding: 0;

        border-radius: 0;

        overflow: hidden;

        background: transparent;

        box-shadow: none;

        scroll-snap-align: start;
    }


    /* =========================================
       PICTURE
    ========================================= */

    .df-campaign-card picture {

        display: block;

        width: 100%;
        height: 100%;

        margin: 0;
        padding: 0;
    }


    /* =========================================
       IMAGE
    ========================================= */

    .df-campaign-card img {

        display: block;

        width: 100%;
        height: 100%;

        min-width: 100%;
        min-height: 100%;

        margin: 0;
        padding: 0;

        aspect-ratio: 1 / 1;

        object-fit: cover;
        object-position: center center;

        transform: none;
    }
}
.df-campaign-card--rose { background: linear-gradient(120deg, #f9e6ed, #f2cbdc); }
.df-campaign-card--cream { background: linear-gradient(120deg, #f9f0e7, #ead9ca); }
.df-campaign-card--berry { background: linear-gradient(120deg, #ead8e1, #d4b5c6); }
.df-campaign-copy { position: relative; z-index: 2; max-width: 54%; }
.df-campaign-kicker { display: block; margin-bottom: 15px; color: var(--df-berry); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.df-campaign-copy h3 { margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: clamp(31px, 4vw, 54px); line-height: .98; font-weight: 400; letter-spacing: -.035em; }
.df-campaign-copy h3 strong { color: var(--df-berry); font-weight: 500; }
.df-campaign-copy p { max-width: 300px; margin: 18px 0 23px; color: #76636b; font-size: 13px; line-height: 1.7; }
.df-campaign-cta { display: inline-flex; gap: 10px; align-items: center; color: var(--df-berry-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.df-campaign-cta b { font-size: 17px; }


/* Editorial */
.df-editorial-section { background: var(--df-ivory); }
.df-editorial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 75px; align-items: center; }
.df-editorial-image { position: relative; min-height: 490px; overflow: hidden; border-radius: 28px; background: var(--df-blush); }
.df-editorial-image img { width: 100%; height: 100%; min-height: 490px; object-fit: cover; }
.df-editorial-stamp { position: absolute; right: 22px; bottom: 22px; display: grid; place-items: center; width: 104px; height: 104px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(255,255,255,.72); color: var(--df-berry); font-family: "Playfair Display", Georgia, serif; font-size: 17px; line-height: 1.05; text-align: center; }
.df-editorial-copy h2 { margin: 0; color: var(--df-ink); font-family: "Playfair Display", Georgia, serif; font-size: clamp(37px, 4.5vw, 64px); line-height: 1; font-weight: 500; letter-spacing: -.04em; }
.df-editorial-copy h2 em { display: block; color: var(--df-berry); font-weight: 400; }
.df-editorial-copy p { max-width: 490px; margin: 25px 0 30px; color: var(--df-muted); font-size: 14px; line-height: 1.9; }

/* Video reviews */
.df-video-reviews-section { background: #fff; }
.df-video-heading p, .df-instagram-heading p { max-width: 450px; margin: 20px 0 0; color: var(--df-muted); font-size: 14px; line-height: 1.8; }
.df-video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.df-video-card { min-width: 0; }
.df-video-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 22px; background: #f1e6eb; box-shadow: var(--df-shadow); }
.df-video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.df-video-badge { position: absolute; top: 14px; left: 14px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(255,255,255,.8); color: var(--df-berry-dark); font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; pointer-events: none; }
.df-video-card h3 { margin: 17px 0 6px; color: var(--df-ink); font-family: "Playfair Display", Georgia, serif; font-size: 23px; font-weight: 500; line-height: 1.1; }
.df-video-card p { margin: 0; color: var(--df-muted); font-size: 11px; }

/* Instagram grid */
.df-instagram-section { background: #fff7fa; }
.df-instagram-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.df-instagram-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 18px; background: #f0dfe7; }
.df-instagram-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.df-instagram-tile span { position: absolute; inset: auto 8px 8px; padding: 8px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--df-berry-dark); font-size: 9px; font-weight: 800; text-align: center; opacity: 0; transform: translateY(8px); transition: .3s ease; }
.df-instagram-tile:hover img { transform: scale(1.08); }
.df-instagram-tile:hover span { opacity: 1; transform: translateY(0); }

/* Existing premium product and concern sections remain compatible */
.df-ritual-section, .df-concerns-section { position: relative; overflow: hidden; }

/* Responsive */
@media (max-width: 1000px) {
    .df-editorial-grid { grid-template-columns: 1fr; gap: 40px; }
    .df-editorial-image { min-height: 380px; }
    .df-editorial-image img { min-height: 380px; }
    .df-video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
    .df-instagram-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .df-campaign-section { padding: 0px 0 20px; }
    .df-campaign-heading, .df-video-heading, .df-instagram-heading { align-items: flex-start; flex-direction: column; gap: 18px; }
    .df-campaign-copy { max-width: 66%; }
    .df-campaign-copy p { font-size: 12px; }
    .df-video-grid { grid-template-columns: 1fr; gap: 28px; }
    .df-video-frame { aspect-ratio: 4 / 5; }
    .df-instagram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .df-instagram-tile span { opacity: 1; transform: none; }
}
