:root {
    --ink: #223026;
    --muted: #6d7468;
    --green: #1f6b43;
    --green-dark: #145233;
    --gold: #e0c587;
    --line: rgba(58, 74, 52, 0.10);
    --soft: #f8f3e8;
    --panel: rgba(255, 255, 255, 0.94);
    --shadow: 0 22px 55px rgba(97, 82, 52, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(222, 201, 158, 0.22), transparent 22%),
        linear-gradient(180deg, #fbf6ea 0%, #f4ecdd 100%);
    font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
    font-size: 16px;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.shop-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.shop-page {
    flex: 1 0 auto;
    width: 100%;
    margin: 0;
    padding: 12px 0 56px;
}

.shop-hero-card {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding: 38px max(24px, calc((100vw - 1240px) / 2 + 20px)) 26px;
    border-radius: 0;
    background:
        linear-gradient(90deg, rgba(252, 248, 240, 0.96) 0%, rgba(252, 248, 240, 0.90) 18%, rgba(252, 248, 240, 0.64) 36%, rgba(252, 248, 240, 0.12) 58%, rgba(252, 248, 240, 0.02) 100%),
        var(--shop-hero-bg) center center / cover no-repeat;
    box-shadow: none;
    border: 0;
}

.shop-hero-copy {
    position: relative;
    z-index: 1;
    padding-bottom: 16px;
}

.shop-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #617357;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.shop-hero-kicker::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.shop-hero-copy h1 {
    margin: 14px 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.shop-hero-copy p {
    max-width: 330px;
    margin: 0 0 28px;
    color: #515d50;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 600;
}

.shop-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7469;
    font-size: 14px;
    font-weight: 700;
}

.shop-breadcrumbs strong {
    color: var(--green);
}

.shop-hero-visual {
    display: none;
}

.shop-toolbar {
    width: min(100%, 1240px);
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(213, 197, 164, 0.25);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(118, 96, 58, 0.08);
}

.shop-toolbar-summary span {
    color: #69705f;
    font-size: 13px;
    font-weight: 800;
}

.shop-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.shop-sort-field select {
    min-width: 250px;
    min-height: 46px;
    padding: 0 16px;
    color: #344237;
    border: 1px solid rgba(64, 82, 54, 0.10);
    border-radius: 14px;
    background: #fffdfa;
    outline: 0;
    font-weight: 800;
}

.shop-view-toggle {
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(64, 82, 54, 0.10);
    border-radius: 14px;
    background: #fffdfa;
}

.shop-view-toggle button {
    min-width: 70px;
    min-height: 38px;
    color: #6c7568;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-weight: 800;
}

.shop-view-toggle .is-active {
    color: var(--green);
    background: rgba(31, 107, 67, 0.08);
}

.shop-layout {
    width: min(100%, 1240px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.filter-panel,
.catalog-panel {
    border: 1px solid #e2eaf4;
    background: var(--panel);
    box-shadow: 0 14px 36px rgba(110, 92, 58, 0.08);
}

.filter-panel {
    position: sticky;
    top: 118px;
    border-radius: 26px;
}

.filter-panel form {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #223026;
    font-size: 26px;
    font-weight: 900;
    font-family: Georgia, "Times New Roman", serif;
}

.filter-group {
    display: grid;
    gap: 11px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(60, 76, 52, 0.08);
}

.filter-group h2 {
    margin: 0;
    color: #2c3b2f;
    font-size: 16px;
    font-weight: 800;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #49564a;
    font-size: 13px;
    font-weight: 800;
}

.filter-option input { accent-color: var(--green); }

.filter-option-count b,
.filter-option-rating b {
    margin-left: auto;
    color: #7f867d;
    font-size: 12px;
    font-weight: 800;
}

.filter-option-rating span {
    color: #f0b13a;
    letter-spacing: 0.08em;
}

.filter-option-rating em {
    color: #ddd8ca;
    font-style: normal;
}

.shop-range-shell {
    display: grid;
    gap: 10px;
}

.shop-range-track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: rgba(31, 107, 67, 0.10);
}

.shop-range-track span {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f6b43, #1b5b39);
}

.shop-range-track::before,
.shop-range-track::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid #1f6b43;
    border-radius: 50%;
    background: #fffdfa;
    transform: translateY(-50%);
}

.shop-range-track::before { left: 0; }
.shop-range-track::after { right: 0; }

.shop-range-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #7c8478;
    font-size: 11px;
    font-weight: 800;
}

.price-fields {
    display: grid;
    gap: 10px;
}

.price-fields-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-fields label {
    display: grid;
    gap: 5px;
    color: #66738a;
    font-size: 12px;
    font-weight: 850;
}

.price-fields input,
.filter-group select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--ink);
    border: 1px solid rgba(64, 82, 54, 0.10);
    border-radius: 12px;
    background: #fffdfa;
    outline: 0;
    font-weight: 800;
}

