:root {
    --primary: #e3000f; /* Korzinka Red */
    --primary-hover: #c4000d;
    --yellow: #ffd100;
    --blue-badge: #8cc5e3;
    --bg: #ffffff;
    --surface: #ffffff; /* Use white for surface */
    --surface-alt: #f9f9f9; /* Off-white for cards */
    --text: #1e293b;
    --muted: #64748b;
    --border: #f0f0f0;
    --radius: 20px; /* Very round corners like Korzinka */
    --shadow: 0 8px 24px rgba(0,0,0,0.06);
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 2px solid var(--green);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    text-transform: lowercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-savat-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.savat-icon {
    display: block;
}

.logo-mark {
    /* Using SVG icon in HTML, removing circle */
    display: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.15s;
}

.nav a svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

/* Language switcher */
.lang-switcher {
    margin: 0;
    flex-shrink: 0;
}

.lang-switcher-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-switcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: 0.15rem;
    color: var(--muted);
}

.lang-pill {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    min-width: 2.1rem;
    padding: 0.45rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.lang-pill:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.85);
}

.lang-pill.is-active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(227, 0, 15, 0.28);
}

.lang-pill:active {
    transform: scale(0.96);
}

.cart-link {
    /* Styles merged into .nav a */
}
.cart-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    min-width: 1.2rem;
    height: 1.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 0.3rem;
    position: absolute;
    top: -5px;
    right: -10px;
}
.nav a.has-badge {
    position: relative;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--green-light) 0%, var(--surface) 60%);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0;
}

.hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1.2;
}

.hero p {
    margin: 0 0 1.5rem;
    color: var(--muted);
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 999px; /* Pill shape */
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-white {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn-white:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
    font-weight: 600;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-red {
    background: var(--primary);
    color: white;
}

.btn-red:hover {
    background: var(--primary-hover);
}

/* Sections */
main {
    flex: 1;
    padding: 2.5rem 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-style: italic;
    font-weight: 800;
    color: var(--text);
}

.section-header a {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.section-header a:hover {
    text-decoration: underline;
}

/* Categories */
.category-grid {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.category-chip {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
    color: var(--muted);
    transition: all 0.15s;
}

.category-chip:hover,
.category-chip.active {
    border-color: var(--green);
    background: var(--green-light);
    color: var(--green-dark);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
}

.promo-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--blue-badge);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    z-index: 2;
}

.product-image-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    margin-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
}

.product-image-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.product-image-slider img {
    flex: 0 0 100%;
    aspect-ratio: 1;
    object-fit: contain;
    scroll-snap-align: start;
    width: 100%;
}

.product-image-slider .no-image,
.product-image-slider .product-placeholder {
    flex: 0 0 100%;
    aspect-ratio: 1;
    scroll-snap-align: start;
    width: 100%;
}

.product-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
    border-radius: 16px;
    border: 1px dashed #dbe3ec;
    text-align: center;
}

.product-placeholder-icon {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.product-placeholder-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-detail-image .product-placeholder {
    width: 100%;
    min-height: 280px;
    border-radius: var(--radius);
}

.discount-card .product-image {
    background: #fff5f5;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: stretch;
}

.discount-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.discount-card .product-image .product-placeholder {
    width: 100%;
    border: none;
    border-radius: 0;
    background: linear-gradient(145deg, #fff8f8 0%, #fff0f0 100%);
}

.empty-savat-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
    opacity: 0.85;
}

.price-bubble {
    position: absolute;
    bottom: -1rem;
    right: -0.5rem;
    background: var(--yellow);
    width: 75px;
    height: 75px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--primary);
    font-weight: 800;
    line-height: 1.1;
    z-index: 3;
}

.price-bubble .old-price {
    font-size: 0.65rem;
    text-decoration: line-through;
    color: #a08c00;
    margin-bottom: -2px;
}

.price-bubble .new-price {
    font-size: 1.1rem;
}

.discount-bubble {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 2px solid var(--surface-alt);
}

.product-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1rem;
    flex: 1;
}

.product-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

