﻿/* =========================================================
   SHOP PAGE – professional, compact, responsive (prefix: sh-)
   Uses tokens from site.css (--c-*) with safe fallbacks.
   Breakpoints: 480 / 640 / 768 / 992 / 1200 / 1536
   ========================================================= */
.sh {
    --p: var(--c-primary, #ff6a00);
    --p-d: var(--c-primary-d, #e65e00);
    --p-soft: var(--c-primary-soft, #fff3e8);
    --dark: var(--c-dark, #111827);
    --text: var(--c-text, #374151);
    --muted: var(--c-muted, #6b7280);
    --line: var(--c-line, #e5e7eb);
    --bg: var(--c-bg, #f6f7fb);
    --r: var(--radius, 10px);
    --r-lg: var(--radius-lg, 14px);
    --sh: 0 1px 4px rgba(17,24,39,.06);
    --sh-lg: 0 10px 26px rgba(17,24,39,.14);
    --g: clamp(8px, 1.4vw, 16px);
    background: var(--bg);
    color: var(--text);
    min-height: 60vh;
}

    .sh *, .sh *::before, .sh *::after {
        box-sizing: border-box;
    }

    .sh img {
        max-width: 100%;
        display: block;
    }

    .sh a {
        text-decoration: none;
        color: inherit;
    }

    .sh ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .sh h1, .sh h2, .sh h3, .sh h4, .sh h6, .sh p {
        margin: 0;
    }

.sh-wrap {
    width: 100%;
    max-width: 1500px;
    margin-inline: auto;
    padding-inline: clamp(8px, 2vw, 20px);
}

/* ---------- title bar ---------- */
.sh-top {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding-block: 10px;
}

.sh-crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--muted);
    flex-wrap: wrap;
}

    .sh-crumb a:hover {
        color: var(--p);
    }

    .sh-crumb i {
        font-size: .7rem;
    }

    .sh-crumb span {
        color: var(--dark);
        font-weight: 600;
    }

.sh-page-title {
    font-size: clamp(1.15rem, 2.6vw, 1.6rem);
    font-weight: 800;
    color: var(--dark);
    margin-top: 2px;
}

/* ---------- layout ---------- */
.sh-body {
    padding-block: var(--g) clamp(16px, 3vw, 32px);
}

.sh-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--g);
    align-items: start;
}

.sh-content {
    min-width: 0;
}

/* ---------- buttons ---------- */
.sh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--p);
    color: #fff !important;
    font-weight: 600;
    font-size: .84rem;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
}

    .sh-btn:hover {
        background: var(--p-d);
    }

.sh-btn-ghost {
    background: #fff;
    color: var(--dark) !important;
    box-shadow: inset 0 0 0 1.5px var(--line);
}

    .sh-btn-ghost:hover {
        background: var(--dark);
        color: #fff !important;
        box-shadow: none;
    }

.sh-btn-sm {
    padding: 6px 12px;
    font-size: .78rem;
}

.sh-icon-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--dark);
    cursor: pointer;
}

    .sh-icon-btn:hover {
        background: var(--p);
        color: #fff;
    }

/* ---------- sidebar (drawer on mobile) ---------- */
.sh-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,.5);
    opacity: 0;
    visibility: hidden;
    transition: .25s;
    z-index: 1040;
}

    .sh-overlay.is-open {
        opacity: 1;
        visibility: visible;
    }

.sh-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    background: #fff;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .3s ease;
    box-shadow: var(--sh-lg);
}

    .sh-side.is-open {
        transform: none;
    }

.sh-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
}

    .sh-side-head h2 {
        font-size: 1rem;
        font-weight: 700;
        color: var(--dark);
    }

.sh-side-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 14px 10px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.sh-side-foot {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: #fff;
}

    .sh-side-foot .sh-btn {
        flex: 1;
    }

