.category-page .section {
    padding: 40px 0;
}
.category-page .hero-copy {
    max-width: 760px;
}
.category-page .hero-copy h1 {
    margin-top: 18px;
    font-size: clamp(2rem, 4vw, 3rem);
}
.category-page .hero-copy p {
    margin: 18px 0 24px;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.75;
}
.category-page .category-listing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.category-subcategories .section-heading {
    margin-bottom: 18px;
}
.subcategory-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.subcategory-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.subcategory-list-item:hover,
.subcategory-list-item:focus-visible {
    transform: translateY(-2px);
    border-color: var(--green-300);
    box-shadow: var(--shadow);
}
.subcategory-list-item h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}
.subcategory-list-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 1.15rem;
}
.category-overview .category-directory {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.category-tag {
    background: var(--green-100);
    color: var(--green-900);
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem;
    transition: background 0.2s ease, transform 0.2s ease;
}
.category-tag:hover,
.category-tag:focus-visible {
    background: var(--green-200);
    transform: translateY(-1px);
}
.category-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover,
.category-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(20, 67, 43, 0.14);
}
.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.category-card span {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}
.subcategory-grid,
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.subcategory-card,
.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--shadow);
}
.subcategory-card h3,
.product-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
}
.subcategory-card p,
.product-card p {
    color: var(--muted);
    margin: 0 0 16px;
    line-height: 1.65;
}
.product-card .price {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--green-700);
}
.product-card .product-image {
    margin-bottom: 18px;
}
.product-card .product-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}
.category-directory {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}
.category-tag {
    background: var(--green-100);
    color: var(--green-900);
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 0.95rem;
}
.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--muted);
}
.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}
.breadcrumb-separator {
    opacity: 0.5;
}
.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}
.category-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}
.sidebar-panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.sidebar-title h2 {
    margin: 0 0 18px;
    font-size: 1.15rem;
}
.sidebar-group {
    display: grid;
    gap: 10px;
}
.sidebar-group-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}
.category-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--gray-50);
    color: var(--text);
    transition: background-color 0.2s ease;
}
.category-checkbox input {
    accent-color: var(--green-600);
}
.category-checkbox.active {
    background: var(--green-50);
}
.category-checkbox.active span {
    color: var(--green-900);
    font-weight: 700;
}
.category-main .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}
.page-headline h1 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 4vw, 2.75rem);
}
.page-headline p {
    margin: 0 0 24px;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.75;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
}
.product-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 420px;
}
.product-card .badge {
    display: inline-flex;
    background: var(--green-100);
    color: var(--green-900);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    width: fit-content;
}
.product-card .product-brand {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.product-card .product-image {
    background: var(--gray-50);
    border-radius: 20px;
    padding: 18px;
}
.product-card .product-image img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
}
.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--green-700);
}
.price-old {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 0.95rem;
}
.product-card .button.large {
    width: 100%;
}
.empty-state {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    color: var(--muted);
}
@media (max-width: 1040px) {
    .category-layout {
        grid-template-columns: 1fr;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 860px) {
    .category-page .hero-copy {
        max-width: 100%;
    }
}
@media (max-width: 680px) {
    .category-listing,
    .subcategory-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}
/*  CATEGORY NAV HOVER EFFECT  */

.category-nav > a,
.category-nav .nav-dropdown > a{

    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;

    color: #fff;
    text-decoration: none;

    padding: 12px 18px;

    border-radius: 10px;

    font-weight: 600;

    transition: all .30s ease;
}

/* Animated Underline */

.category-nav > a::after,
.category-nav .nav-dropdown > a::after{

    content: "";

    position: absolute;

    left: 50%;
    bottom: 6px;

    width: 0;
    height: 3px;

    background: #fff;

    border-radius: 20px;

    transform: translateX(-50%);

    transition: width .30s ease;
}

/* Hover */

.category-nav > a:hover,
.category-nav .nav-dropdown > a:hover{

    background: rgba(255,255,255,.12);

    box-shadow:
        0 0 15px rgba(255,255,255,.20),
        0 8px 20px rgba(0,0,0,.15);

    transform: translateY(-2px);
}

/* Underline Animation */

.category-nav > a:hover::after,
.category-nav .nav-dropdown > a:hover::after{

    width: 70%;
}

/* Smooth */

.category-nav a{
    transition: all .30s ease;
}
.nav-dropdown-menu{

    opacity:0;

    visibility:hidden;

    transform:translateY(15px);

    transition:all .28s ease;
}

.nav-dropdown:hover .nav-dropdown-menu{

    opacity:1;

    visibility:visible;

    transform:translateY(0);
}

/*  for search buttton */
.search-btn{

    padding:0 20px;

    background:#F4FBF4;

    color:#2E7D32;

    border:2px solid #AED9AE;

    border-left:none;

    border-radius:0 12px 12px 0;

    cursor:pointer;

    transition:all .30s ease;
}

.search-btn:hover{

    background:#2E7D32;

    color:#fff;

    border-color:#2E7D32;

    transform:scale(1.03);
}
.search-btn i{
    font-size:18px;
    transition:.30s ease;
}

.search-btn:hover i{
    transform:scale(1.1);
}

/* ── Product detail extras: rating, sold count ────────────────────── */
.product-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    font-size: 0.9rem;
    line-height: 1;
}
.product-rating .star {
    font-size: 1rem;
    line-height: 1;
}
.product-rating .star.filled {
    color: #f5a623;
}
.product-rating .star.half {
    color: #f5a623;
    opacity: 0.6;
}
.product-rating .star.empty {
    color: #d0d0d0;
}
.product-rating .rating-value {
    font-weight: 700;
    color: var(--text);
    margin-left: 4px;
    font-size: 0.9rem;
}
.product-rating .review-count {
    color: var(--muted);
    font-size: 0.82rem;
    margin-left: 2px;
}
.sold-count {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-700);
}
.sold-count .sold-icon {
    font-size: 1rem;
    line-height: 1;
}
/* tighten card gap so new rows don't push button off-screen */
.product-card {
    gap: 10px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE PRODUCT CARDS  —  Blinkit/Zepto style horizontal scroll
   Only active on screens ≤ 600px. Desktop unchanged.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* ── Grid becomes a single horizontal scroll row ─────────────────── */
    .product-grid,
    .card-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        gap: 12px !important;
        padding: 4px 4px 12px !important;
        /* hide scrollbar but keep scrolling */
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* snap to cards */
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .product-grid::-webkit-scrollbar,
    .card-grid::-webkit-scrollbar { display: none; }

    /* ── Each card: compact portrait tile ────────────────────────────── */
    .product-card {
        flex: 0 0 155px !important;
        width: 155px !important;
        min-width: 155px !important;
        min-height: unset !important;
        padding: 0 !important;
        border-radius: 14px !important;
        gap: 0 !important;
        scroll-snap-align: start;
        overflow: hidden;
        display: flex !important;
        flex-direction: column !important;
        position: relative;
    }

    /* ── Image area: square-ish, fills card top ───────────────────────── */
    .product-card .product-image {
        width: 100% !important;
        height: 130px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: #f4fbf4;
        flex-shrink: 0;
        overflow: hidden;
        position: relative;
    }
    .product-card .product-image img {
        width: 100% !important;
        height: 130px !important;
        object-fit: contain !important;
        border-radius: 0 !important;
        display: block;
    }

    /* ── Content area below image ─────────────────────────────────────── */
    .product-card .pc-body {
        padding: 8px 10px 10px !important;
        display: flex;
        flex-direction: column;
        gap: 3px;
        flex: 1;
    }

    /* If there's no .pc-body wrapper, apply padding directly to children */
    .product-card .product-brand {
        font-size: 0.62rem !important;
        letter-spacing: 0.04em !important;
        color: var(--muted) !important;
        text-transform: uppercase;
        margin: 8px 10px 0 !important;
        line-height: 1.2;
    }
    .product-card h3 {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        margin: 3px 10px 0 !important;
        color: var(--text) !important;
        /* clamp to 2 lines */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Description: hide on mobile — no space */
    .product-card > p.sr-desc,
    .product-card > p:not(.product-brand):not(.sold-count):not(.pdp-short-desc) {
        display: none !important;
    }

    /* Rating row: compact */
    .product-card .product-rating {
        font-size: 0.65rem !important;
        margin: 2px 10px 0 !important;
        gap: 2px !important;
    }
    .product-card .product-rating .star { font-size: 0.7rem !important; }
    .product-card .product-rating .rating-value,
    .product-card .product-rating .review-count { font-size: 0.62rem !important; }

    /* Sold count: compact */
    .product-card .sold-count {
        font-size: 0.62rem !important;
        margin: 2px 10px 0 !important;
        gap: 3px !important;
    }

    /* ── Price row ────────────────────────────────────────────────────── */
    .product-card .price-row {
        margin: 4px 10px 0 !important;
        justify-content: flex-start !important;
        gap: 5px !important;
        align-items: baseline !important;
        flex-wrap: wrap !important;
    }
    .product-card .price-current {
        font-size: 0.88rem !important;
        font-weight: 800 !important;
    }
    .product-card .price-old {
        font-size: 0.7rem !important;
    }

    /* ── Discount badge — top-left overlay on image ───────────────────── */
    .product-card .badge {
        position: absolute !important;
        top: 7px !important;
        left: 7px !important;
        z-index: 2 !important;
        font-size: 0.62rem !important;
        padding: 2px 7px !important;
        border-radius: 999px !important;
        background: #e53935 !important;
        color: #fff !important;
        font-weight: 700 !important;
        letter-spacing: 0.02em;
        pointer-events: none;
    }
    /* Wishlist btn: hide on mobile to save space */
    .product-card .wishlist-btn {
        display: none !important;
    }

    /* ── Add-to-cart button: circular "+" bottom-right of image ──────── */
    .product-card .button,
    .product-card button.button,
    .product-card a.button {
        /* hide full-width CTA buttons */
        display: none !important;
    }
    /* Show only the add-to-cart as a + bubble */
    .product-card .btn-atc-mobile {
        display: flex !important;
        position: absolute !important;
        bottom: 54px !important; /* sits over image bottom-right */
        right: 8px !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 50% !important;
        background: var(--green-700) !important;
        color: #fff !important;
        border: none !important;
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        box-shadow: 0 4px 12px rgba(31,112,76,.35) !important;
        z-index: 3 !important;
        line-height: 1 !important;
        padding: 0 !important;
        transition: transform 0.15s ease, background 0.15s ease !important;
    }
    .product-card .btn-atc-mobile:hover {
        background: #1b5e20 !important;
        transform: scale(1.12) !important;
    }
    /* Don't show + button on out-of-stock items */
    .product-card .btn-atc-mobile[disabled] {
        background: var(--muted) !important;
        cursor: not-allowed !important;
    }

    /* ── Delivery time badge (optional, shown if data- attr present) ─── */
    .product-card .pc-delivery {
        font-size: 0.6rem !important;
        color: var(--muted) !important;
        margin: 2px 10px 6px !important;
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
    }

    /* ── Adjust hardin_sasta card grid too ───────────────────────────── */
    .hardin-sasta-page .card-grid,
    .hardin-sasta-page .product-grid {
        flex-direction: row !important;
    }
}
