:root {
    --ink: #061436;
    --muted: #5d6a82;
    --green: #10a66a;
    --green-dark: #08784d;
    --blue: #0b86e8;
    --orange: #ff9416;
    --purple: #7055e8;
    --line: #dfe8f3;
    --soft: #f6fbff;
    --panel: rgba(255, 255, 255, 0.94);
    --shadow: 0 22px 55px rgba(15, 37, 75, 0.1);
}

* { 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 88% 0, #dceeff 0 220px, transparent 350px),
        linear-gradient(180deg, #ffffff 0, #f7fbff 54%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 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-header,
.shop-page,
.shop-footer {
    width: min(1320px, calc(100% - 64px));
    margin-inline: auto;
}

.shop-header {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 86px;
    display: grid;
    grid-template-columns: minmax(230px, auto) minmax(280px, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 12px 18px;
    border: 1px solid rgba(223, 232, 243, 0.88);
    border-top: 0;
    border-radius: 0 0 22px 22px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 14px 35px rgba(15, 37, 75, 0.08);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.shop-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    min-width: 0;
}

.brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 13px;
    background: linear-gradient(135deg, #20b875, #0b8f5a);
    box-shadow: 0 12px 26px rgba(15, 166, 106, 0.24);
}

.shop-brand strong {
    display: block;
    color: var(--ink);
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

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

.shop-brand small {
    display: block;
    margin-top: 4px;
    color: #5d6a82;
    font-size: 11px;
    font-weight: 850;
}

.shop-search {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid #e5edf6;
    border-radius: 14px;
    background: #f8fbff;
    color: #6a758a;
}

.shop-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-weight: 750;
}

.shop-search input::placeholder { color: #8a96aa; }

.shop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 900;
}

.shop-nav a { color: #15233f; }
.shop-nav a:hover,
.shop-nav .is-active { color: var(--green-dark); }

.shop-account {
    position: relative;
    justify-self: end;
}

.shop-login {
    justify-self: end;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #11aa6e, #068653);
    box-shadow: 0 16px 34px rgba(11, 147, 91, 0.24);
    font-weight: 950;
    white-space: nowrap;
}

.shop-account summary {
    list-style: none;
    cursor: pointer;
}

.shop-account summary::-webkit-details-marker { display: none; }

.shop-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #ffffff;
    border-radius: 15px;
    background: linear-gradient(135deg, #11aa6e, #068653);
    box-shadow: 0 16px 34px rgba(11, 147, 91, 0.24);
    font-size: 15px;
    font-weight: 950;
}

.shop-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.shop-account-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 80;
    width: 220px;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid #dfe8f3;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 22px 50px rgba(10, 32, 70, 0.16);
}

.shop-account-menu strong,
.shop-account-menu small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-account-menu small {
    color: #66738a;
    font-size: 12px;
    font-weight: 800;
}

.shop-account-menu a,
.shop-account-menu button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    color: #142340;
    border: 1px solid #e5edf6;
    border-radius: 11px;
    background: #f8fbff;
    font: inherit;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
}

.shop-account-menu form { margin: 0; }
.shop-account-menu button { width: 100%; color: #b42318; }

.shop-page {
    flex: 1 0 auto;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr) 308px;
    align-items: start;
    gap: 24px;
    padding: 28px 0 46px;
}

.filter-panel,
.catalog-panel,
.order-panel {
    border: 1px solid #e2eaf4;
    background: var(--panel);
    box-shadow: 0 14px 36px rgba(10, 32, 70, 0.06);
}

.filter-panel,
.order-panel {
    position: sticky;
    top: 108px;
    border-radius: 22px;
}

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

.panel-title,
.order-head div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title {
    color: var(--green-dark);
    font-weight: 950;
}

.filter-group {
    display: grid;
    gap: 11px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #d9e3ef;
}

.filter-group h2 {
    margin: 0;
    color: #263853;
    font-size: 14px;
}

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

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

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

.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 #dfe8f3;
    border-radius: 11px;
    background: #ffffff;
    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;
}

.apply-filter {
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, #11aa6e, #068653);
}

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

.catalog-panel {
    min-width: 0;
    padding: 30px;
    border-radius: 24px;
}

.catalog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.catalog-head h1 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: 0;
}

.catalog-head p {
    max-width: 560px;
    margin: 0;
    color: #56647b;
    line-height: 1.5;
    font-weight: 700;
}

.catalog-head > span {
    padding: 8px 13px;
    color: var(--green-dark);
    border-radius: 999px;
    background: #eaf8f1;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.category-tabs a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 18px;
    color: #3f4f67;
    border: 1px solid #dfe8f3;
    border-radius: 999px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 900;
}

.category-tabs .is-active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #11aa6e, #068653);
    box-shadow: 0 14px 28px rgba(16, 166, 106, 0.18);
}

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

.shop-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e1e9f3;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(10, 32, 70, 0.05);
}

.product-image {
    position: relative;
    display: block;
    overflow: hidden;
    background: #edf5ff;
}

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

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

.product-image span {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    color: #08784d;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    font-weight: 950;
}

.product-image em {
    position: absolute;
    right: 12px;
    top: 12px;
    max-width: calc(100% - 104px);
    overflow: hidden;
    padding: 6px 10px;
    color: #9a4d00;
    border-radius: 999px;
    background: rgba(255, 246, 225, 0.95);
    font-size: 11px;
    font-style: normal;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.product-body small {
    color: var(--blue);
    font-size: 11px;
    font-weight: 950;
}

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

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

.product-body p {
    min-height: 40px;
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #52617a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.product-meta strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 950;
}

.product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #9a6412;
    font-size: 13px;
    font-weight: 900;
}