.product-volume {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.product-actions {
    margin-top: auto;
}

.btn-buy {
    width: 100%;
    background: white;
    color: var(--text);
    border: none;
    padding: 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-buy:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Search & Forms */
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-bar input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    outline: none;
    background: var(--surface);
}

.search-bar input:focus {
    border-color: var(--green);
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    background: var(--surface);
    transition: all 0.2s ease;
    color: var(--text);
}

.form-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Product detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.product-detail-image {
    aspect-ratio: 1;
    background: var(--green-light);
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    font-size: 5rem;
    color: var(--green);
    overflow: hidden;
    border: 1px solid var(--border);
}

.product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    color: var(--green-dark);
}

.detail-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--red);
    margin: 1rem 0;
}

.detail-price span {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
}

.detail-desc {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.stock-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--green-light);
    color: var(--green-dark);
    margin-bottom: 1.5rem;
}

/* Cart */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-total {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

.cart-total-label {
    font-size: 1.1rem;
    color: var(--muted);
}

.cart-total-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--red);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.empty-state h2 {
    color: var(--green-dark);
    margin-bottom: 0.5rem;
}

.qty-input {
    width: 60px;
    padding: 0.35rem 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    pointer-events: auto;
    animation: toast-in 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
}

.toast-hide {
    animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(1.5rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(1.5rem);
    }
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}

.toast-success .toast-icon {
    background: #dcfce7;
    color: #16a34a;
}

.toast-success {
    border-left: 4px solid #16a34a;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast-warning {
    border-left: 4px solid #d97706;
}

.toast-error .toast-icon,
.toast-info .toast-icon {
    background: #fee2e2;
    color: var(--primary);
}

.toast-error,
.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-text {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text);
    padding-top: 0.15rem;
}

