/* Telegram Mini App — стиль Burger King */

:root {
    --bg: #F7F4EF;
    --card-bg: #FFFFFF;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 16px;
    --primary: #D62300;
    --primary-hover: #b91d00;
    --text: #1a1a1a;
    --text-muted: #666;
    --border: #e8e4df;
    --success: #22c55e;
    --error: #ef4444;
}

* {
    box-sizing: border-box;
}

body.mini-app {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 16px;
}

#mini-root {
    min-height: 100vh;
}

/* Header */
.mini-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.2s;
}
.back-link:hover, .back-link:active {
    background: var(--bg);
}

.mini-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.mini-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    flex: 1;
}

/* Banners carousel */
.banners-carousel {
    position: relative;
    height: 120px;
    overflow: hidden;
    background: var(--card-bg);
    margin: 0 16px;
    margin-top: 12px;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.banners-track {
    display: flex;
    transition: transform 0.4s ease;
    height: 100%;
}

.banner-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.banner-title-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    z-index: 10;
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.banners-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.banner-dot.active {
    background: var(--primary);
    width: 20px;
    border-radius: 3px;
}

/* Categories */
.categories-nav {
    position: sticky;
    top: 60px;
    z-index: 90;
    background: var(--bg);
    padding: 8px 0;
    overflow: hidden;
}

.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    white-space: nowrap;
    flex-wrap: nowrap;
}
.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: all 0.2s;
}
.category-tab:hover {
    transform: scale(1.02);
}
.category-tab.active {
    background: var(--primary);
    color: white;
}

/* Products grid */
.products-grid {
    perspective: 1000px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: fadeInUp 0.3s ease;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-card:active {
    transform: scale(0.98) translateY(2px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg);
    position: relative;
    z-index: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}

.product-info {
    padding: 10px 12px;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-right: 40px; /* оставляем место под большую кнопку + */
}

.product-name {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.product-qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 1;
    transition: opacity 0.15s, transform 0.15s;
    transform-origin: left center;
    margin-left: auto;
}

.product-qty-control--empty {
    opacity: 0;
    pointer-events: none;
}

.product-qty-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 4px rgba(214,35,0,0.25);
}

.product-qty-btn--minus {
    font-size: 16px;
}

.product-qty-btn:active {
    transform: scale(0.94);
}

.product-qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}


.product-add-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, background 0.2s;
    box-shadow: 0 2px 8px rgba(214,35,0,0.3);
}
.product-add-btn:hover, .product-add-btn:active {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Product card with modifications — show "от" price, hint to tap */
.product-card--has-mods {
    cursor: pointer;
}
.product-price--mods {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Cart FAB */
.mini-footer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: transparent;
    box-shadow: none;
}

.cart-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(214,35,0,0.4);
    transition: transform 0.2s;
    pointer-events: auto;
}

.product-detail-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 600;
}

.product-detail-modal--open {
    display: flex;
}

.product-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.product-detail-dialog {
    position: relative;
    z-index: 1;
    max-width: 420px;
    width: 92%;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-detail-image-wrap {
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    background: #f3f3f3;
}

.product-detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-detail-body {
    padding: 16px 16px 8px;
    overflow-y: auto;
}

.product-detail-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.product-detail-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    margin: 0 0 16px;
}

.product-detail-modifications {
    margin-top: 16px;
    margin-bottom: 16px;
}

.modification-group {
    margin-bottom: 16px;
}

.modification-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.modification-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modification-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 2px solid transparent;
}

.modification-option:hover {
    background: #f0f0f0;
}

.modification-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
}

.modification-option input[type="radio"]:checked + .option-name {
    font-weight: 600;
}

.modification-option:has(input[type="radio"]:checked) {
    background: #fff3e0;
    border-color: #d62300;
}

.option-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.option-price {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.product-detail-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 16px;
}

.quantity-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d62300;
    background: #ffffff;
    color: #d62300;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.qty-btn:active {
    transform: scale(0.9);
    background: #fff3e0;
}

.qty-btn-minus {
    font-size: 20px;
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.product-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 16px;
    border-top: 1px solid #f0f0f0;
    gap: 12px;
}

.product-detail-price {
    font-size: 16px;
    font-weight: 600;
}

.product-detail-add-btn {
    flex: 0 0 auto;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #d62300;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.product-detail-add-btn:active {
    transform: scale(0.96);
}