.sh-widget {
    border-bottom: 1px solid var(--line);
    padding-block: 4px;
}

    .sh-widget:last-of-type {
        border-bottom: 0;
    }

    .sh-widget > summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 9px 0;
        font-size: .9rem;
        font-weight: 700;
        color: var(--dark);
    }

        .sh-widget > summary::-webkit-details-marker {
            display: none;
        }

        .sh-widget > summary::after {
            content: "\f078";
            font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "Font Awesome 5 Pro", "Font Awesome 6 Pro";
            font-weight: 900;
            font-size: .62rem;
            color: var(--muted);
            transition: transform .2s;
        }

    .sh-widget[open] > summary::after {
        transform: rotate(180deg);
    }

    .sh-widget > summary .sh-sum {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .sh-widget > summary small {
        font-size: .68rem;
        font-weight: 700;
        color: var(--muted);
        background: #f3f4f6;
        border-radius: 99px;
        padding: 1px 7px;
    }

    .sh-widget > summary .sh-sel {
        font-size: .66rem;
        font-weight: 700;
        color: #fff;
        background: var(--p);
        border-radius: 99px;
        min-width: 18px;
        height: 18px;
        display: inline-grid;
        place-items: center;
        padding-inline: 5px;
    }

        .sh-widget > summary .sh-sel[hidden] {
            display: none;
        }

/* lists: lambi ho to page nahi badhti, list ke andar hi scroll hoti hai */
.sh-side .sh-list {
    max-height: 208px;
    overflow-y: auto;
    padding: 0 4px 6px 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

    .sh-side .sh-list::-webkit-scrollbar {
        width: 6px;
    }

    .sh-side .sh-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 6px;
    }

    .sh-side .sh-list li[hidden], .sh-none[hidden] {
        display: none;
    }

.sh-none {
    padding: 10px 6px;
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
}

/* list ke upar chhota search box */
.sh-find {
    position: relative;
    display: block;
    margin: 0 0 6px;
}

    .sh-find i {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: .75rem;
        color: var(--muted);
        pointer-events: none;
    }

    .sh-find input {
        width: 100%;
        padding: 7px 10px 7px 30px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #f9fafb;
        font: inherit;
        font-size: 16px;
        color: var(--dark);
    }

        .sh-find input:focus {
            outline: 2px solid var(--p);
            outline-offset: 0;
            background: #fff;
        }

@media (min-width: 992px) {
    .sh-find input {
        font-size: .82rem;
    }
}

/* category links */
.sh-list li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: .84rem;
    transition: .15s;
}

    .sh-list li > a:hover {
        background: var(--p-soft);
        color: var(--p);
    }

    .sh-list li > a.is-active {
        background: var(--p-soft);
        color: var(--p);
        font-weight: 700;
    }

.sh-list em {
    font-style: normal;
    font-size: .72rem;
    color: var(--muted);
    background: #f3f4f6;
    border-radius: 99px;
    padding: 1px 7px;
}

/* custom checkbox */
.sh-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    font-size: .84rem;
    cursor: pointer;
    border-radius: 8px;
}

    .sh-check:hover {
        background: #f9fafb;
    }

    .sh-check input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.sh-box {
    flex: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    display: grid;
    place-items: center;
    transition: .15s;
}

.sh-check input:checked + .sh-box {
    background: var(--p);
    border-color: var(--p);
}

    .sh-check input:checked + .sh-box::after {
        content: "";
        width: 4px;
        height: 8px;
        border: solid #fff;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg) translate(-1px, -1px);
    }

.sh-check input:focus-visible + .sh-box {
    outline: 2px solid var(--p);
    outline-offset: 2px;
}

.sh-check-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-muted {
    color: var(--muted);
    flex: none;
}

.sh-stars {
    color: #f5a623;
    font-size: .72rem;
    display: inline-flex;
    gap: 1px;
}

/* price slider */
.sh-price {
    padding: 2px 2px 10px;
}

    .sh-price input[type=text] {
        width: 100%;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 6px 10px;
        font-size: .82rem;
        font-weight: 600;
        text-align: center;
        color: var(--dark);
        background: #f9fafb;
        margin-bottom: 12px;
    }

.sh-range {
    position: relative;
    height: 22px;
}