.apply-filter,
.reset-filter,
.load-more-row a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 13px;
    font-weight: 950;
}

.filter-actions {
    display: grid;
    gap: 10px;
}

.apply-filter {
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, #1f6b43, #155434);
}

.reset-filter {
    color: var(--green-dark);
    border: 1px solid rgba(31, 107, 67, 0.14);
    background: #ffffff;
}

.catalog-panel {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.shop-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(208, 193, 164, 0.22);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(97, 82, 52, 0.08);
}

.product-image {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 12px 12px 0;
    background: #fffdfa;
}

.product-image img {
    width: 100%;
    aspect-ratio: 1 / 0.9;
    display: block;
    object-fit: cover;
    border-radius: 14px;
    transition: transform .2s ease;
}

.shop-card:hover .product-image img { transform: scale(1.035); }

.product-image span {
    position: absolute;
    left: 20px;
    top: 20px;
    padding: 6px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f6b43, #145233);
    font-size: 11px;
    font-weight: 950;
}

.product-image em {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #7c8478;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    font-size: 13px;
    font-style: normal;
    font-weight: 950;
}

.product-body {
    display: grid;
    gap: 8px;
    padding: 14px 14px 16px;
}

.product-body small {
    color: #7e8579;
    font-size: 11px;
    font-weight: 800;
}

.product-body h2 {
    min-height: 42px;
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.22;
}

.product-body h2 a:hover { color: var(--green-dark); }

.product-meta,
.product-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.product-meta strong {
    color: #1f6b43;
    font-size: 16px;
    font-weight: 950;
}

.product-meta del {
    color: #afb2ab;
    font-size: 12px;
    font-weight: 700;
}

.product-rating-row {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f0b13a;
    font-size: 12px;
    font-weight: 900;
}

.product-rating-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-rating-row .shop-icon {
    width: 14px;
    height: 14px;
    color: #f0b13a;
    fill: #f0b13a;
}

.product-rating-row b {
    color: #80867b;
    font-size: 12px;
}

.product-card-stats {
    display: grid;
    gap: 6px;
    color: #657165;
    font-size: 12px;
    font-weight: 800;
}

.product-card-stats span {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-location i {
    width: 14px;
    text-align: center;
    color: #1f6b43;
}

.product-actions {
    padding-top: 6px;
}

.product-actions-compact {
    justify-content: flex-end;
    padding-top: 2px;
}

.product-action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.product-actions a,
.cart-add-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #1f6b43, #145233);
    box-shadow: 0 10px 18px rgba(31, 107, 67, 0.16);
}

.cart-add-button {
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, #1f6b43, #145233);
    box-shadow: none;
}

.cart-add-button:hover,
.product-actions a:hover {
    transform: translateY(-1px);
}

.product-actions a.checkout-icon-button .shop-icon {
    width: 19px;
    height: 19px;
}

.empty-shop-state {
    grid-column: 1 / -1;
    min-height: 240px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    padding: 28px;
    color: #53627a;
    border: 1px dashed rgba(31, 107, 67, 0.18);
    border-radius: 18px;
    background: #fffdfa;
    text-align: center;
}

.empty-shop-state strong {
    color: var(--ink);
    font-size: 22px;
}

.empty-shop-state a {
    margin-top: 8px;
    color: var(--green-dark);
    font-weight: 950;
}

.load-more-row {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.load-more-row a {
    min-width: 220px;
    color: var(--green-dark);
    border: 1px solid #ccebdd;
    background: #ffffff;
}

.order-panel { display: none; }

.product-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.product-preview-modal:target,
.product-preview-modal.is-preview-open,
.product-preview-modal.is-preview-closing { display: flex; }

.product-preview-modal.is-preview-closed {
    display: flex;
    visibility: hidden;
    pointer-events: none;
}

.preview-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 16, 35, 0.54);
}

.preview-panel {
    position: relative;
    z-index: 1;
    width: min(1040px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    overflow: hidden;
    border: 1px solid #dfe8f3;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 30px 90px rgba(2, 14, 34, 0.28);
}

.preview-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: #243451;
    border: 1px solid #dfe8f3;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    font-size: 18px;
    font-weight: 950;
}

.preview-media {
    position: relative;
    min-height: 100%;
    display: grid;
    padding: 16px;
    background: linear-gradient(180deg, #f5f9ff 0, #edf5ff 100%);
}

.preview-main-frame {
    width: 100%;
    min-height: 500px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #dfe8f3;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0, #f7fbff 100%);
}

.preview-main-frame img {
    width: 100%;
    height: 100%;
    max-height: calc(100dvh - 92px);
    display: block;
    object-fit: contain;
}

.preview-media span {
    position: absolute;
    left: 18px;
    top: 18px;
    padding: 8px 12px;
    color: #9a4d00;
    border-radius: 999px;
    background: #fff3d9;
    font-size: 12px;
    font-weight: 950;
}

.preview-content {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 34px;
    overflow-y: auto;
}

.preview-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-kicker span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: #08784d;
    border-radius: 999px;
    background: #eaf8f1;
    font-size: 12px;
    font-weight: 950;
}