.product-meta .shop-icon {
    width: 15px;
    height: 15px;
    color: var(--orange);
    fill: #ffcf7a;
}

.card-promo-line {
    min-height: 42px;
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    border: 1px solid #ffe1b8;
    border-radius: 12px;
    background: #fff8ed;
}

.card-promo-line span {
    color: #b35d00;
    font-size: 10px;
    font-weight: 950;
    text-transform: uppercase;
}

.card-promo-line strong {
    overflow: hidden;
    color: #10213a;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.product-actions span {
    min-width: 0;
    overflow: hidden;
    color: #637088;
    font-size: 12px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.product-actions a,
.cart-add-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #11aa6e, #068653);
    box-shadow: 0 12px 24px rgba(16, 166, 106, 0.2);
}

.cart-add-button {
    color: var(--green-dark);
    border: 1px solid #ccebdd;
    background: #f4fff9;
    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 #cfddeb;
    border-radius: 18px;
    background: #f8fbff;
    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 {
    overflow: hidden;
}

.order-head {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid #e7eef7;
}

.order-head strong { font-size: 17px; }

.order-head > span {
    padding: 6px 10px;
    color: var(--green-dark);
    border-radius: 999px;
    background: #eaf8f1;
    font-size: 12px;
    font-weight: 950;
}

.order-items {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.cart-empty-state {
    margin: 0;
    padding: 18px;
    color: #66738a;
    border: 1px dashed #d7e3ef;
    border-radius: 16px;
    background: #fbfdff;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.45;
}

.order-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 40px;
    gap: 12px;
    align-items: center;
    min-width: 0;
    padding: 10px;
    border: 1px solid #e8f0f8;
    border-radius: 16px;
    background: #ffffff;
}

.order-item img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
}

.order-item-body {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.order-item strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.order-item span {
    color: #40506a;
    font-size: 12px;
    font-weight: 850;
}

.order-item > a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: var(--green-dark);
    border: 1px solid #ccebdd;
    border-radius: 12px;
    background: #f4fff9;
}

.order-item > a .shop-icon,
.qty-control .shop-icon { width: 15px; height: 15px; }

.qty-control {
    width: max-content;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
}

.qty-control button {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #40506a;
    border: 1px solid #dfe8f3;
    border-radius: 8px;
    background: #ffffff;
}

.qty-control b {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
}

.cart-remove-button {
    width: max-content;
    min-height: 24px;
    padding: 0;
    color: #b42318;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 900;
}

.order-summary {
    display: grid;
    gap: 14px;
    padding: 18px 20px 22px;
    border-top: 1px dashed #d9e3ef;
}

.order-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #53627a;
    font-size: 14px;
    font-weight: 800;
}

.order-summary strong { color: var(--ink); }

.order-summary p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: #6a758a;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
}

.order-summary p .shop-icon {
    width: 16px;
    height: 16px;
    color: var(--blue);
}

.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 { display: flex; }

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

.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 {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin-top: 8px;
    padding: 34px max(32px, calc((100% - 1320px) / 2));
    border-top: 1px solid #e1e9f3;
    background: linear-gradient(180deg, #ffffff 0, #f4f9ff 100%);
}

.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-header { grid-template-columns: minmax(220px, auto) minmax(240px, 1fr) auto; }
    .shop-nav { display: none; }

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

    .order-panel {
        grid-column: 1 / -1;
        position: static;
    }

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

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

@media (max-width: 920px) {
    .shop-header,
    .shop-page { width: min(calc(100% - 32px), 1320px); }

    .shop-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .shop-search {
        grid-column: 1 / -1;
        order: 3;
    }

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

    .filter-panel,
    .order-panel { position: static; }

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

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

    .catalog-panel { padding: 22px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-items { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .shop-header,
    .shop-page {
        width: min(360px, calc(100% - 32px));
        max-width: 360px;
        margin-left: 16px;
        margin-right: auto;
    }

    .shop-header {
        min-height: 74px;
        padding: 10px 12px;
    }

    .shop-brand { gap: 8px; }
    .brand-icon { width: 38px; height: 38px; border-radius: 11px; }
    .shop-brand strong { font-size: 20px; }
    .shop-brand small { display: none; }

    .shop-login {
        min-height: 42px;
        padding-inline: 16px;
        border-radius: 13px;
        font-size: 14px;
    }
    .shop-avatar { width: 42px; height: 42px; border-radius: 13px; }
    .shop-account-menu { right: -2px; width: 210px; }

    .shop-search {
        min-height: 46px;
        padding-inline: 14px;
    }

    .shop-page { padding-top: 18px; }

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

    .catalog-head {
        display: grid;
        gap: 12px;
    }

    .catalog-head h1 { font-size: 30px; }
    .catalog-head > span { width: max-content; }
    .category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
    .category-tabs a { white-space: nowrap; }

    .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; }

    .shop-footer {
        grid-template-columns: 1fr;
        padding: 30px 16px;
    }

    .shop-footer nav {
        justify-content: flex-start;
    }
}

@media (max-width: 360px) {
    .shop-header { grid-template-columns: 1fr; }
    .shop-account,
    .shop-login { justify-self: stretch; }
    .shop-login { width: 100%; }
    .shop-avatar { width: 100%; }
    .shop-account-menu { left: 0; right: auto; width: 100%; }
}
