/* Дополнительные стили */

/* ========== НОВЫЕ СТИЛИ v38.0 ========== */

/* Промокод в checkout */
.promo-input-wrapper {
    display: flex;
    gap: 8px;
}

.promo-input-wrapper .form-input {
    flex: 1;
}

.btn-apply-promo {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-apply-promo:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-apply-promo:active {
    transform: translateY(0);
}

/* Чекбокс для баланса */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

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

.checkbox-label span {
    font-size: 14px;
}

/* Payment Proof Modal */
.payment-proof-modal .modal-content {
    max-width: 500px;
}

.payment-info-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.payment-info-box h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.payment-instruction {
    margin: 0 0 16px 0;
    opacity: 0.9;
    font-size: 14px;
    line-height: 1.5;
}

.payment-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    backdrop-filter: blur(10px);
}

.payment-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

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

.detail-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.payment-amount {
    font-size: 24px;
    color: #ffd700;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

.form-input-file {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.form-input-file:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.screenshot-preview {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.screenshot-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========== КОНЕЦ НОВЫХ СТИЛЕЙ ========== */

/* Поиск */
.search-page {
    padding: 16px;
}

.search-page .search-input-wrapper {
    margin-bottom: 16px;
}

.search-results-section {
    margin-bottom: 24px;
}

.recommendations-section {
    border-top: 2px solid var(--border);
    padding-top: 16px;
    margin-top: 24px;
}

.recommendations-section .section-header h2 {
    font-size: 16px;
    opacity: 0.8;
}

/* Кнопки в модальном окне продукта */
.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    border-top: 1px solid var(--border);
}

.btn-icon-large {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

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

.btn-icon-large.favorite {
    position: relative;
    overflow: visible;
}

.btn-icon-large.favorite i {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    display: block;
}

.btn-icon-large.favorite.active i {
    color: #ff1744 !important;
}

.btn-icon-large.favorite.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 23, 68, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: heartGlow 1.5s ease-in-out infinite;
    pointer-events: none;
}

.add-to-cart-detail {
    flex: 1;
}

/* Кнопка сохранения телефона */
.phone-input-wrapper button {
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
}

/* Кнопка подтверждения заказа */
#submitOrderBtn {
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 18px 24px !important;
    min-height: 60px;
}

/* Поисковые рекомендации */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-suggestions.hidden {
    display: none;
}

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

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

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

.suggestion-item:active {
    background: var(--active-bg);
}

.suggestion-item i {
    font-size: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.suggestion-item span {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

/* Цветовые переменные для темной темы */
[data-theme="dark"] .search-suggestions {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

[data-theme="dark"] .suggestion-item {
    border-bottom-color: #3a3a3a;
}

[data-theme="dark"] .suggestion-item:hover {
    background: #333333;
}

[data-theme="dark"] .suggestion-item:active {
    background: #3a3a3a;
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4444;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.offline-indicator i {
    font-size: 18px;
}

/* Telegram WebApp Body Class */
body.telegram-webapp {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Улучшенная анимация загрузчика */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loader i {
    font-size: 48px;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

.loader p {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Улучшенные модальные окна */
.modal-content {
    animation: modalSlideUp 0.3s ease-out;
}

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

/* Улучшенные тосты */
.toast {
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Остатки товара */
.product-stock {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-stock.low-stock {
    color: var(--error);
    font-weight: 600;
}

.product-stock i {
    font-size: 12px;
}

/* Расширенный профиль */
.profile-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.profile-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-title i {
    font-size: 18px;
    color: var(--primary);
}

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

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

.profile-info-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.profile-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.promo-input-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.promo-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--background);
    color: var(--text-primary);
    font-size: 14px;
}

.btn-apply-promo {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-contact-manager {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-contact-manager:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-contact-manager i {
    font-size: 20px;
}

/* Модальное окно деталей товара */
.product-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.product-detail-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail-content {
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.3s ease-out;
}

.product-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: var(--background);
}

.product-detail-body {
    padding: 20px;
}

.product-detail-header {
    margin-bottom: 16px;
}

.product-detail-brand {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.product-detail-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 8px 0;
}

.product-detail-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.product-detail-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 16px 0;
    padding: 8px 12px;
    background: var(--background);
    border-radius: var(--radius-sm);
}

.product-detail-description strong {
    color: var(--text-primary);
    font-size: 15px;
    display: block;
    margin-bottom: 8px;
}

/* Характеристики товара */
.product-characteristics {
    margin: 20px 0;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
}

.characteristics-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.characteristics-title i {
    font-size: 18px;
    color: var(--primary);
}

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

.characteristic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.characteristic-item i {
    font-size: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.char-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.char-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 2px;
}

.flavors-section {
    margin: 20px 0;
}

.flavors-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flavors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.flavor-option {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.flavor-option:hover {
    border-color: var(--primary);
    background: var(--background);
}

.flavor-option.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.1);
}

.flavor-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--background);
}

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

.flavor-stock {
    font-size: 11px;
    color: var(--text-secondary);
}

.flavor-stock.low {
    color: var(--error);
    font-weight: 600;
}

.flavor-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 4px;
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-add-to-cart-detail {
    flex: 1;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-add-to-cart-detail:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add-to-cart-detail:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
}

/* Кнопка быстрого добавления */
.product-card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon-small:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

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

.btn-quick-add {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 107, 0, 0);
    }
}

/* Быстрое добавление - информация о товаре */
.quick-add-product-info {
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    text-align: center;
}

.quick-add-brand {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.quick-add-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
}

