/* ===== Variables & Reset ===== */
:root {
    --wb-purple: #cb11ab;
    --wb-purple-dark: #a00d88;
    --wb-purple-light: #f3e5f5;
    --wb-pink: #ff3c8e;
    --wb-orange: #ff6b00;
    --wb-green: #00a046;
    --wb-red: #f44336;
    --wb-bg: #f6f6f9;
    --wb-white: #ffffff;
    --wb-text: #242424;
    --wb-text-secondary: #8b8b8b;
    --wb-border: #e0e0e0;
    --wb-shadow: 0 2px 8px rgba(0,0,0,.08);
    --wb-radius: 12px;
    --wb-radius-sm: 8px;
    --header-height: 72px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--wb-bg);
    color: var(--wb-text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font-family: inherit; }
ul { list-style: none; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.main { flex: 1; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--wb-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}

.btn-primary {
    background: var(--wb-purple);
    color: white;
}
.btn-primary:hover { background: var(--wb-purple-dark); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--wb-border);
    color: var(--wb-text);
}
.btn-outline:hover { border-color: var(--wb-purple); color: var(--wb-purple); }

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.header {
    background: var(--wb-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.header-top {
    background: #f5f5f5;
    font-size: 12px;
    color: var(--wb-text-secondary);
}
.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 32px;
}
.header-location {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.header-links { display: flex; gap: 20px; }
.header-links a:hover { color: var(--wb-purple); }

.header-main { padding: 12px 0; }
.header-main-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.logo-icon { font-size: 28px; }
.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--wb-purple);
    letter-spacing: -0.5px;
}

.catalog-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--wb-purple);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--wb-radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.catalog-btn:hover { background: var(--wb-purple-dark); }

.search-form {
    flex: 1;
    display: flex;
    max-width: 700px;
    position: relative;
}
.search-form input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 2px solid var(--wb-purple);
    border-radius: var(--wb-radius-sm);
    font-size: 15px;
    outline: none;
    background: var(--wb-bg);
}
.search-form input:focus { background: white; }
.search-form button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--wb-purple);
    border: none;
    color: white;
    width: 40px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--wb-text);
    border-radius: var(--wb-radius-sm);
    transition: background .15s;
}
.header-action:hover { background: var(--wb-bg); }
.action-icon {
    position: relative;
    display: flex;
}
.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--wb-purple);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Catalog dropdown */
.catalog-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 24px 0;
    border-top: 1px solid var(--wb-border);
}
.catalog-dropdown.open { display: block; }
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.catalog-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--wb-radius-sm);
    font-weight: 500;
    transition: background .15s;
}
.catalog-item:hover { background: var(--wb-purple-light); color: var(--wb-purple); }
.catalog-icon { font-size: 24px; }

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, #cb11ab 0%, #7b2cbf 50%, #3a0ca3 100%);
    color: white;
    padding: 48px 0;
    margin-bottom: 32px;
}
.hero-slide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.hero-content h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}
.hero-content p {
    font-size: 16px;
    opacity: .9;
    margin-bottom: 24px;
    max-width: 480px;
}
.hero-visual { font-size: 80px; opacity: .9; }
.hero .btn-primary {
    background: white;
    color: var(--wb-purple);
}
.hero .btn-primary:hover { background: #f0f0f0; }

/* ===== Sections ===== */
.section { padding: 32px 0; }
.section-alt { background: white; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}
.section-header .section-title { margin-bottom: 0; }
.section-link {
    color: var(--wb-purple);
    font-weight: 600;
    font-size: 14px;
}
.section-link:hover { text-decoration: underline; }

/* ===== Categories ===== */
.categories-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.category-card {
    background: white;
    border-radius: var(--wb-radius);
    padding: 20px 12px;
    text-align: center;
    box-shadow: var(--wb-shadow);
    transition: transform .2s, box-shadow .2s;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.category-card-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.category-card-name { font-size: 13px; font-weight: 600; line-height: 1.3; }

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.product-card {
    background: white;
    border-radius: var(--wb-radius);
    overflow: hidden;
    box-shadow: var(--wb-shadow);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.product-card-link { display: block; flex: 1; }

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: #f8f8f8;
    overflow: hidden;
}
.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f0e6f5, #e8f0fe);
}
.product-img-placeholder.large { min-height: 400px; }
.product-img-placeholder.small { width: 80px; height: 80px; border-radius: var(--wb-radius-sm); }
.product-emoji { font-size: 64px; }
.product-emoji.large { font-size: 120px; }

.badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--wb-red);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.badge-discount.large { font-size: 16px; padding: 6px 12px; }
.badge-hit {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--wb-orange);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.badge-new {
    position: absolute;
    top: 36px;
    right: 10px;
    background: var(--wb-green);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
}
.btn-fav {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    opacity: 0;
    transition: opacity .2s, color .2s;
}
.product-card:hover .btn-fav { opacity: 1; }
.btn-fav:hover { color: var(--wb-purple); }