.toast-close {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.toast-close:hover {
    background: var(--surface-alt);
    color: var(--text);
}

@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 5.5rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
    }

    .toast {
        border-radius: 12px;
    }

    @keyframes toast-in {
        from {
            opacity: 0;
            transform: translateY(1rem);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes toast-out {
        from {
            opacity: 1;
            transform: translateY(0);
        }
        to {
            opacity: 0;
            transform: translateY(1rem);
        }
    }
}

/* Legacy messages (fallback) */
.messages {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.message.success {
    background: var(--green-light);
    color: var(--green-dark);
    border-left: 3px solid var(--green);
}

.message.info,
.message.error,
.message.warning {
    background: var(--red-light);
    color: var(--red-dark);
    border-left: 3px solid var(--red);
}

/* Footer */
.site-footer {
    background: var(--green-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-brand {
    font-weight: 700;
    font-size: 1rem;
}

.footer-text {
    font-size: 0.85rem;
    opacity: 0.75;
}

.footer-contact {
    text-align: right;
    font-size: 0.85rem;
}

.footer-contact a {
    color: #a8e6c0;
}

/* Page headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.75rem;
    color: var(--green-dark);
}

.page-subtitle {
    margin: 0;
    color: var(--muted);
}

/* About */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.info-card h3 {
    margin: 0 0 0.5rem;
    color: var(--green-dark);
    font-size: 1rem;
}

.info-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.about-text {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
    padding: 1.5rem;
    color: var(--muted);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.contact-card h3 {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--green);
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

a.contact-value:hover {
    color: var(--green);
}

.contact-note {
    text-align: center;
    color: var(--muted);
    padding: 1.5rem;
    background: var(--green-light);
    border-radius: var(--radius);
}

.contact-note a {
    color: var(--red);
    font-weight: 600;
}

/* Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.checkout-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.checkout-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: 5rem;
}

.checkout-summary h3 {
    margin: 0 0 1rem;
    color: var(--green-dark);
}

.checkout-items {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.checkout-items li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--red);
    padding-top: 0.75rem;
    border-top: 2px solid var(--green);
}

/* Success */
.success-box {
    text-align: center;
    max-width: 480px;
    margin: 2rem auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

.success-box h1 {
    margin: 0 0 0.75rem;
    color: var(--green-dark);
    font-size: 1.5rem;
}

.success-box p {
    color: var(--muted);
    margin: 0.35rem 0;
}

.success-details {
    text-align: left;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--green-light);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.success-details div {
    padding: 0.35rem 0;
}

.success-details span {
    color: var(--muted);
    display: inline-block;
    min-width: 70px;
}

/* ---- Discount section styles ---- */
.discount-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.discount-fire {
    font-size: 1.5rem;
}

.discount-badge-count {
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.discount-card {
    position: relative;
    border: 2px solid #ffe0e0;
}

.discount-label {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    z-index: 2;
}

.discount-prices {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-top: 0.5rem;
}

.price-old {
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: line-through;
}

.price-new {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

/* Profile Layout */
.profile-card {
    background: var(--surface-alt);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.profile-user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(227, 0, 15, 0.2);
    text-transform: uppercase;
}

.profile-details h1 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text);
}

.profile-details p {
    margin: 0.2rem 0 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.orders-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */

/* Cart card actions */
.cart-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Mobile cart cards - hidden on desktop */
.cart-cards {
    display: none;
}

/* Desktop cart table - visible on desktop */
.cart-table-wrapper {
    display: block;
}

/* Remove button in mobile cards */
.cart-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
    padding: 0.35rem;
    display: flex;
    align-items: center;
}

.cart-remove-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Bottom Navigation - hidden on desktop */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {

    /* Body padding to account for fixed bottom nav */
    body {
        padding-bottom: 80px;
    }

    /* Container: tighter padding on mobile */
    .container {
        width: 100%;
        padding: 0 1rem;
    }

    /* ---- HEADER ---- */
    .header-inner {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.1rem;
        gap: 0.4rem;
    }

    .logo svg {
        width: 24px !important;
        height: 24px !important;
    }

    /* Hide desktop nav on mobile */
    .desktop-nav {
        display: none !important;
    }

    .lang-switcher {
        margin-left: auto;
    }

    .lang-switcher-inner {
        padding: 0.15rem;
    }

    .lang-switcher-icon {
        display: none;
    }

    .lang-pill {
        font-size: 0.68rem;
        min-width: 1.9rem;
        padding: 0.4rem 0.5rem;
    }

    /* ---- HERO ---- */
    .hero {
        padding: 1.5rem 0;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    /* ---- PRODUCT GRIDS ---- */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-card .product-name {
        font-size: 0.85rem;
    }

    .product-card .product-price {
        font-size: 1rem;
    }

    /* ---- CATEGORY CHIPS ---- */
    .category-filters {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .category-chip {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* ---- PRODUCT DETAIL ---- */
    .product-detail {
        grid-template-columns: 1fr;
    }

    /* ---- CART TABLE ---- */
    .cart-table {
        display: block;
        overflow-x: auto;
        font-size: 0.85rem;
    }

    /* ---- CHECKOUT ---- */
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }

    /* ---- CART: Switch to card layout on mobile ---- */
    .cart-table-wrapper {
        display: none; /* Hide table on mobile */
    }

    .cart-cards {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .cart-card {
        background: var(--surface-alt);
        border-radius: 16px;
        padding: 1rem 1.1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        box-shadow: var(--shadow);
    }

    .cart-card-info {
        flex: 1;
        min-width: 0;
    }

    .cart-card-name {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text);
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cart-card-cat {
        font-size: 0.75rem;
        color: var(--muted);
        margin-top: 0.1rem;
    }

    .cart-card-price {
        font-size: 0.8rem;
        color: var(--muted);
        margin-top: 0.25rem;
    }

    .cart-card-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.4rem;
        flex-shrink: 0;
    }

    .cart-qty-form {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .cart-qty-form .qty-input {
        width: 48px;
        padding: 0.3rem 0.4rem;
        font-size: 0.9rem;
    }

    .cart-qty-form .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .cart-card-subtotal {
        font-weight: 800;
        color: var(--primary);
        font-size: 1rem;
    }

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

    .cart-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* ---- FOOTER ---- */
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        text-align: center;
    }

    /* ---- PROFILE CARD ---- */
    .profile-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .profile-card .btn-outline {
        width: 100%;
        justify-content: center;
    }

    /* ============================================
       MOBILE BOTTOM NAVIGATION BAR
       ============================================ */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
        z-index: 999;
        align-items: stretch;
        height: 64px;
    }

    .mobile-bottom-nav .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #94a3b8;
        font-size: 0.68rem;
        font-weight: 500;
        gap: 3px;
        padding: 0 4px;
        transition: color 0.2s;
        min-width: 0;
    }

    .mobile-bottom-nav .nav-item svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

    .mobile-bottom-nav .nav-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    .mobile-bottom-nav .nav-item.active {
        color: var(--primary);
    }

    /* Center FAB wrapper - takes up the center slot */
    .mobile-bottom-nav .center-fab-wrapper {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* The floating cart button */
    .mobile-bottom-nav .center-fab {
        position: absolute;
        bottom: 8px;
        width: 56px;
        height: 56px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(227, 0, 15, 0.45);
        border: 3px solid #fff;
        text-decoration: none;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .mobile-bottom-nav .center-fab:active {
        transform: scale(0.94);
    }

    .mobile-bottom-nav .center-fab svg {
        width: 26px;
        height: 26px;
        stroke: #fff;
        fill: none;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
        margin: 0;
    }

    /* Cart item count badge on the FAB */
    .cart-badge-mobile {
        position: absolute;
        top: -2px;
        right: -2px;
        background: var(--yellow);
        color: #1e293b;
        font-size: 0.65rem;
        font-weight: 800;
        min-width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-qty-form {
        display: flex;
        align-items: center;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .mobile-bottom-nav .nav-item {
        font-size: 0.62rem;
    }

    .mobile-bottom-nav .nav-item svg {
        width: 20px;
        height: 20px;
    }
}

/* ==== UZUM STYLE CATEGORY LIST ==== */
.uzum-category-container {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    margin-bottom: 2rem;
}

.uzum-category-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.uzum-category-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.uzum-category-item:last-child {
    border-bottom: none;
}

.uzum-category-item:hover,
.uzum-category-item.active {
    background: var(--surface-alt);
    color: var(--primary);
}

.uzum-category-icon {
    font-size: 1.25rem;
    width: 2rem;
    display: inline-flex;
    justify-content: center;
    margin-right: 0.5rem;
}

.uzum-category-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.uzum-category-arrow {
    color: var(--muted);
    font-size: 0.9rem;
}

.uzum-category-item:hover .uzum-category-arrow,
.uzum-category-item.active .uzum-category-arrow {
    color: var(--primary);
}

/* ==== UZUM STYLE CATALOG MODAL ==== */
.catalog-modal-overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.catalog-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.catalog-modal-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background: var(--surface);
    overflow-y: auto;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.catalog-modal-overlay.show .catalog-modal-content {
    /* No transform needed, it just becomes visible with the overlay */
}

.catalog-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-weight: bold;
    font-size: 1.2rem;
}

.catalog-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
}

@media (max-width: 768px) {
    .catalog-modal-overlay {
        top: 60px;
        bottom: 64px; /* Stop before bottom nav */
        z-index: 998; /* Below the bottom nav */
    }
    .catalog-modal-content {
        width: 100%;
    }
}

/* Banners */
.banner-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
}
.banner-carousel::-webkit-scrollbar {
    display: none;
}
.banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: var(--surface-alt);
    aspect-ratio: 3 / 1;
    max-height: 400px;
}
.banner-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.banner-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}
.banner-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    /* Mobil: rasm o'z nisbatida, kesilmaydi */
    .banner-slide {
        aspect-ratio: auto;
        max-height: none;
        height: auto;
        background: transparent;
    }
    .banner-slide a,
    .banner-slide picture {
        height: auto;
    }
    .banner-img {
        width: 100%;
        height: auto;
        object-fit: unset;
    }
}

.load-more-wrap {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.catalog-pagination-wrap {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.catalog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}

.catalog-page-nav,
.catalog-page-num,
.catalog-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text, #111827);
    text-decoration: none;
}

.catalog-page-nav:hover,
.catalog-page-num:hover {
    background: var(--surface-alt, #f3f4f6);
}

.catalog-page-nav.is-disabled,
.catalog-page-ellipsis {
    color: var(--muted, #64748b);
}

.catalog-page-num.is-current {
    border: 2px solid var(--text, #111827);
    font-weight: 700;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 9rem;
    height: 3rem;
    padding: 0 1.75rem;
    border-radius: 999px;
    border: 2px solid var(--primary, #e31e24);
    background: #fff;
    color: var(--primary, #e31e24);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.load-more-btn:hover {
    background: var(--primary, #e31e24);
    color: #fff;
    transform: translateY(-1px);
}
