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

:root {
    --primary-dark: #1F1B20;
    --primary-light: #FEFEFE;
    --accent-yellow: #FFED00;
    --background: #FEFEFE;
    --surface: #FEFEFE;
    --text-primary: #1F1B20;
    --text-secondary: #666666;
    --border-color: #E0E0E0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow: 0 4px 6px -1px rgba(31, 27, 32, 0.1), 0 2px 4px -1px rgba(31, 27, 32, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(31, 27, 32, 0.15), 0 4px 6px -2px rgba(31, 27, 32, 0.1);
    --gradient-primary: linear-gradient(135deg, #1F1B20 0%, #2a252f 100%);
    --gradient-accent: linear-gradient(135deg, #FFED00 0%, #FFD700 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
    padding-bottom: 20px;
    min-height: 100vh;
}

.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 80px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Header */
.header {
    background: var(--primary-dark);
    color: var(--primary-light);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    min-height: 76px;
}

.logo-container {
    height: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: 12px;
    padding: 8px 12px;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo {
    height: 100%;
    max-height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
}

.header h1, .header h2 {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    text-align: center;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    margin-right: 8px;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 24px;
    padding: 8px;
    transition: transform 0.2s;
    background: var(--accent-yellow);
    border-radius: 12px;
    color: var(--primary-dark);
    font-weight: bold;
}

.cart-icon:active {
    transform: scale(0.95);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--primary-dark);
    color: var(--accent-yellow);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
    border: 2px solid var(--accent-yellow);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Search Bar */
.search-bar {
    padding: 16px;
    background: transparent;
    position: relative;
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    font-size: 16px;
    background: var(--surface);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.search-bar input:focus {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 237, 0, 0.15), var(--shadow-lg);
    transform: translateY(-1px);
    background: #fff;
}

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

/* Categories */
.categories {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: transparent;
}

.category-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-dropdown-wrapper {
    position: relative;
    flex: 1;
    max-width: 100%;
}

.category-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
    outline: none;
}

.category-select:hover {
    border-color: var(--accent-yellow);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.category-select:focus {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 237, 0, 0.15), var(--shadow-lg);
}

.category-select option {
    padding: 12px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.category-dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 12px;
    transition: transform 0.3s;
}

.category-select:focus + .category-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
}

.product-card {
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    animation: fadeInUp 0.4s ease-out;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

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

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-yellow);
}

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

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
    padding: 8px;
    box-sizing: border-box;
}

.product-card:hover .product-image {
    opacity: 0.9;
}

/* Галерея изображений товара */
.product-gallery {
    width: 100%;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

.product-gallery-main {
    width: 100%;
    height: 320px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
    transition: opacity 0.3s ease-in-out;
}

.gallery-nav-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.gallery-nav-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-indicator {
    transition: all 0.2s;
    z-index: 10;
}

.gallery-thumbnail {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-thumbnail:hover {
    transform: scale(1.1);
    opacity: 1 !important;
}

.product-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scroll-behavior: smooth;
}

.product-gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.product-gallery-thumbnails::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: 2px;
}

.product-gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--accent-yellow);
    border-radius: 2px;
}

.product-info {
    padding: 14px;
    position: relative;
    z-index: 1;
    background: var(--surface);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-yellow);
    background: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 8px;
    margin-top: auto;
    letter-spacing: -0.5px;
    display: inline-block;
    align-self: flex-start;
    width: fit-content;
}

/* Product Details */
.product-details {
    padding: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.product-detail-image {
    width: 100%;
    height: 320px;
    object-fit: contain;
    border-radius: 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: block;
    box-shadow: var(--shadow-lg);
    padding: 16px;
    box-sizing: border-box;
    border: 2px solid var(--border-color);
}

.product-detail-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    white-space: normal;
}

.product-detail-price {
    font-size: 32px;
    font-weight: bold;
    color: var(--accent-yellow);
    background: var(--primary-dark);
    padding: 8px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: inline-block;
    box-shadow: var(--shadow);
}

.product-detail-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-primary);
}

.quantity-btn:hover {
    border-color: var(--accent-yellow);
    background: rgba(255, 237, 0, 0.1);
    transform: scale(1.1);
}

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

.quantity-value {
    font-size: 18px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background: var(--accent-yellow);
    color: var(--primary-dark);
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:active::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 237, 0, 0.4);
    background: #FFD700;
}

.add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

/* Cart */
.cart-content {
    padding: 16px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 18px;
    animation: fadeIn 0.5s ease-out;
}

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

/* Пустое состояние для товаров */
.empty-products {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    font-size: 18px;
    animation: fadeIn 0.5s ease-out;
}

.empty-products-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-products-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-products-text {
    font-size: 16px;
    color: var(--text-secondary);
}