.sh-range-track {
    position: absolute;
    top: 9px;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
}

    .sh-range-track::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: var(--l, 0%);
        right: var(--r, 0%);
        background: var(--p);
        border-radius: 4px;
    }

.sh-range input[type=range] {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    height: 22px;
}

    .sh-range input[type=range]::-webkit-slider-thumb {
        -webkit-appearance: none;
        pointer-events: auto;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        background: #fff;
        border: 3px solid var(--p);
        cursor: pointer;
        box-shadow: var(--sh);
    }

    .sh-range input[type=range]::-moz-range-thumb {
        pointer-events: auto;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #fff;
        border: 3px solid var(--p);
        cursor: pointer;
    }

    .sh-range input[type=range]::-moz-range-track {
        background: transparent;
    }

/* colors / sizes */
.sh-colors, .sh-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    max-height: none;
    overflow: visible;
}

.sh-color {
    position: relative;
    display: block;
    cursor: pointer;
}

    .sh-color input {
        position: absolute;
        opacity: 0;
    }

    .sh-color span {
        display: block;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1px #cbd5e1;
        transition: .15s;
    }

    .sh-color input:checked + span {
        box-shadow: 0 0 0 2px var(--p);
        transform: scale(1.1);
    }

.sh-size {
    position: relative;
    display: block;
    cursor: pointer;
}

    .sh-size input {
        position: absolute;
        opacity: 0;
    }

    .sh-size span {
        display: grid;
        place-items: center;
        min-width: 36px;
        height: 32px;
        padding-inline: 8px;
        border: 1px solid var(--line);
        border-radius: 8px;
        font-size: .78rem;
        font-weight: 600;
        transition: .15s;
    }

    .sh-size input:checked + span {
        background: var(--p);
        border-color: var(--p);
        color: #fff;
    }

/* ---------- toolbar ---------- */
.sh-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh);
    margin-bottom: var(--g);
}

.sh-filter-btn {
    padding: 7px 14px;
}

    .sh-filter-btn b {
        background: var(--p);
        color: #fff;
        border-radius: 99px;
        min-width: 18px;
        height: 18px;
        display: inline-grid;
        place-items: center;
        font-size: .68rem;
        padding-inline: 5px;
    }

.sh-result {
    font-size: .8rem;
    color: var(--muted);
    margin-right: auto;
}

    .sh-result b {
        color: var(--dark);
    }

.sh-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.sh-sort {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
}

    .sh-sort span {
        display: none;
    }

.sh-select {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 6px 26px 6px 10px;
    font-size: .82rem;
    color: var(--dark);
    background-color: #fff;
    max-width: 180px;
    cursor: pointer;
}

    .sh-select:focus {
        outline: 2px solid var(--p);
        outline-offset: 1px;
    }

.sh-view {
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
}

.sh-view-btn {
    width: 32px;
    height: 30px;
    border: 0;
    background: transparent;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    transition: .15s;
}

    .sh-view-btn.is-active {
        background: #fff;
        color: var(--p);
        box-shadow: var(--sh);
    }

/* chips */
.sh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--g);
}

.sh-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 12px;
    background: var(--p-soft);
    color: var(--p);
    border-radius: 99px;
    font-size: .76rem;
    font-weight: 600;
}

    .sh-chip button {
        width: 18px;
        height: 18px;
        border: 0;
        border-radius: 50%;
        background: var(--p);
        color: #fff;
        font-size: .6rem;
        cursor: pointer;
        line-height: 1;
    }

.sh-chip-clear {
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
    border: 0;
    font-size: .76rem;
}

/* ---------- product grid ---------- */
.sh-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--g);
}

.sh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh);
    transition: transform .25s, box-shadow .25s;
    padding: 0;
}

    .sh-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--sh-lg);
    }

.sh-card-img {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3f4f8;
    overflow: hidden;
    padding: 0;
    border-radius: 0;
}

.sh-card-link {
    display: block;
    height: 100%;
}

.sh-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s;
    border-radius: 0;
    max-height: none;
}