.preview-content h2 {
    margin: 0;
    color: var(--ink);
    font-size: 32px;
    line-height: 1.12;
}

.preview-content > p {
    margin: 0;
    color: #40506a;
    font-weight: 750;
    line-height: 1.55;
}

.preview-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.preview-meta div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e5edf6;
    border-radius: 12px;
    background: #f8fbff;
}

.preview-meta dt {
    color: #66738a;
    font-size: 11px;
    font-weight: 950;
}

.preview-meta dd {
    overflow: hidden;
    margin: 0;
    color: var(--ink);
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-gallery {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.preview-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 1px solid #e5edf6;
    border-radius: 10px;
    background: #f8fbff;
}

.preview-thumb.is-active {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 166, 106, 0.14);
}

.preview-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.preview-promos {
    display: grid;
    gap: 10px;
}

.preview-promos h3 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
}

.no-promo {
    margin: 0;
    padding: 12px;
    color: #66738a;
    border: 1px dashed #d7e3ef;
    border-radius: 12px;
    background: #fbfdff;
    font-weight: 800;
}

.preview-promo-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #ffe1b8;
    border-radius: 14px;
    background: #fff8ed;
}

.preview-promo-row div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.preview-promo-row span {
    color: #b35d00;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
}

.preview-promo-row strong {
    color: var(--ink);
    font-size: 15px;
}

.preview-promo-row p,
.preview-promo-row small {
    margin: 0;
    color: #5d6a82;
    font-weight: 800;
    line-height: 1.35;
}

.preview-promo-row a,
.preview-wa,
.preview-secondary {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 12px;
    font-weight: 950;
    white-space: nowrap;
}

.preview-promo-row a,
.preview-wa {
    color: #ffffff;
    background: linear-gradient(135deg, #11aa6e, #068653);
}

.preview-secondary {
    color: var(--green-dark);
    border: 1px solid #ccebdd;
    background: #ffffff;
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shop-footer {
    display: none;
}

.shop-footer .shop-brand strong { font-size: 21px; }
.shop-footer .brand-icon { width: 38px; height: 38px; border-radius: 11px; }

.shop-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 18px;
    color: #40506a;
    font-weight: 850;
}

.shop-footer nav a:hover { color: var(--green-dark); }

.shop-footer small {
    grid-column: 1 / -1;
    min-width: 0;
    padding-top: 18px;
    color: #52617a;
    border-top: 1px solid #dde8f4;
    line-height: 1.45;
    text-align: center;
    font-weight: 800;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .shop-hero-card {
        grid-template-columns: 1fr;
        min-height: 320px;
        padding: 30px 20px 26px;
        background-position: 68% center;
    }

    .shop-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
    .shop-toolbar,
    .shop-toolbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .shop-sort-field select,
    .shop-view-toggle {
        width: 100%;
    }

    .shop-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .filter-panel { position: static; }

    .filter-panel form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .panel-title,
    .filter-actions,
    .apply-filter,
    .reset-filter { grid-column: 1 / -1; }

    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .shop-page {
        padding-inline: 12px;
        padding-top: 12px;
    }

    .shop-hero-card {
        min-height: 240px;
        padding: 24px 18px;
        background-position: 72% center;
    }

    .shop-hero-copy p {
        max-width: none;
        font-size: 15px;
    }

    .filter-panel form,
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-image img { aspect-ratio: 1 / 0.72; }
    .product-body h2 { min-height: auto; }

    .product-preview-modal {
        align-items: flex-start;
        padding: 12px;
    }

    .preview-panel {
        width: min(360px, calc(100vw - 24px));
        max-height: none;
        grid-template-columns: 1fr;
        overflow: auto;
        border-radius: 18px;
    }

    .preview-close {
        top: 10px;
        right: 10px;
    }

    .preview-media { padding: 12px; }
    .preview-main-frame { min-height: 260px; }
    .preview-main-frame img { max-height: 300px; }

    .preview-content {
        gap: 14px;
        padding: 20px;
        overflow-y: visible;
    }

    .preview-content h2 { font-size: 24px; }
    .preview-meta { grid-template-columns: 1fr; }
    .preview-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .preview-promo-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .preview-promo-row a,
    .preview-wa,
    .preview-secondary { width: 100%; }

    .preview-actions { flex-direction: column; }

}

@media (max-width: 360px) {
    .shop-page {
        padding-inline: 10px;
        padding-top: 12px;
    }
}