.product-info { padding: 12px; }
.product-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.price-current {
    font-size: 18px;
    font-weight: 700;
    color: var(--wb-text);
}
.price-old {
    font-size: 13px;
    color: var(--wb-text-secondary);
    text-decoration: line-through;
}
.product-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-meta { font-size: 12px; color: var(--wb-text-secondary); margin-bottom: 6px; }
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}
.stars { color: #ffb800; }
.rating-value { font-weight: 600; }
.reviews { color: var(--wb-text-secondary); }

.btn-add-cart {
    margin: 0 12px 12px;
    padding: 10px;
    background: var(--wb-purple-light);
    color: var(--wb-purple);
    border: none;
    border-radius: var(--wb-radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
}
.btn-add-cart:hover {
    background: var(--wb-purple);
    color: white;
}

/* ===== Promo ===== */
.promo-banners {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.promo-banner {
    border-radius: var(--wb-radius);
    padding: 28px 24px;
    color: white;
}
.promo-banner h3 { font-size: 18px; margin-bottom: 4px; }
.promo-banner p { opacity: .85; font-size: 14px; }
.promo-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.promo-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.promo-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }

/* ===== Catalog ===== */
.catalog-page { padding: 20px 0 40px; }
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--wb-text-secondary);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.breadcrumbs a:hover { color: var(--wb-purple); }

.catalog-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}
.catalog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}
.filter-block {
    background: white;
    border-radius: var(--wb-radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--wb-shadow);
}
.filter-block h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}
.filter-list li { margin-bottom: 2px; }
.filter-list a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    transition: background .15s;
}
.filter-list a:hover, .filter-list a.active {
    background: var(--wb-purple-light);
    color: var(--wb-purple);
    font-weight: 600;
}
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.price-inputs input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.price-inputs input:focus { border-color: var(--wb-purple); }

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.catalog-title {
    font-size: 22px;
    font-weight: 700;
}
.catalog-title .count {
    font-size: 14px;
    font-weight: 400;
    color: var(--wb-text-secondary);
    margin-left: 8px;
}
.sort-select {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.sort-select select {
    padding: 8px 12px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    outline: none;
}

/* ===== Product Detail ===== */
.product-page { padding: 20px 0 40px; }
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: white;
    border-radius: var(--wb-radius);
    padding: 32px;
    box-shadow: var(--wb-shadow);
    margin-bottom: 40px;
}
.product-main-image { position: relative; border-radius: var(--wb-radius); overflow: hidden; }
.product-badges { display: flex; gap: 8px; margin-bottom: 12px; }
.product-badges .badge-hit, .product-badges .badge-new { position: static; }
.product-title { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.product-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.product-prices-large {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.price-current.large { font-size: 32px; font-weight: 800; }
.price-old.large { font-size: 18px; }
.discount-label {
    background: #e8f5e9;
    color: var(--wb-green);
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}
.product-weight-row {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--wb-text-secondary);
    margin-bottom: 24px;
}
.product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--wb-border);
    border-radius: var(--wb-radius-sm);
    overflow: hidden;
}
.qty-btn {
    width: 40px;
    height: 44px;
    border: none;
    background: var(--wb-bg);
    font-size: 18px;
    cursor: pointer;
    transition: background .15s;
}
.qty-btn:hover { background: #e8e8e8; }
.qty-selector input {
    width: 48px;
    height: 44px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}
.btn-add-cart-detail { flex: 1; min-width: 200px; }

.product-delivery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    background: var(--wb-bg);
    border-radius: var(--wb-radius-sm);
}
.delivery-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.delivery-icon { font-size: 24px; }
.delivery-item strong { display: block; font-size: 14px; }
.delivery-item p { font-size: 12px; color: var(--wb-text-secondary); }