.sh-card:hover .sh-card-img img {
    transform: scale(1.06);
}

.sh-type {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: var(--p);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.sh-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .sh-actions a {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        background: #fff;
        border-radius: 50%;
        color: var(--dark);
        font-size: .8rem;
        box-shadow: var(--sh);
        transition: .2s;
        border: 0;
    }

        .sh-actions a:hover, .sh-actions a.is-active {
            background: var(--p);
            color: #fff;
        }

.sh-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 9px 10px 10px;
    flex: 1;
}

.sh-card-title {
    font-size: .86rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    height: auto;
}

    .sh-card-title a:hover {
        color: var(--p);
    }

.sh-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.sh-price-tag {
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
}

.sh-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    min-width: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: var(--dark);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    width: auto;
}

    .sh-cart-btn span {
        display: none;
    }

    .sh-cart-btn:hover {
        background: var(--p);
    }

/* list view */
.sh-grid.is-list {
    grid-template-columns: 1fr;
}

    .sh-grid.is-list .sh-card {
        flex-direction: row;
    }

    .sh-grid.is-list .sh-card-img {
        width: clamp(110px, 28vw, 220px);
        aspect-ratio: 1/1;
        flex: none;
    }

    .sh-grid.is-list .sh-card-body {
        justify-content: center;
        gap: 6px;
        padding: 12px 14px;
    }

    .sh-grid.is-list .sh-card-title {
        font-size: .95rem;
        min-height: 0;
    }

    .sh-grid.is-list .sh-card-bottom {
        margin-top: 6px;
        justify-content: flex-start;
        gap: 14px;
    }

    .sh-grid.is-list .sh-cart-btn span {
        display: inline;
    }

/* empty */
.sh-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: clamp(28px, 6vw, 60px) 14px;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

    .sh-empty i {
        font-size: 2.2rem;
        color: #cbd5e1;
    }

    .sh-empty h3 {
        font-size: 1.1rem;
        color: var(--dark);
    }

    .sh-empty p {
        font-size: .88rem;
        color: var(--muted);
    }

/* pagination spacing (styles come from site.css) */
.sh .premium-pagination-container {
    margin-top: clamp(14px, 2.4vw, 24px);
}

/* toast */
.sh-toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%) translateY(20px);
    background: #111827;
    color: #fff;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: .85rem;
    opacity: 0;
    transition: .3s;
    z-index: 99999;
    pointer-events: none;
    max-width: 92vw;
}

    .sh-toast.show {
        opacity: 1;
        transform: translateX(-50%);
    }

    .sh-toast.err {
        background: #dc2626;
    }

body.sh-lock {
    overflow: hidden;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 480px) {
    .sh-sort span {
        display: inline;
    }

    .sh-cart-btn span {
        display: inline;
    }
}

@media (min-width: 640px) {
    .sh-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sh-card-body {
        padding: 10px 12px 12px;
    }
}

@media (min-width: 992px) {
    .sh-layout {
        grid-template-columns: 264px minmax(0, 1fr);
    }

    .sh-overlay, .sh-side-head .sh-icon-btn, .sh-filter-btn {
        display: none;
    }

    .sh-side {
        position: sticky;
        top: 12px;
        align-self: start;
        transform: none;
        width: auto;
        height: auto;
        max-height: calc(100vh - 24px);
        overflow: hidden;
        z-index: 1;
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        box-shadow: var(--sh);
    }

    .sh-side-scroll {
        min-height: 0;
    }

    .sh-side-head {
        padding: 12px 14px;
    }
}

@media (min-width: 1200px) {
    .sh-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sh-layout {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

@media (min-width: 1536px) {
    .sh-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .sh-grid.is-list {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) {
    .sh-actions {
        opacity: 1 !important;
    }
}

@media (min-width: 992px) and (hover: hover) {
    .sh-actions {
        opacity: 0;
        transform: translateX(8px);
        transition: .25s;
    }

    .sh-card:hover .sh-actions {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sh-card, .sh-side, .sh-overlay {
        transition: none;
    }
}
