:root {
    --bg: #f4f3f1;
    --orange: #e85d04;
    --brown: #ba6d11;
    --gold: #c5760d;
    --ink: #141312;
    --title: #141517;
    --card-ink: #151922;
    --text: #2d1e2f;
    --font-saira: 'Saira', system-ui, -apple-system, sans-serif;
    --font-jakarta: 'Plus Jakarta Sans', system-ui, sans-serif;
    --border-color: #e5e7eb;
}

body.drawer-open {
    overflow: hidden;
}

:where(.tiles-sec, .shop-main) button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

.shop-hero .main-container,
.tiles-sec .main-container,
.shop-main .main-container {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .shop-hero .main-container,
    .tiles-sec .main-container,
    .shop-main .main-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

.shop-hero {
    position: relative;
    padding: clamp(40px, 5vw, 75px) 0 clamp(24px, 3vw, 40px);
    /* background: linear-gradient(180deg, #f3ece4 0%, var(--bg) 100%); */
    text-align: center;
}

.shop-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 960px;
    margin: 0 auto;
    gap: 12px;
}

.shop-hero__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.shop-hero__title h1 {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 700;
    color: var(--title);
    line-height: 1.2;
}

.shop-hero__sub {
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: 600;
    color: var(--orange);
}

.shop-hero__desc {
    font-size: clamp(14.5px, 1.2vw, 17px);
    line-height: 1.65;
    color: #4b5563;
    font-weight: 400;
    max-width: 820px;
}

.shop-hero__desc span {
    color: var(--orange);
    font-weight: 600;
}

.tiles-sec {
    padding: 10px 0 25px;
}

.tiles {
    display: flex;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 0;
}

.tiles::-webkit-scrollbar {
    display: none;
}

.tile {
    flex: none;
    min-width: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink);
    text-align: center;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.tile i {
    display: block;
    width: 105px;
    height: 78px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover i {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.tile.is-active i {
    outline: 2.5px solid var(--orange);
    outline-offset: 3px;
}

.shop-main {
    padding: 20px 0 70px;
}

.shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

.sidebar {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar__header-mobile {
    display: none;
}

.content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: background 0.2s;
}

.filter-toggle-btn:hover {
    background: #fdfaf7;
    border-color: var(--orange);
}

.sortwrap {
    position: relative;
}

.sort {
    height: 48px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    font-size: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sort .lbl {
    color: #6b7280;
}

.sort .val {
    font-weight: 600;
    color: var(--ink);
}

.sort-menu {
    position: absolute;
    right: 0;
    top: 54px;
    width: 220px;
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #f0eae4;
    z-index: 50;
    display: none;
}

.sort-menu.open {
    display: block;
}

.sort-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14.5px;
}

.sort-menu button:hover,
.sort-menu button.sel {
    background: #fdf1e8;
    color: var(--orange);
    font-weight: 600;
}

.filters {
    background: #ffffff;
    border-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee7e0;
}

.f-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.f-head h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--ink);
}

.clear {
    font-size: 15px;
    color: var(--orange);
    font-weight: 600;
}

.clear:hover {
    text-decoration: underline;
}

.filters .search {
    position: relative;
    height: 44px;
    border: 1px solid #e0dad3;
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.filters .search input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    padding-right: 28px;
}

.filters .search svg {
    position: absolute;
    right: 12px;
    color: #9ca3af;
}

.fgroup {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fgroup-title h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.fgroup-title h3::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange);
}

.opts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opt {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14.5px;
    color: #4b5563;
    user-select: none;
}

.opt input {
    position: absolute;
    opacity: 0;
}

.box {
    width: 17px;
    height: 17px;
    border: 1.5px solid #9ca3af;
    border-radius: 5px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.opt input:checked + .box {
    background: var(--orange);
    border-color: var(--orange);
}

.weights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stars {
    color: var(--orange);
    letter-spacing: 2px;
    font-size: 16px;
}

.story-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee7e0;
}

.story-card__head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-card__head h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
}

.story-card__text {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin-top: 8px;
}