.product-description, .product-composition {
    margin-bottom: 20px;
}
.product-description h3, .product-composition h3 {
    font-size: 16px;
    margin-bottom: 8px;
}
.product-description p, .product-composition p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* ===== Cart ===== */
.cart-page { padding: 20px 0 40px; }
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}
.page-title .count {
    font-size: 16px;
    font-weight: 400;
    color: var(--wb-text-secondary);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 16px;
    align-items: center;
    background: white;
    padding: 16px;
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
}
.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}
.cart-item-name:hover { color: var(--wb-purple); }
.cart-item-weight { font-size: 12px; color: var(--wb-text-secondary); }
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    overflow: hidden;
}
.cart-item-qty .qty-btn { width: 32px; height: 32px; font-size: 16px; }
.qty-value {
    width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}
.cart-item-price { text-align: right; min-width: 100px; }
.cart-item-price .price-current { font-size: 16px; }
.price-unit { display: block; font-size: 12px; color: var(--wb-text-secondary); }
.cart-item-remove {
    background: none;
    border: none;
    color: var(--wb-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all .15s;
}
.cart-item-remove:hover { background: #fce4ec; color: var(--wb-red); }

/* summary-card redefined below */

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}
.summary-row .free { color: var(--wb-green); font-weight: 600; }
.delivery-hint {
    font-size: 12px;
    color: var(--wb-text-secondary);
    margin-bottom: 12px;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    padding-top: 12px;
    border-top: 1px solid var(--wb-border);
    margin: 12px 0 20px;
}
.summary-note {
    font-size: 11px;
    color: var(--wb-text-secondary);
    text-align: center;
    margin-top: 12px;
}

/* ===== Empty state ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
}
.empty-icon { font-size: 64px; display: block; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; }
.empty-state p { color: var(--wb-text-secondary); margin-bottom: 20px; }

/* ===== Footer ===== */
.footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 48px 0 24px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: white;
    font-size: 14px;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    font-size: 13px;
    margin-bottom: 10px;
    transition: color .15s;
}
.footer-col a:hover { color: white; }
.socials { display: flex; gap: 12px; margin-bottom: 16px; }
.socials a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.socials a:hover { background: var(--wb-purple); color: white; }
.footer-app { font-size: 13px; margin-bottom: 8px; }
.app-badges { display: flex; gap: 8px; }
.app-badge {
    background: rgba(255,255,255,.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: all .3s;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1024px) {
    .container { padding: 0 14px; }
    .categories-row { grid-template-columns: repeat(3, 1fr); }
    .promo-banners { grid-template-columns: 1fr; }
    .catalog-layout { grid-template-columns: 1fr; gap: 16px; }
    .catalog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .product-detail { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
    .cart-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 0 12px; }

    /* Header */
    .header-top { display: none; }
    .header { position: sticky; top: 0; }
    .header-main { padding: 8px 0; }
    .header-main-inner {
        flex-wrap: wrap;
        gap: 8px;
    }
    .logo { order: 1; }
    .logo-text { font-size: 16px; }
    .logo-icon { font-size: 22px; }
    .header-actions {
        order: 2;
        margin-left: auto;
        gap: 2px;
    }
    .header-action {
        padding: 4px 8px;
        font-size: 10px;
    }
    .header-action svg { width: 22px; height: 22px; }
    .header-actions span { display: none; }
    .catalog-btn {
        order: 3;
        padding: 10px 12px;
        font-size: 13px;
    }
    .search-form {
        order: 4;
        flex: 1 1 100%;
        max-width: none;
    }
    .search-form input {
        padding: 10px 44px 10px 12px;
        font-size: 14px;
    }
    .catalog-dropdown { padding: 12px 0; }
    .catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    .catalog-item {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Hero */
    .hero { padding: 28px 0; margin-bottom: 20px; }
    .hero-content h1 { font-size: 22px; line-height: 1.25; }
    .hero-content p { font-size: 14px; margin-bottom: 16px; }
    .hero-visual { display: none; }
    .hero .btn-lg { padding: 12px 20px; font-size: 14px; }

    /* Sections */
    .section { padding: 20px 0; }
    .section-title { font-size: 18px; margin-bottom: 14px; }
    .section-header { margin-bottom: 14px; }

    /* Categories */
    .categories-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .category-card { padding: 14px 8px; }
    .category-card-icon { font-size: 28px; margin-bottom: 4px; }
    .category-card-name { font-size: 11px; }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card { border-radius: 10px; }
    .product-info { padding: 8px 10px; }
    .price-current { font-size: 15px; }
    .price-old { font-size: 12px; }
    .product-name { font-size: 12px; -webkit-line-clamp: 2; }
    .product-meta { font-size: 11px; }
    .product-rating { font-size: 11px; }
    .btn-add-cart {
        margin: 0 8px 8px;
        padding: 8px;
        font-size: 12px;
    }
    .btn-fav { opacity: 1; width: 32px; height: 32px; }
    .product-emoji { font-size: 48px; }
    .badge-discount, .badge-hit, .badge-new { font-size: 10px; padding: 2px 6px; }

    /* Promo */
    .promo-banners { gap: 10px; }
    .promo-banner { padding: 18px 16px; }
    .promo-banner h3 { font-size: 15px; }

    /* Catalog */
    .catalog-page { padding: 12px 0 28px; }
    .breadcrumbs { font-size: 12px; margin-bottom: 12px; }
    .catalog-sidebar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .filter-block { padding: 12px; margin-bottom: 0; }
    .filter-block h3 { font-size: 13px; margin-bottom: 8px; }
    .catalog-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }
    .catalog-title { font-size: 18px; }
    .catalog-title .count { display: block; margin-left: 0; margin-top: 2px; }
    .sort-select { width: 100%; }
    .sort-select select { flex: 1; width: 100%; }

    /* Product detail */
    .product-page { padding: 12px 0 28px; }
    .product-detail { padding: 16px; gap: 16px; }
    .product-title { font-size: 20px; }
    .product-prices-large { margin-bottom: 12px; }
    .price-current.large { font-size: 26px; }
    .product-img-placeholder.large { min-height: 260px; }
    .product-photo.large { min-height: 260px; max-height: 320px; }
    .product-emoji.large { font-size: 80px; }
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-add-cart-detail { width: 100%; min-width: 0; }
    .qty-selector { align-self: flex-start; }
    .product-weight-row {
        flex-direction: column;
        gap: 6px;
    }
    .product-delivery { padding: 12px; }

    /* Cart */
    .cart-page { padding: 12px 0 28px; }
    .page-title { font-size: 22px; margin-bottom: 16px; }
    .cart-item {
        position: relative;
        grid-template-columns: 64px 1fr;
        grid-template-areas:
            "img info"
            "img qty"
            "img price";
        gap: 8px 12px;
        padding: 12px;
        padding-right: 40px;
    }
    .cart-item-image { grid-area: img; }
    .cart-item-info { grid-area: info; }
    .cart-item-qty { grid-area: qty; justify-self: start; }
    .cart-item-price { grid-area: price; text-align: left; min-width: 0; }
    .cart-item-remove {
        position: absolute;
        top: 8px;
        right: 6px;
    }
    .product-photo.small,
    .product-img-placeholder.small {
        width: 64px;
        height: 64px;
    }
    .summary-card { position: static; border-radius: 14px; }
    .summary-card > h3 { padding: 14px 16px; font-size: 16px; }
    .checkout-form { padding: 16px; }
    .checkout-form #checkoutBtn { padding: 14px; font-size: 15px; }
    .checkout-form .summary-total { font-size: 18px; }

    /* Footer */
    .footer { padding: 32px 0 20px; margin-top: 24px; }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    /* Toast */
    .toast {
        left: 12px;
        right: 12px;
        bottom: 16px;
        transform: translateY(100px);
        width: auto;
        text-align: center;
    }
    .toast.show { transform: translateY(0); }
}

/* Small phones */
@media (max-width: 480px) {
    .categories-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .category-card { padding: 10px 4px; }
    .category-card-icon { font-size: 24px; }
    .category-card-name { font-size: 10px; }

    .products-grid { gap: 8px; }
    .product-emoji { font-size: 40px; }
    .price-current { font-size: 14px; }
    .btn-add-cart { font-size: 11px; padding: 7px; }

    .hero-content h1 { font-size: 20px; }
    .logo-text { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .footer-grid { grid-template-columns: 1fr; gap: 16px; }

    .catalog-grid { grid-template-columns: 1fr; }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .btn-fav { opacity: 1; }
    .product-card:hover { transform: none; }
    .category-card:hover { transform: none; }
    .btn, .qty-btn, .header-action, .catalog-btn {
        min-height: 40px;
    }
    .qty-btn { min-width: 40px; }
}


/* ===== Product photos ===== */
.product-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-photo.large {
    width: 100%;
    min-height: 400px;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--wb-radius);
}
.product-photo.small {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--wb-radius-sm);
}
.product-image img.product-photo {
    aspect-ratio: 1;
}
