/* =====================================================
   Telegram Mini App - Дарибри Styles
   ===================================================== */

/* ==================== Pull to Refresh ==================== */
.pull-to-refresh {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-primary);
    transition: transform 0.2s ease;
    z-index: 100;
}

.pull-to-refresh.visible {
    transform: translateY(60px);
}

.pull-to-refresh.refreshing {
    transform: translateY(60px);
}

.ptr-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ptr-spin 0.8s linear infinite;
    opacity: 0;
}

.pull-to-refresh.refreshing .ptr-spinner {
    opacity: 1;
}

.ptr-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@keyframes ptr-spin {
    to { transform: rotate(360deg); }
}

/* ==================== Banners ==================== */
.banner-item {
    width: 100%;
    margin-bottom: 16px;
    border-radius: 12px;
    background: var(--bg-secondary);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.banner-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.banner-emoji {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    min-width: 0;
}

.banner-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.banner-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===================================================== */

:root {
    /* Основные цвета */
    --primary: #dbff00;
    --primary-dark: #b8d900;
    --primary-light: #e5ff33;
    --secondary: #7C3AED;
    --accent: #10B981;
    
    /* Нейтральные */
    --bg-primary: #fef7f3;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F3F4F6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    
    /* Градиенты */
    --gradient-primary: linear-gradient(135deg, #dbff00 0%, #e5ff33 100%);
    --gradient-warm: linear-gradient(135deg, #FBBF24 0%, #F472B6 100%);
    --gradient-fresh: linear-gradient(135deg, #34D399 0%, #60A5FA 100%);
    
    /* Тени */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Размеры */
    --header-height: 60px;
    --bottom-nav-height: 70px;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-xs: 8px;
    
    /* Анимации */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Telegram тема (переопределяется через JS) */
    --tg-theme-bg-color: #FFFFFF;
    --tg-theme-text-color: #1F2937;
    --tg-theme-hint-color: #6B7280;
    --tg-theme-link-color: #dbff00;
    --tg-theme-button-color: #dbff00;
    --tg-theme-button-text-color: #1F2937;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #111827;
        --bg-secondary: #1F2937;
        --bg-tertiary: #374151;
        --text-primary: #F9FAFB;
        --text-secondary: #D1D5DB;
        --text-muted: #9CA3AF;
        --border: #374151;
    }
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    /* Предотвращаем случайное закрытие при свайпе вниз */
    overscroll-behavior-y: none;
    overscroll-behavior: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    /* Предотвращаем случайное закрытие при свайпе вниз и pull-to-refresh */
    overscroll-behavior: none;
    overscroll-behavior-y: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* App Container */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-primary);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--header-height);
    background: #dbff00;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 16px;
}

.logo {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #000000;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    background-image: url('../images/icons/icon.png?v=4');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    /* Явно сбрасываем все свойства градиента текста для иконки */
    background-clip: border-box;
    -webkit-background-clip: border-box;
    -webkit-text-fill-color: unset;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #000000;
    transition: var(--transition);
}

.icon-btn:active {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}

.badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: #000000;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding-top: var(--header-height);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    /* Предотвращаем случайное закрытие при свайпе вниз */
    overscroll-behavior-y: none;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Categories Slider */
.categories-section {
    padding: 16px 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.categories-slider {
    display: flex;
    gap: 10px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-slider::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 6px;
    width: 80px;
    min-width: 80px;
    height: auto;
    min-height: 95px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.category-chip.active {
    background: var(--gradient-primary);
    color: white;
}

.category-chip:active:not(.active) {
    background: var(--border);
    transform: scale(0.95);
}

.chip-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    flex-shrink: 0;
    position: relative;
}

.category-chip > span:last-child {
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 1px 0;
    margin-top: 2px;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    display: block;
}

.category-chip.active > span:last-child {
    color: white;
}

.category-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.category-icon-emoji {
    font-size: 2.5rem;
    display: inline-block;
    line-height: 1;
}

/* Banner */
.banner-section {
    padding: 16px;
}

.banner {
    position: relative;
    padding: 24px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    color: white;
    overflow: hidden;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.banner h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.banner p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.banner-decoration {
    position: absolute;
    right: 16px;
    bottom: 8px;
    font-size: 4rem;
    opacity: 0.3;
}

/* Subcategories */
.subcategories-section {
    padding: 0 16px 16px;
}

.subcategories-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subcategory-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: left;
}

.subcategory-card:active {
    transform: scale(0.98);
    border-color: var(--primary);
}

.subcategory-icon {
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    position: relative;
}

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

.subcategory-icon-emoji {
    display: inline;
}

.category-icon-emoji {
    display: inline;
}

.subcategory-name {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    flex: 1;
}

/* Products Section */
.products-section {
    padding: 0 16px;
    /* Предотвращаем случайное закрытие при прокрутке */
    overscroll-behavior-y: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.filter-btn:active {
    background: var(--bg-tertiary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    /* Предотвращаем случайное закрытие при прокрутке */
    overscroll-behavior-y: none;
}

/* Product Card */
.product-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.product-image img,
.product-image video,
.product-single-image video,
.product-slider-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--border) 100%);
}

/* Product Card Slider */
.product-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.product-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.product-slider-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    display: block;
}