.story-card__img {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
}

.story-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-card__img span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

#shopResults.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-grid .sp-best__card {
    max-width: 100%;
}

.pcard {
    position: relative;
    width: 100%;
    height: 600px;
    border-radius: 36px;
    background: #ffffff;
    overflow: hidden;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    border: 1px solid #ebe5df;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.pcard:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.12);
}

.pcard-link {
    position: absolute;
    inset: 0;
    bottom: 74px;
    z-index: 3;
    display: block;
    cursor: pointer;
}

.pcard-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.pinfo {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border-radius: 28px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.04);
}

.prow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ptitle {
    flex: 1;
    min-width: 0;
}

.ptitle h3 {
    font-size: 26px;
    font-weight: 600;
    color: #151922;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating {
    display: flex;
    align-items: start;
    gap: 4px;
    font-size: 13px;
    font-weight: 400;
    color: #2d1e2f;
    margin-top: 3px;
    white-space: nowrap;
}

.rating svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.price {
    font-family: var(--font-jakarta);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.5px;
    color: var(--gold);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.size-pill {
    background: #f4f4f4;
    border-radius: 9999px;
    padding: 6px 10px;
    font-family: var(--font-jakarta);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #1f2937;
    white-space: nowrap;
    flex-shrink: 0;
}

.badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
}

.badges .badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2px;
    font-family: var(--font-jakarta);
    text-align: center;
    flex-shrink: 0;
}

.badges .badge svg {
    width: 17px;
    height: 17px;
    margin-bottom: 2px;
    stroke: var(--brown);
}

.badges .badge b {
    font-size: 8.5px;
    line-height: 1.1;
    font-weight: 700;
    text-transform: uppercase;
    color: #374151;
    white-space: nowrap;
}

.badges .badge em {
    font-style: normal;
    font-size: 8.5px;
    line-height: 1.1;
    color: #4b5563;
    white-space: nowrap;
}

.badge-div {
    width: 1px;
    height: 24px;
    background: #e5e7eb;
    margin: 0 2px;
    flex-shrink: 0;
}

.pbottom {
    position: relative;
    z-index: 5;
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 4px;
}

.stepper {
    width: 102px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    font-family: var(--font-jakarta);
    user-select: none;
}

.stepper button {
    width: 20px;
    height: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    transition: color 0.15s;
}

.stepper button:hover {
    color: var(--orange);
}

.stepper .qty {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
}

.add {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brown);
    border-radius: 9999px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: var(--font-jakarta);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.add:hover {
    background: #a45d09;
    transform: translateY(-1px);
}

.add svg {
    width: 17px;
    height: 17px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pager button,
.pager .dots {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
}

.pager button {
    background: #ffffff;
    border: 1px solid #e0dad3;
    transition: all 0.2s;
}

.pager button:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.pager button.cur {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

@media (max-width: 1440px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .filter-toggle-btn {
        display: inline-flex;
    }

    .toolbar {
        justify-content: space-between;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: min(380px, 86vw);
        height: 100vh;
        height: 100dvh;
        background: #ffffff;
        z-index: 10000;
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.2);
        padding: 24px;
        overflow-y: auto;
        transition: left 0.35s cubic-bezier(0.25, 1, 0.5, 1);
        gap: 20px;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar__header-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 14px;
        border-bottom: 1px solid #eee7e0;
    }

    .sidebar__header-mobile h3 {
        font-size: 20px;
        font-weight: 700;
    }

    .sidebar__close {
        font-size: 32px;
        line-height: 1;
        color: #6b7280;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(3px);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .filters,
    .story-card {
        box-shadow: none;
        border: 1px solid #eee7e0;
        padding: 18px;
    }

    .story-card__img {
        height: 260px;
    }
}

@media (max-width: 680px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .pcard,
    .product-grid .sp-best__card {
        max-width: 360px;
        margin: 0 auto;
        min-height: 560px;
    }

    .sortwrap,
    .sort {
        width: 100%;
    }

    .toolbar {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .filter-toggle-btn {
        justify-content: center;
    }
}