/* =========================================================
   SHEETAL PRODUCTS — TOP SEGMENT BAR + FULL-BLEED BANNERS
   + TYPE SIDEBAR CATALOGUE
========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&display=swap');

:root {
    --sf-brand-font: "Hobeaux", "Hobeaux Rococeaux", "Boho", "Baloo 2", "Poppins", sans-serif;
    --sf-pink: #ed217c;
    --sf-pink-dark: #c90f66;
    --sf-purple: #663399;
    --sf-text: #2c2432;
    --sf-muted: #7d7482;
    --sf-soft: #fff7fb;
    --sf-line: rgba(44, 36, 50, 0.08);
    --sf-white: #ffffff;
    --sf-type-sidebar-w: 240px;
}

html {
    scroll-behavior: smooth;
}

.sf-products-page,
.sf-products-page * {
    box-sizing: border-box;
}

.sf-products-page {
    background: #ffffff;
    color: var(--sf-text);
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

.sf-products-container {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
}

/* Lets a section break out to full viewport width regardless of
   how deep it's nested inside width-constrained containers. */

.sf-full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* =========================================================
   CATALOGUE WRAPPER
========================================================= */

.sf-product-catalogue {
    position: relative;
    z-index: 5;
    width: 100%;
    margin: 0;
    padding: 0 0 140px;
    background: #ffffff;
}

/* =========================================================
   TOP SEGMENT BAR — sticky, full width, replaces the old
   sidebar. Search sits on the right on desktop.
========================================================= */

.sf-segment-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sf-line);
}

.sf-segment-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

.sf-segment-tabs-top {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.sf-segment-tabs-top::-webkit-scrollbar {
    display: none;
}

.sf-segment-link {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 9px 16px 9px 10px;
    border-radius: 999px;
    background: transparent;
    color: var(--sf-text);
    text-decoration: none;
    white-space: nowrap;
    transition: 0.25s ease;
}

.sf-segment-link:hover {
    background: var(--sf-soft);
}

.sf-segment-link.active {
    background: var(--sf-pink);
    color: #ffffff;
}

.sf-segment-link.active .sf-segment-icon {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.sf-segment-link.active small {
    color: rgba(255, 255, 255, 0.8);
}

.sf-segment-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--sf-soft);
    color: var(--sf-pink);
    transition: 0.25s ease;
}

.sf-segment-icon svg {
    width: 16px;
    height: 16px;
}

.sf-segment-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.sf-segment-name {
    font-size: 13px;
    font-weight: 700;
}

.sf-segment-link small {
    color: var(--sf-muted);
    font-size: 10px;
    font-weight: 600;
}

.sf-topbar-search {
    position: relative;
    flex: 0 0 auto;
    width: 220px;
}

.sf-topbar-search input {
    width: 100%;
    padding: 10px 30px 10px 14px;
    border: 1px solid var(--sf-line);
    border-radius: 999px;
    outline: none;
    background: var(--sf-soft);
    color: var(--sf-text);
    font: inherit;
    font-size: 13px;
    transition: 0.25s ease;
}

.sf-topbar-search input:focus {
    border-color: var(--sf-pink);
    background: #ffffff;
}

.sf-topbar-search > span {
    position: absolute;
    top: 50%;
    right: 12px;
    color: var(--sf-pink);
    font-size: 16px;
    transform: translateY(-50%);
    pointer-events: none;
}

/* =========================================================
   PER-SEGMENT SECTION + FULL-BLEED BANNER
========================================================= */

.sf-product-segment {
    scroll-margin-top: 76px;
}

.sf-product-segment + .sf-product-segment {
    margin-top: 90px;
}

.sf-segment-banner {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    aspect-ratio: 1512 / 410;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
}

.sf-segment-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(20, 6, 28, 0) 45%, rgba(20, 6, 28, 0.72) 100%);
}

.sf-segment-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 34px;
}

.sf-segment-banner-text {
    max-width: 70%;
}