.cart-item {
    background: var(--surface);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
    display: flex;
    gap: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.cart-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.cart-item-info {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    min-width: 0;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    white-space: normal;
}

.cart-item-price {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-yellow);
    background: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.cart-item-remove {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.cart-item-remove:active {
    transform: scale(0.95);
}

.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(254, 254, 254, 0.95);
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    padding: 16px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.total-price {
    color: var(--accent-yellow);
    background: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
}

.checkout-btn {
    width: 100%;
    padding: 18px;
    background: var(--accent-yellow);
    color: var(--primary-dark);
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.checkout-btn:active::before {
    width: 300px;
    height: 300px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 237, 0, 0.4);
    background: #FFD700;
}

.checkout-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.checkout-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Дополнительные улучшения */
.back-btn {
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.empty-cart {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px 20px;
    margin: 20px;
    box-shadow: var(--shadow);
    border: 2px dashed var(--border-color);
}

.product-detail-description {
    background: var(--surface);
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-yellow);
    box-shadow: var(--shadow);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    white-space: normal;
    overflow: hidden;
    line-height: 1.7;
}

.quantity-controls {
    background: var(--surface);
    padding: 12px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    justify-content: center;
}

.cart-footer {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.4s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* Улучшенные анимации загрузки */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Улучшенные hover эффекты */
.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 237, 0, 0.1), transparent);
    transition: left 0.5s;
}

.product-card:hover::after {
    left: 100%;
}

/* Улучшенная типографика */
.header h1, .header h2 {
    font-weight: 800;
    letter-spacing: -0.8px;
}

.product-name {
    font-weight: 700;
    line-height: 1.5;
}

/* Улучшенные пустые состояния */
.empty-cart {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    padding: 60px 20px;
    margin: 20px;
    box-shadow: var(--shadow);
}

.empty-cart p {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Улучшенная кнопка назад */
.back-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    padding: 10px 12px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-2px);
}

.back-btn:active {
    transform: translateX(-4px) scale(0.98);
}

/* Улучшенные карточки товаров в корзине */
.cart-item {
    position: relative;
}

.cart-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-yellow);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-item:hover::before {
    opacity: 1;
}

/* Улучшенная адаптивность */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .header {
        padding: 16px 24px;
    }
    
    .search-bar {
        padding: 20px 24px;
    }
    
    .categories {
        padding: 20px 24px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }
    
    .logo-container {
        min-width: 50px;
        min-height: 50px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-detail-price {
        font-size: 28px;
    }
    
    .cart-total {
        font-size: 18px;
        padding: 12px;
    }
    
    .total-price {
        font-size: 20px;
    }
    
    .category-label {
        font-size: 14px;
    }
    
    .category-select {
        font-size: 14px;
        padding: 10px 36px 10px 14px;
    }
    
    .category-dropdown-arrow {
        right: 12px;
        font-size: 10px;
    }
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Футер сайта */
.site-footer {
    background: var(--primary-dark);
    color: var(--primary-light);
    padding: 30px 20px 20px;
    margin-top: 40px;
    border-top: 3px solid var(--accent-yellow);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: var(--accent-yellow);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: rgba(254, 254, 254, 0.9);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(254, 254, 254, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-yellow);
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: rgba(254, 254, 254, 0.7);
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* Форма платежа */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 27, 32, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.payment-modal.active {
    display: flex;
}

.payment-modal-content {
    background: var(--surface);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--border-color);
    background: var(--primary-dark);
    border-radius: 20px 20px 0 0;
}

.payment-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin: 0;
}

.payment-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--primary-light);
    font-weight: bold;
}

.payment-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.payment-modal-close:active {
    transform: scale(0.95);
}

.payment-modal-body {
    padding: 24px;
}

.payment-form-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.form-field label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.field-optional {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 12px;
}

.form-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-yellow);
}

.field-required {
    color: #ff4444;
    font-weight: 700;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 237, 0, 0.15);
    transform: translateY(-1px);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.field-hint {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 6px;
    opacity: 0.7;
}

.form-field-required {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-yellow);
}

.form-field-required p {
    margin: 0;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.payment-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.payment-btn-cancel,
.payment-btn-submit {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-btn-cancel {
    background: var(--border-color);
    color: var(--text-primary);
}

.payment-btn-cancel:hover {
    background: #D0D0D0;
    transform: translateY(-1px);
}

.payment-btn-cancel:active {
    transform: translateY(0);
}

.payment-btn-submit {
    background: var(--accent-yellow);
    color: var(--primary-dark);
    box-shadow: var(--shadow-lg);
}

.payment-btn-submit:hover {
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 237, 0, 0.4);
}

.payment-btn-submit:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.payment-btn-submit:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

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

@media (max-width: 480px) {
    .payment-modal-content {
        max-width: 100%;
        margin: 10px;
    }
    
    .payment-modal-header {
        padding: 16px 20px;
    }
    
    .payment-modal-body {
        padding: 20px;
    }
    
    .payment-form-actions {
        flex-direction: column;
    }
    
    .payment-btn-cancel,
    .payment-btn-submit {
        width: 100%;
    }
}

/* Улучшенный фокус для доступности */
*:focus-visible {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Улучшенные тени для глубины */
.product-card {
    box-shadow: 0 2px 8px rgba(31, 27, 32, 0.08), 0 1px 3px rgba(31, 27, 32, 0.04);
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(31, 27, 32, 0.12), 0 4px 8px rgba(31, 27, 32, 0.08);
}

/* Улучшенная галерея */
.product-gallery-main {
    transition: transform 0.3s ease;
}

.product-gallery-main:hover {
    transform: scale(1.01);
}