.product-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.product-detail-close:active {
    transform: scale(0.9);
}
.cart-fab:hover {
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: white;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart page */
.cart-main {
    padding: 16px;
    padding-bottom: 100px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

.cart-item-info {
    flex: 1;
}
.cart-item-name {
    margin: 0 0 4px;
    font-weight: 600;
}
.cart-item-price {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-item-qty button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}
.cart-item-remove {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #fee2e2;
    color: var(--error);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-summary {
    margin-top: 24px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 16px;
}
.btn-checkout {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-checkout:hover {
    background: var(--primary-hover);
}

/* Checkout */
.checkout-main {
    padding: 16px;
    padding-bottom: 40px;
}

.checkout-form .form-group {
    margin-bottom: 16px;
}
.checkout-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--card-bg);
}
.checkout-form .form-hint {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.promo-row {
    display: flex;
    gap: 8px;
}
.promo-row input {
    flex: 1;
}

.scheduled-row {
    display: flex;
    gap: 12px;
}
.scheduled-row input[type="date"] {
    flex: 1;
}
.scheduled-row input[type="time"] {
    width: 110px;
    flex-shrink: 0;
}
.btn-promo-apply {
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.promo-message {
    margin: 6px 0 0;
    font-size: 0.85rem;
}
.promo-message.success {
    color: var(--success);
}
input.error,
textarea.error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.promo-message.error {
    color: var(--error);
}

.checkout-summary {
    margin: 24px 0;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.summary-row.total-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 1.1rem;
}
.text-success {
    color: var(--success);
}

.btn-submit {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover {
    background: var(--primary-hover);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.order-success {
    text-align: center;
    padding: 40px 20px;
}
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.order-success h2 {
    margin: 0 0 8px;
}
.btn-back-menu {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 24px;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.cart-empty a {
    color: var(--primary);
}


/* ====================== */
/* BOTTOM NAVIGATION BAR  */
/* ====================== */
.mini-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active svg {
    stroke: var(--primary);
}

.bottom-nav-cart-wrap {
    position: relative;
}

.bottom-nav-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bottom-nav-badge:empty,
.bottom-nav-badge[data-count="0"] {
    display: none;
}

/* Hide old FAB when bottom nav is present */
body.has-bottom-nav .cart-fab {
    display: none;
}

/* Adjust body padding for bottom nav */
body.has-bottom-nav {
    padding-bottom: 80px;
}


/* =================== */
/* SEARCH MODAL        */
/* =================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 64px;
    z-index: 450;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

body:not(.has-bottom-nav) .search-modal {
    bottom: 0;
}

.search-modal-header {
    padding: 12px 16px;
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.search-input-wrap svg {
    flex-shrink: 0;
}

.search-input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text);
    outline: none;
}

.search-close-btn {
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    padding-bottom: 80px;
}

.search-hint {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 8px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: transform 0.15s;
}

.search-result-item:active {
    transform: scale(0.98);
}

.search-result-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--bg);
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}


/* ====================== */
/* TOP PRODUCTS (HITS)    */
/* ====================== */
.top-products-section {
    padding: 16px 0 8px;
}

.top-products-title {
    margin: 0 0 12px;
    padding: 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
}

.top-products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.top-products-scroll::-webkit-scrollbar {
    display: none;
}

.top-product-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.top-product-card:active {
    transform: scale(0.96);
}

.top-product-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg);
}

.top-product-info {
    padding: 8px 10px;
}

.top-product-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.top-product-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.top-product-sold {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}


/* ====================== */
/* PROFILE PAGE           */
/* ====================== */
.profile-main {
    padding: 16px;
    padding-bottom: 100px;
}

.profile-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b35 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-name-section h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.profile-name-section p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-bonus-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: var(--radius);
    padding: 20px;
    color: white;
    margin-bottom: 16px;
}

.profile-bonus-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 4px;
}

.profile-bonus-amount {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-bonus-hint {
    font-size: 0.75rem;
    opacity: 0.5;
}

.profile-form-group {
    margin-bottom: 16px;
}

.profile-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.profile-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--bg);
    color: var(--text);
}

.profile-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(214, 35, 0, 0.1);
}

.profile-save-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.profile-save-btn:hover {
    background: var(--primary-hover);
}

.profile-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.profile-orders-section {
    margin-top: 8px;
}

.profile-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    padding: 0 4px;
}

.profile-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 8px;
}

.profile-order-id {
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-order-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.profile-order-status--new { background: #dbeafe; color: #1d4ed8; }
.profile-order-status--confirmed { background: #fef3c7; color: #92400e; }
.profile-order-status--preparing { background: #fed7aa; color: #9a3412; }
.profile-order-status--ready { background: #d1fae5; color: #065f46; }
.profile-order-status--issued { background: #e0e7ff; color: #3730a3; }

.profile-order-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.profile-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}