.product-slider-slide img,
.product-slider-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.product-slider-dots .slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.product-slider-dots .slider-dot.active {
    background: white;
    width: 20px;
    border-radius: 3px;
}

.product-single-image {
    width: 100%;
    height: 100%;
}

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

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.product-badge.trending {
    background: var(--gradient-warm);
    color: white;
}

.product-badge.discount {
    background: #EF4444;
    color: white;
}

.product-favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.product-favorite-btn.active {
    color: #EF4444;
}

.product-favorite-btn.active svg {
    fill: #EF4444;
}

.product-content {
    padding: 12px;
}

.product-name {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-shop-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.product-current-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.product-original-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--bottom-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
    z-index: 100;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: var(--transition);
}

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

.nav-item svg {
    width: 22px;
    height: 22px;
}

.nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
}

.modal:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: var(--transition-slow);
}

.modal:not([hidden]) .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Search Modal */
#searchModal {
    align-items: flex-start;
    padding-top: var(--header-height);
}

#searchModal .modal-content {
    border-radius: var(--border-radius);
    max-height: calc(100vh - var(--header-height) - 32px);
    transform: translateY(0);
}

.search-modal {
    padding: 16px;
    border-radius: var(--border-radius);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    color: var(--text-muted);
}

.search-input-wrapper input {
    flex: 1;
    background: none;
    font-size: 1rem;
    color: var(--text-primary);
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

.close-search {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.search-results {
    margin-top: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Product Modal */
.product-modal .modal-content {
    max-height: 95vh;
}

.product-detail {
    position: relative;
}

.product-gallery {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    overflow: hidden;
}

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

.product-gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.product-info {
    padding: 20px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 8px;
}

.product-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.favorite-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.favorite-btn.active {
    color: #EF4444;
    background: #FEE2E2;
}

.favorite-btn.active svg {
    fill: #EF4444;
}

.product-shop {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.product-price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
}

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

.product-discount {
    padding: 4px 8px;
    background: #EF4444;
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    padding: 4px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-primary);
    border-radius: 6px;
    transition: var(--transition);
}

.qty-btn:active {
    background: var(--border);
}

#qtyValue {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.add-to-cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.add-to-cart-btn:active {
    opacity: 0.9;
    transform: scale(0.98);
}

/* Page */
.page {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-primary);
    z-index: 150;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--bottom-nav-height);
    box-sizing: border-box;
}

.page[hidden] {
    display: none !important;
}

.page:not([hidden]):not([style*="display: none"]) {
    display: flex;
}


.page-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-height);
    padding: 0 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    z-index: 10;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