.sf-segment-banner-crumb {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sf-segment-banner h2 {
    margin: 0;
    color: #ffffff;
    font-family: var(--sf-brand-font);
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.sf-segment-banner-count {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.sf-segment-banner-count strong {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.sf-segment-banner-count span {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sf-segment-banner-1 { background-color: var(--sf-pink); }
.sf-segment-banner-2 { background-color: var(--sf-purple); }
.sf-segment-banner-3 { background-color: #ff6f9c; }
.sf-segment-banner-4 { background-color: #8c4bc7; }

/* =========================================================
   TYPE SIDEBAR (Natural Cup / Jumbo Cup / Kulfi / Candy…)
   Sits beside the product grid, sticky under the top bar.
========================================================= */

.sf-segment-body {
    display: grid;
    grid-template-columns: var(--sf-type-sidebar-w) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding-top: 44px;
}

.sf-type-sidebar {
    position: sticky;
    top: 92px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 20px;
    border-right: 1px solid var(--sf-line);
}

.sf-type-sidebar-eyebrow {
    display: block;
    margin-bottom: 14px;
    color: var(--sf-pink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.sf-type-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--sf-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: 0.25s ease;
}

.sf-type-tab:hover {
    background: var(--sf-soft);
}

.sf-type-tab.active {
    background: var(--sf-pink);
    color: #ffffff;
}

.sf-type-tab.active small {
    color: rgba(255, 255, 255, 0.8);
}

.sf-type-tab small {
    color: var(--sf-muted);
    font-size: 10.5px;
    font-weight: 700;
}

.sf-type-panels {
    min-width: 0;
}

.sf-type-panel {
    scroll-margin-top: 92px;
}

.sf-type-panel + .sf-type-panel {
    margin-top: 64px;
}

.sf-type-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 40px;
}

.sf-type-panel-head span {
    color: var(--sf-pink);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.sf-type-panel-head h3 {
    position: relative;
    margin: 6px 0 0;
    padding-bottom: 15px;
    color: var(--sf-purple);
    font-family: var(--sf-brand-font);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.sf-type-panel-head h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 3px;
    border-radius: 2px;
    background: var(--sf-pink);
}

.sf-type-panel-head > p {
    margin: 0;
    color: var(--sf-muted);
    font-size: 12px;
}

/* Segments with no sub-types just show a plain grid, with the
   same top padding as the sidebar layout for visual rhythm */

.sf-product-segment > .sf-products-container > .sf-products-grid {
    padding-top: 44px;
}

/* =========================================================
   PREMIUM PRODUCT GRID — APPLE / NAKD STYLE
   Only product photo + product name. No card shell, no
   border, no shadow-box, no badge, no footer, no arrow.
========================================================= */

.sf-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 56px 30px;
}

.sf-segment-body .sf-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sf-product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    outline: none;
}

.sf-product-photo {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 250px;
    margin-bottom: 22px;
}

.sf-product-photo::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6%;
    z-index: 0;
    width: 78%;
    height: 62%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 235, 0.65) 0%, rgba(255, 214, 235, 0.22) 55%, transparent 75%);
    transform: translateX(-50%);
    transition: 0.5s ease;
}

.sf-product-photo::after {
    content: "";
    position: absolute;
    right: 22%;
    bottom: 4%;
    left: 22%;
    z-index: 0;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(49, 2, 63, 0.16), transparent 72%);
    filter: blur(5px);
}

.sf-product-item:hover .sf-product-photo::before,
.sf-product-item:focus-visible .sf-product-photo::before {
    background: radial-gradient(circle, rgba(237, 33, 124, 0.20) 0%, rgba(255, 214, 235, 0.25) 55%, transparent 75%);
}

.sf-product-photo img {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    height: auto;
    max-width: 74%;
    max-height: 96%;
    object-fit: contain;
    filter: drop-shadow(0 22px 20px rgba(49, 2, 63, 0.12));
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.sf-product-item:hover .sf-product-photo img,
.sf-product-item:focus-visible .sf-product-photo img {
    transform: translateY(-10px) scale(1.05);
}

.sf-product-type {
    display: block;
    margin-bottom: 6px;
    color: var(--sf-pink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.sf-product-name {
    max-width: 230px;
    color: var(--sf-purple);
    font-family: var(--sf-brand-font);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.sf-product-item:hover .sf-product-name,
.sf-product-item:focus-visible .sf-product-name {
    color: var(--sf-pink-dark);
}

.sf-products-no-results {
    display: none;
    padding: 90px 0;
    text-align: center;
}

.sf-products-no-results strong {
    display: block;
    margin-bottom: 8px;
    color: var(--sf-purple);
    font-size: 18px;
}

.sf-products-no-results p {
    margin: 0;
    color: var(--sf-muted);
    font-size: 13px;
}

#sfProductsNoResults:not([hidden]) {
    display: block;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1240px) {
    .sf-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sf-segment-body .sf-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sf-product-photo {
        height: 220px;
    }
}

@media (max-width: 991px) {
    .sf-segment-topbar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .sf-topbar-search {
        width: 100%;
    }

    .sf-segment-body {
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 30px;
    }

    .sf-type-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 0 0 16px;
        margin-bottom: 30px;
        border-right: 0;
        border-bottom: 1px solid var(--sf-line);
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sf-type-sidebar::-webkit-scrollbar {
        display: none;
    }

    .sf-type-sidebar-eyebrow {
        display: none;
    }

    .sf-type-tab {
        flex: 0 0 auto;
        background: var(--sf-soft);
    }

    .sf-products-grid,
    .sf-segment-body .sf-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .sf-products-container {
        width: min(100% - 22px, 1440px);
    }

    .sf-segment-banner {
        aspect-ratio: 4 / 3;
    }

    .sf-segment-banner-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding-bottom: 22px;
    }

    .sf-segment-banner-text {
        max-width: 100%;
    }

    .sf-segment-banner-count {
        flex: 1 1 100%;
        align-items: flex-start;
    }

    .sf-products-grid,
    .sf-segment-body .sf-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 44px 20px;
    }

    .sf-product-photo {
        height: 170px;
        margin-bottom: 18px;
    }

    .sf-product-name {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .sf-products-grid,
    .sf-segment-body .sf-products-grid {
        grid-template-columns: 1fr;
    }

    .sf-segment-icon {
        display: none;
    }
}


/* Fix header/topbar overlap and full-screen view */
.sf-products-page {
    width: 100%;
    margin: 0;
    padding: 0;
}

.sf-segment-topbar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Section bleed without extra white space on sides */
.sf-products-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}


/* Full View Hero Banners with zero crop */
.sf-segment-banner {
    width: 100% !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-size: cover !important; /* ya contain (agar complete banner image strict dikhani ho) */
    min-height: 280px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .sf-segment-banner {
        min-height: 160px;
        background-size: 100% 100% !important; /* Ensures complete banner visibility in mobile */
    }
}

/* Product Grid: Desktop vs Mobile */
.sf-products-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr); /* Desktop: 6 per row for full width view */
    gap: 10px !important;
}

/* Mobile View Configuration: 4 items per row */
@media (max-width: 768px) {
    .sf-products-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* Exactly 4 items in a row */
        gap: 6px !important;
    }

    .sf-product-item {
        padding: 4px !important;
        text-align: center;
    }

    .sf-product-photo img {
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .sf-product-name {
        font-size: 11px !important;
        line-height: 1.2;
    }

    .sf-product-type {
        font-size: 9px !important;
    }
}

@media (max-width: 768px) {
    .sf-segment-body {
        display: block !important;
    }

    .sf-type-sidebar {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    .sf-type-tab {
        display: inline-block !important;
        margin-right: 8px;
        padding: 6px 12px !important;
    }
}

/* 1. Main Header Overlap Fix - Clear offset from global theme header */
.sf-products-page {
    margin-top: 90px !important; /* Theme header ki height ke mutabiq spacing */
    position: relative;
    z-index: 1;
}

/* 2. Segment Bar Sticky position fix under theme menu bar */
.sf-segment-topbar {
    position: sticky !important;
    top: 80px !important; /* Main header ke thik niche sticky rahega */
    z-index: 99 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* WordPress Admin Bar active ho tab offset fix */
body.logged-in .sf-products-page {
    margin-top: 122px !important; /* Admin bar (32px) + Header offset */
}

body.logged-in .sf-segment-topbar {
    top: 112px !important;
}

/* Mobile Screens Adjustments */
@media (max-width: 768px) {
    .sf-products-page {
        margin-top: 70px !important;
    }
    
    .sf-segment-topbar {
        top: 60px !important;
    }
    
    body.logged-in .sf-products-page {
        margin-top: 116px !important;
    }
    
    body.logged-in .sf-segment-topbar {
        top: 106px !important;
    }
}