.page-header h1 {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 600;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.clear-cart-btn {
    color: #EF4444;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Cart Page */
.cart-items {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-xs);
    background: var(--bg-tertiary);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.cart-item-shop {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.cart-item-price {
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty button {
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-primary);
}

.cart-item-delete {
    color: #EF4444 !important;
    font-size: 0.8rem !important;
}

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.cart-summary {
    padding: 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.summary-row.discount {
    color: var(--accent);
}

.summary-row.total {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
}

.primary-btn {
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    margin-top: 20px;
}

/* Profile */
.profile-content {
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.profile-info h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-menu {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.profile-home-btn-section {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.profile-home-btn-section .settings-btn {
    width: 100%;
    margin-bottom: 8px;
}

.profile-home-btn-section .settings-hint {
    text-align: center;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

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

.menu-icon {
    font-size: 1.25rem;
}

.menu-item span:nth-child(2) {
    flex: 1;
}

.menu-item svg {
    color: var(--text-muted);
}

/* Orders List */
.orders-list {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.order-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-number {
    font-weight: 600;
}

.order-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.order-status.pending {
    background: #FEF3C7;
    color: #D97706;
}

.order-status.processing {
    background: #DBEAFE;
    color: #2563EB;
}

.order-status.delivered {
    background: #D1FAE5;
    color: #059669;
}

.order-items-preview {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.order-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.order-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.order-total {
    font-weight: 700;
}

.order-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Toast */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 400px;
}

.toast {
    padding: 14px 18px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--border-radius-xs);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #059669;
    color: white;
}

.toast.error {
    background: #EF4444;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* =====================================================
   My Shop Styles
   ===================================================== */

/* Shop Create Section */
.shop-create-section {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.shop-promo {
    text-align: center;
    padding: 30px 20px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    color: white;
    margin-bottom: 24px;
}

.promo-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.shop-promo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.shop-promo p {
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.5;
}

.promo-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.promo-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Shop Form */
.shop-form {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 24px;
}

.shop-form h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--border-radius-xs);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: none;
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.char-count {
    text-align: right;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Photo Upload */
.photo-upload {
    display: flex;
    justify-content: center;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.photo-preview:hover {
    border-color: var(--primary);
}

.photo-preview span {
    font-size: 2rem;
}

.photo-preview p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Photos Upload */
.product-photos-upload {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.photo-upload-item {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-xs);
    background: var(--bg-tertiary);
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.photo-upload-item.add-photo {
    border-style: dashed;
}

.photo-upload-item span {
    font-size: 1.5rem;
}

.photo-upload-item p {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Shop Dashboard */
.shop-dashboard {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.shop-info-card {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.shop-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.shop-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-details {
    flex: 1;
    min-width: 0;
}

.shop-details h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.shop-rating .stars {
    color: #FBBF24;
}

.shop-rating .reviews-count {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.shop-stats-row {
    display: flex;
    gap: 16px;
}

.shop-stats-row .stat {
    display: flex;
    flex-direction: column;
}

.shop-stats-row .stat-value {
    font-weight: 700;
    font-size: 1rem;
}

.shop-stats-row .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.edit-shop-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Subscription Card */
.subscription-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subscription-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.subscription-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.subscription-status.active {
    background: #D1FAE5;
    color: #059669;
}

.subscription-status.inactive {
    background: #FEE2E2;
    color: #EF4444;
}

.subscription-info {
    margin-bottom: 16px;
}

.plan-name {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.plan-expires {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.subscription-no-active {
    text-align: center;
    padding: 16px 0;
}

.subscription-no-active p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.subscription-no-active .hint {
    font-size: 0.8rem;
    margin-top: 4px;
}

.subscription-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.subscription-btn:active {
    background: var(--border);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.action-card:active {
    transform: scale(0.98);
    background: var(--bg-tertiary);
}

.action-icon {
    font-size: 2rem;
}

.action-card span:last-child {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.edit-shop-modal,
.subscription-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.add-product-modal {
    max-height: 90vh;
    overflow-y: auto;
}

.subscription-modal .modal-header {
    position: relative;
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Тестовый режим баннер */
.test-mode-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    margin: 0 -20px 20px -20px;
    border-bottom: 1px solid rgba(146, 64, 14, 0.1);
}

.test-mode-icon {
    font-size: 1.25rem;
}

.test-mode-text {
    font-size: 0.875rem;
    color: #92400E;
    font-weight: 500;
}

/* Текущая подписка */
.current-subscription-info {
    padding: 16px 20px;
    margin: 0 -20px 20px -20px;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.1) 0%, rgba(255, 107, 157, 0.05) 100%);
    border-bottom: 1px solid var(--border);
}

.current-subscription-header {
    margin-bottom: 12px;
}

.current-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.current-subscription-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.current-plan-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.current-plan-expires {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.edit-shop-modal .shop-form,
.add-product-modal .product-form {
    padding: 20px;
    background: transparent;
}

/* Plans List */
.plans-list {
    padding: 0 20px 20px;
    display: grid;
    gap: 16px;
}

.plan-card {
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.plan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    opacity: 0;
    transition: var(--transition);
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.plan-card:hover::before {
    opacity: 1;
}

.plan-card.current {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(255, 107, 157, 0.05) 100%);
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}

.plan-card.current::before {
    opacity: 1;
}

.plan-card.current::after {
    content: '✓ Текущий план';
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.plan-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.plan-price {
    text-align: right;
}

.plan-price .amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.plan-price .period {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.plan-price .price-per-day {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.plan-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.plan-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.feature-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.plan-feature::before {
    content: "✓";
    color: var(--accent);
    font-weight: 600;
}

.select-plan-btn {
    width: 100%;
    padding: 12px;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius-xs);
    font-weight: 500;
}

.plan-card.current .select-plan-btn {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Подтверждение подписки */
.subscription-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.subscription-confirm-modal .modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.subscription-confirm-modal .confirm-content {
    padding: 20px;
}

.subscription-confirm-modal .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.subscription-confirm-modal .confirm-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.confirm-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.confirm-plan-info {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    margin-bottom: 16px;
}

.confirm-plan-info .plan-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.confirm-plan-info .plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.confirm-plan-info .plan-duration {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.confirm-note {
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #FFC107;
    border-radius: var(--border-radius-xs);
    margin-bottom: 20px;
}

.confirm-note p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 4px 0;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.cancel-confirm-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.cancel-confirm-btn:hover {
    background: var(--border);
}

.confirm-subscribe-btn {
    flex: 2;
    padding: 12px;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

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

/* My Products List */
.my-products-list {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.my-product-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
}

.my-product-item:hover {
    box-shadow: var(--shadow-md);
}

.my-product-item.inactive {
    opacity: 0.7;
    border-color: var(--text-muted);
}

.my-product-item.out-of-stock {
    border-left: 3px solid var(--primary);
}

.my-product-image {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-xs);
    background: var(--bg-tertiary);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

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

.product-status-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    z-index: 2;
}

.product-status-badge.inactive-badge {
    background: rgba(156, 163, 175, 0.9);
}

.product-status-badge.stock-badge {
    background: rgba(239, 68, 68, 0.9);
}

.product-media-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.my-product-info {
    flex: 1;
    min-width: 0;
}

.my-product-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.my-product-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.trending-badge {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.my-product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.my-product-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}

.my-product-price.discount {
    color: var(--primary);
}

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

.my-product-stats {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.my-product-stats .text-danger {
    color: var(--primary);
    font-weight: 500;
}

.my-product-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn.edit-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.action-btn.status-btn:hover {
    background: #E0E7FF;
}

.action-btn.status-btn.active {
    background: #DBEAFE;
    border-color: #3B82F6;
}

.action-btn.delete-btn:hover {
    background: #FEE2E2;
    border-color: #EF4444;
}

/* Checkbox */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.checkbox-label input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Add Button in Header */
.add-btn {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   Add Product Form Styles
   ===================================================== */

.add-product-modal {
    max-height: 95vh;
}

.add-product-modal .product-form {
    padding: 0 20px 20px;
}

/* Media Upload Section */
.media-upload-section {
    background: var(--bg-tertiary);
    margin: 0 -20px;
    padding: 20px;
    margin-bottom: 20px;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 8px;
}

.photo-slot {
    aspect-ratio: 1;
    border-radius: var(--border-radius-xs);
    overflow: hidden;
    position: relative;
}

.photo-slot.add-photo-btn {
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.photo-slot.add-photo-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 157, 0.05);
}

.photo-slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 4px;
}

.photo-slot-icon {
    font-size: 1.5rem;
}

.photo-slot-text {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.photo-slot.preview {
    background: var(--bg-secondary);
}

.photo-slot.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-slot .remove-photo-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.photo-slot:hover .remove-photo-btn {
    opacity: 1;
}

.photo-slot .primary-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Video Upload */
.video-upload-area {
    border-radius: var(--border-radius-xs);
    overflow: hidden;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: var(--border-radius-xs);
    cursor: pointer;
    transition: var(--transition);
}

.video-placeholder:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 157, 0.05);
}

.video-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.video-text {
    font-weight: 500;
    margin-bottom: 4px;
}

.video-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.video-preview {
    position: relative;
    background: #000;
    border-radius: var(--border-radius-xs);
}

.video-preview video {
    width: 100%;
    max-height: 200px;
    border-radius: var(--border-radius-xs);
}

.remove-video-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Sections */
.form-section {
    margin-bottom: 24px;
}

.form-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-right: 40px;
}

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 500;
}

/* Discount Preview */
.discount-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: var(--border-radius-xs);
    margin-bottom: 16px;
}

.discount-preview .old-price {
    text-decoration: line-through;
    color: #92400E;
    font-size: 0.9rem;
}

.discount-preview .arrow {
    color: #92400E;
}

.discount-preview .new-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: #92400E;
}

.discount-preview .savings {
    margin-left: auto;
    padding: 4px 8px;
    background: #F59E0B;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Quantity Input */
.quantity-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    overflow: hidden;
}

.quantity-input-wrapper input {
    flex: 1;
    text-align: center;
    border-radius: 0;
    background: transparent;
    font-weight: 600;
    font-size: 1.1rem;
}

.qty-adjust-btn {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.qty-adjust-btn:active {
    transform: scale(0.95);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.cancel-btn {
    flex: 1;
    padding: 14px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

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

.form-actions .submit-btn {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn .btn-loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Char counter */
.char-count {
    text-align: right;
    display: block;
}

/* Скрытие элементов */
[hidden] {
    display: none !important;
}

/* =====================================================
   Subscription Management Page
   ===================================================== */

.subscription-management-content {
    padding: 20px;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

/* Текущая подписка */
.current-subscription-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.current-subscription-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.subscription-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.subscription-status-badge.active {
    background: #D1FAE5;
    color: #059669;
}

.subscription-status-badge.expired {
    background: #FEE2E2;
    color: #EF4444;
}

.subscription-status-badge.inactive {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.current-subscription-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.subscription-dates {
    margin-bottom: 20px;
}

.date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.date-row:last-child {
    border-bottom: none;
}

.date-row.highlight {
    background: var(--bg-tertiary);
    margin: 0 -24px;
    padding: 12px 24px;
    border-radius: var(--border-radius-xs);
}

.date-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.date-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.date-row.highlight .date-value {
    color: var(--primary);
    font-size: 1.1rem;
}

.subscription-progress {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.subscription-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: var(--border-radius-xs);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.action-btn.primary:active {
    opacity: 0.9;
    transform: scale(0.98);
}

.action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.action-btn.secondary:active {
    background: var(--border);
}

/* Лимиты */
.subscription-limits-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.subscription-limits-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.limit-item {
    margin-bottom: 20px;
}

.limit-item:last-child {
    margin-bottom: 0;
}

.limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.limit-name {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.limit-usage {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.limit-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.limit-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* История подписок */
.subscription-history-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.show-all-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
}

.show-all-btn:active {
    opacity: 0.7;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    border-left: 3px solid var(--border);
    transition: var(--transition);
}

.history-item.active {
    border-left-color: var(--accent);
    background: #F0FDF4;
}

.history-item.expired {
    border-left-color: var(--text-muted);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-plan-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.history-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.history-status.active {
    background: #D1FAE5;
    color: #059669;
}

.history-status.expired {
    background: #F3F4F6;
    color: var(--text-secondary);
}

.history-status.inactive {
    background: #FEE2E2;
    color: #EF4444;
}

.history-item-dates {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.history-item-payment {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    margin: 0;
    font-size: 0.95rem;
}

/* ========== Product Page Styles ========== */
.product-page-content {
    flex: 1;
    overflow-y: auto;
}

.header-favorite-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    padding: 0;
    cursor: pointer;
}

.header-favorite-btn.active {
    color: #EF4444;
}

.header-favorite-btn.active svg {
    fill: #EF4444;
}

/* ========== Product Gallery Slider ========== */
.product-gallery-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
}

.gallery-slides-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.gallery-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    position: relative;
}

.gallery-slide img,
.gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

.gallery-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gallery-nav-btn:hover {
    background: var(--bg-tertiary);
}

.gallery-dots {
    display: flex;
    gap: 6px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* ========== Product Stock ========== */
.product-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.stock-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stock-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.stock-value.in-stock {
    color: #059669;
}

.stock-value.low-stock {
    color: #F59E0B;
}

.stock-value.out-of-stock {
    color: #EF4444;
}

/* ========== Product Seller Card ========== */
.product-seller-card {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

/* Seller Products Section */
.seller-products-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.seller-products-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.seller-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.seller-product-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.seller-product-card:active {
    transform: scale(0.98);
}

.seller-product-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-tertiary);
    overflow: hidden;
}

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

.seller-product-info {
    padding: 12px;
}

.seller-product-name {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.seller-product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-product-current-price {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
}

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

.seller-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.seller-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.seller-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
}

.rating-stars {
    color: #FBBF24;
}

.rating-value {
    font-weight: 600;
    color: var(--text-primary);
}

.rating-count {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* ========== Shop Page ========== */
.shop-page-content {
    padding: 16px;
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
}

/* Shop Header Section */
.shop-header-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.shop-header-avatar {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
    overflow: hidden;
}

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

.shop-header-info {
    flex: 1;
    min-width: 0;
}

.shop-header-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.shop-header-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Shop Stats Section */
.shop-stats-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.shop-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.shop-stat-icon {
    font-size: 2rem;
    line-height: 1;
}

.shop-stat-info {
    flex: 1;
}

.shop-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.shop-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Shop Location Section */
.shop-location-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.shop-map-container {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.shop-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.shop-address {
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Shop Reviews Section */
.shop-reviews-section {
    margin-bottom: 24px;
}

.section-header-with-count {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.section-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.shop-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-review-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-author {
    font-weight: 500;
    color: var(--text-primary);
}

.review-rating {
    font-size: 0.875rem;
}

.review-comment {
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.review-verified {
    display: inline-block;
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 500;
}

.shop-reviews-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* Shop Products Section */
.shop-products-section {
    margin-bottom: 24px;
}

.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shop-products-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* ========== Checkout Modal ========== */
.checkout-modal {
    z-index: 10000;
}

.checkout-modal-content {
    max-width: 100%;
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
    padding: 0;
    overflow-y: auto;
}

.checkout-step {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100vh;
}

.checkout-progress {
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkout-step-content {
    flex: 1;
    padding: 20px;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

.checkout-step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.delivery-datetime-section {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Шаг 1: Телефон */
.phone-input-section {
    margin-bottom: 24px;
}

/* Telegram Phone Button - стилизована под стандартную кнопку Telegram */
.telegram-phone-btn {
    width: 100%;
    padding: 14px 20px;
    background: #3390EC; /* Стандартный синий цвет Telegram */
    color: #FFFFFF;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(51, 144, 236, 0.3);
}

.telegram-phone-btn:hover {
    background: #2B7FD9;
    box-shadow: 0 4px 12px rgba(51, 144, 236, 0.4);
}

.telegram-phone-btn:active {
    background: #246BB3;
    transform: scale(0.98);
}

.telegram-phone-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Старая версия (для совместимости) */
.telegram-phone-btn-old {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.telegram-phone-btn:active {
    transform: scale(0.98);
}

.phone-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
}

.phone-icon {
    font-size: 1.5rem;
}

.change-phone-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

.change-phone-btn:hover {
    background: var(--bg-secondary);
}

/* Ручной ввод телефона (fallback) */
.manual-phone-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.manual-phone-input .phone-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.manual-phone-input .phone-input:focus {
    border-color: var(--primary);
}

.manual-phone-input .confirm-phone-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.manual-phone-input .confirm-phone-btn:hover {
    background: var(--primary-dark, #0056b3);
}

/* Спиннер для загрузки */
.telegram-phone-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.telegram-phone-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Шаг 2: Адрес */
.delivery-map-container {
    width: 100%;
    height: 250px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.delivery-zone-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #FFF3CD;
    border: 1px solid #FFC107;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: #856404;
}

.delivery-zone-notice .notice-icon {
    font-size: 1.2rem;
}

.delivery-zone-notice strong {
    color: #856404;
    font-weight: 600;
}

.delivery-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.address-input-section {
    margin-bottom: 20px;
}

.address-input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.address-input-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.address-input-section input {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.address-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover {
    background: var(--bg-secondary);
}

.address-suggestion-item .suggestion-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.address-suggestion-item .suggestion-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.use-current-location-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.use-current-location-btn:active {
    background: var(--bg-secondary);
}

.address-details-section {
    margin-bottom: 24px;
}

.address-details-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.address-details-section input,
.address-details-section textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: inherit;
}

.address-details-section textarea {
    resize: vertical;
    min-height: 60px;
}

/* Шаг 3: Подтверждение */
.order-items-summary {
    margin-bottom: 24px;
}

.order-item-summary {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
    min-width: 0;
}

.order-item-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.order-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.order-item-price {
    font-weight: 600;
    color: var(--primary);
}

.order-info-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.order-info-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9375rem;
}

.info-label {
    color: var(--text-secondary);
}

.order-total-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9375rem;
}

.total-row.final {
    border-top: 1px solid var(--border);
    margin-top: 12px;
    padding-top: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.total-row.discount {
    color: #10b981;
}

.total-row.promo-discount {
    color: #7C3AED;
}

/* Промокод */
.promo-code-section {
    margin-bottom: 24px;
}

.promo-code-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.promo-code-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-xs);
    font-size: 0.9375rem;
    background: var(--bg-secondary);
    text-transform: uppercase;
}

.promo-code-input:focus {
    outline: none;
    border-color: var(--primary);
}

.promo-code-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-xs);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.promo-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.promo-code-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.promo-code-message {
    padding: 8px 12px;
    border-radius: var(--border-radius-xs);
    font-size: 0.875rem;
    margin-top: 8px;
}

.promo-code-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.promo-code-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.promo-code-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(124, 58, 237, 0.1);
    border-radius: var(--border-radius-xs);
    margin-top: 8px;
}

.promo-code-applied span {
    font-weight: 600;
    color: #7C3AED;
    text-transform: uppercase;
}

.promo-code-remove {
    background: none;
    border: none;
    color: #7C3AED;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.promo-code-remove:active {
    background: rgba(124, 58, 237, 0.2);
}

.checkout-next-btn,
.checkout-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.checkout-next-btn:disabled,
.checkout-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkout-next-btn:active:not(:disabled),
.checkout-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.back-to-step {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Shop Orders Page ========== */
.orders-filter-tabs {
    display: flex;
    gap: 8px;
    padding: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 16px;
}

.orders-filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.filter-tab:active {
    transform: scale(0.95);
}

.shop-orders-list {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shop-order-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid var(--border);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.order-number {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.order-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.order-customer-info {
    margin-bottom: 12px;
}

.order-customer-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.875rem;
}

.order-items-list {
    margin-bottom: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
}

.order-item-mini {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.875rem;
}

.order-item-mini .order-item-name {
    color: var(--text-primary);
}

.order-item-mini .order-item-price {
    color: var(--text-secondary);
    font-weight: 500;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.order-total {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.total-amount {
    color: var(--primary);
    font-size: 1.125rem;
}

.order-status-select {
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 140px;
}

.order-comment {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========== Shop Reviews Page ========== */
.reviews-stats-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 16px;
    border: 1px solid var(--border);
}

.reviews-stats-main {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.reviews-average-rating {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.reviews-stars-display {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.reviews-total-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.reviews-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-label {
    width: 50px;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.rating-bar-container {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.rating-count {
    width: 40px;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.shop-reviews-list-full {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.shop-review-card-full {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid var(--border);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.review-rating-display {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.review-comment {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.review-verified {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Filter Modal */
.filter-modal {
    padding: 0;
}

.filter-modal .modal-content {
    max-height: 85vh;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin-bottom: 0;
}

.filter-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; /* Фиксированный размер хедера */
    background: var(--bg-secondary);
}

.filter-modal .modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.filter-modal .close-modal {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.filter-modal .close-modal:active {
    background: var(--bg-tertiary);
}

.filter-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 0; /* Позволяет flex-элементу сжиматься */
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.price-range {
    display: flex;
    gap: 12px;
}

.price-range .input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-range .input-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.price-range input {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.price-range input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.filter-section .checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-section .checkbox-label:active {
    background: var(--border);
}

.filter-section .checkbox-label:last-child {
    margin-bottom: 0;
}

.filter-section .checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-section .checkbox-label span:not(.checkmark) {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.filter-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0) + var(--bottom-nav-height));
    border-top: 1px solid var(--border);
    flex-shrink: 0; /* Фиксированный размер футера */
    background: var(--bg-secondary);
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-bottom: 0;
}

.filter-modal .btn-secondary,
.filter-modal .btn-primary {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px; /* Минимальная высота для удобства нажатия */
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-modal .btn-secondary:active {
    background: var(--border);
}

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

.filter-modal .btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

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

/* ==================== Settings Page ==================== */

.settings-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.settings-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.settings-section .section-title {
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    margin: 0;
    color: var(--text-primary);
}

.settings-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

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

.settings-item .checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    width: 100%;
}

.settings-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-label {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.settings-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.settings-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9375rem;
    cursor: pointer;
}

.settings-btn svg {
    color: var(--text-muted);
}

/* Кнопка "Добавить на главный экран" */
.add-to-home-btn {
    width: 100%;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    border-radius: var(--border-radius-xs);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 8px;
}

.add-to-home-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-home-btn:active {
    transform: translateY(0);
}

.add-to-home-btn .btn-icon {
    font-size: 1.5rem;
}

.settings-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

.settings-save-btn {
    width: 100%;
    margin-top: 8px;
}

/* ==================== Help Page ==================== */

.help-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.help-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.help-section .section-title {
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    margin: 0;
    color: var(--text-primary);
}

.help-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

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

.help-item h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.help-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 8px 0;
}

.help-item ol,
.help-item ul {
    margin: 8px 0;
    padding-left: 20px;
}

.help-item li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 4px;
}

/* ==================== Shop Statistics Dashboard ==================== */

.statistics-period-selector {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.period-inputs {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.period-inputs .form-group {
    flex: 1;
    margin-bottom: 0;
}

.period-inputs .form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.period-inputs .form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius-xs);
    font-size: 0.875rem;
}

.period-quick-select {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.period-btn {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-xs);
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.period-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-dark);
}

.statistics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 2rem;
    line-height: 1;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.statistics-charts {
    display: grid;
    gap: 24px;
}

.chart-container {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.chart-container h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.chart-container canvas {
    max-height: 300px;
}

.statistics-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.statistics-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.statistics-empty .empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.statistics-empty h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.statistics-empty p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.help-item a {
    color: var(--primary);
    text-decoration: none;
}

.help-item a:hover {
    text-decoration: underline;
}

/* ==================== User Orders ==================== */

.user-orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
}

.user-order-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.user-order-card .order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.user-order-card .order-info {
    flex: 1;
}

.user-order-card .order-number {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.user-order-card .order-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-order-card .order-status-badge {
    padding: 6px 12px;
    border-radius: var(--border-radius-xs);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.user-order-card .order-shop {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.user-order-card .order-shop-label {
    color: var(--text-secondary);
}

.user-order-card .order-shop-name {
    color: var(--text-primary);
    font-weight: 500;
}

.user-order-card .order-items {
    margin-bottom: 12px;
}

.user-order-card .order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.user-order-card .order-item:last-child {
    border-bottom: none;
}

.user-order-card .order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius-xs);
    flex-shrink: 0;
}

.user-order-card .order-item-image-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-xs);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.user-order-card .order-item-info {
    flex: 1;
    min-width: 0;
}

.user-order-card .order-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.user-order-card .order-item-details {
    display: flex;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    align-items: center;
}

.user-order-card .order-item-total {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    align-self: flex-start;
}

.user-order-card .order-delivery {
    margin-bottom: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.user-order-card .order-delivery-info {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.user-order-card .order-delivery-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.user-order-card .order-delivery-address {
    color: var(--text-primary);
    flex: 1;
}

.user-order-card .order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

.user-order-card .order-total {
    display: flex;
    gap: 8px;
    align-items: center;
}

.user-order-card .order-total-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-order-card .order-total-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-modal .btn-secondary:hover {
    background: var(--border);
}

/* В ваши CSS файлы добавьте */
.phone-input-wrapper {
    margin-bottom: 24px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.phone-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--background);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.phone-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.phone-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.input-hint {
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkout-next-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.checkout-next-btn:disabled {
    background: var(--disabled);
    cursor: not-allowed;
    opacity: 0.6;
}

.checkout-next-btn:not(:disabled):hover {
    background: var(--primary-dark);
}