/* ===== ОБЩИЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ШАПКА ===== */
.site-header {
    background-color: #000000;
    border-bottom: 1px solid #222;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.brand-title {
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 1.5rem;
    margin: 0;
}

.brand-tagline {
    color: #aaaaaa;
    font-weight: 300;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: #aaaaaa;
}

.header-actions {
    display: flex;
    align-items: center;
}

.cart-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.cart-count {
    background-color: #fff;
    color: #000;
    font-size: 0.7rem;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 90vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
}

.hero-slogan {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.hero-btn {
    font-size: 1.2rem;
    padding: 1rem 2.5rem;
}

/* ===== СЕКЦИИ ===== */
.section-title {
    font-size: 2rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.catalog-section {
    padding: 4rem 0;
}

.about-section, .delivery-section, .contacts-section {
    padding: 4rem 0;
    border-top: 1px solid #222;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    color: #ccc;
}

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.delivery-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.delivery-card h3 {
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.delivery-card p {
    color: #aaa;
    font-size: 0.9rem;
}

.contacts-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    width: 30px;
    font-size: 1.3rem;
    color: #fff;
}

.contact-item a {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dotted #555;
    transition: border-color 0.2s;
}

.contact-item a:hover {
    border-bottom-color: #fff;
}

/* ===== ФУТЕР ===== */
.site-footer {
    background-color: #000000;
    border-top: 1px solid #222;
    color: #aaaaaa;
    padding: 2rem 0;
    text-align: center;
    flex-shrink: 0;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand h3 {
    color: #ffffff;
    font-weight: 300;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer-social p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #aaa;
}

.footer-info p {
    font-size: 0.8rem;
    margin: 0.25rem 0;
}

.fa-heart {
    color: #ff4d4d;
}

/* ===== СЕТКА ТОВАРОВ ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.product-card {
    display: flex;
    flex-direction: column;
    background-color: #111111;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #444;
    box-shadow: 0 10px 20px rgba(255,255,255,0.05);
}

.product-link {
    flex: 1;
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    background-color: #1a1a1a;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.02);
}

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

.product-name {
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #ffffff;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
    color: #dddddd;
}

.buy-btn {
    width: calc(100% - 24px);
    margin: 0 12px 16px 12px;
    padding: 10px 0;
    background-color: #fff;
    color: #000;
    border: none;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buy-btn:hover {
    background-color: #000;
    color: #fff;
    border: 1px solid #fff;
}

/* ===== СТРАНИЦА ТОВАРА ===== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

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

.product-gallery-img,
.product-gallery-video {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    background-color: #1a1a1a;
    border: 1px solid #222;
    cursor: pointer;
    transition: transform 0.2s;
}

.product-gallery-img:hover,
.product-gallery-video:hover {
    transform: scale(1.02);
}

.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    font-size: 2rem;
    font-weight: 300;
    margin: 0;
    color: #ffffff;
}

.product-price-detail {
    font-size: 1.8rem;
    font-weight: 500;
    color: #dddddd;
    margin: 0;
}

.product-description h3,
.size-constructor h3 {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 10px;
    color: #ffffff;
}

.product-description p {
    color: #cccccc;
    line-height: 1.6;
}

.size-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.size-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.size-field label {
    font-size: 0.9rem;
    color: #aaaaaa;
}

.size-input,
.size-select {
    background-color: #111111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    color: #ffffff;
    font-size: 1rem;
    width: 100%;
    font-family: inherit;
}

.size-select {
    cursor: pointer;
}

.size-select option {
    background-color: #111111;
    color: #ffffff;
}

.size-input:focus,
.size-select:focus {
    outline: none;
    border-color: #555;
}

.size-hint {
    font-size: 0.85rem;
    color: #888888;
    margin-top: 5px;
}

.order-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    margin-top: 20px;
}

/* ===== МОДАЛЬНЫЕ ОКНА (ТЁМНЫЕ) ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #333;
    max-width: 500px;
    width: 90%;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #aaa;
}
.close-modal:hover {
    color: #fff;
}

.modal-header h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.modal-subtitle {
    margin-bottom: 1.5rem;
    color: #cccccc;
}

.size-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.size-option {
    background-color: #222;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}
.size-option:hover {
    background-color: #333;
}
.size-option.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.size-guide-hint a {
    color: #aaa;
    text-decoration: underline;
    cursor: pointer;
}
.size-guide-hint a:hover {
    color: #fff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Стили для двух кнопок в модалке выбора размера */
.size-actions {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.confirm-cart-btn, .confirm-buy-btn {
    min-width: 140px;
}

/* ===== РАЗМЕРНАЯ СЕТКА ===== */
.size-guide-table {
    margin: 1rem 0;
}
.size-guide-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.size-guide-table th,
.size-guide-table td {
    border: 1px solid #333;
    padding: 0.75rem;
    text-align: center;
}
.size-guide-table th {
    background-color: #1a1a1a;
    font-weight: 500;
}
.size-guide-note {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
}

/* ===== КОРЗИНА ===== */
.cart-items-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cart-item-info {
    flex: 2;
}

.cart-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cart-item-actions button {
    background: #222;
    border: 1px solid #444;
    color: white;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.cart-item-actions button:hover {
    background: #333;
}

.cart-item-remove {
    background: none !important;
    border: none !important;
    color: #ff4444 !important;
}
.cart-item-remove:hover {
    color: #ff8888 !important;
}

.cart-item-total {
    min-width: 80px;
    text-align: right;
}

.cart-total {
    text-align: right;
    font-size: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

.order-summary .summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

/* ===== КНОПКИ ===== */
.btn-primary {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-size: 1rem;
}
.btn-primary:hover {
    background-color: #000000;
    color: #ffffff;
}
.btn-primary:disabled {
    opacity: 0.5;
    background-color: #666;
    color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #666;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-secondary:hover {
    background-color: #333;
    border-color: #fff;
}

/* ===== ФОРМА ОПЛАТЫ ===== */
.payment-form input,
.payment-form textarea,
.payment-form select {
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    width: 100%;
    font-family: inherit;
}
.payment-form input:focus,
.payment-form textarea:focus,
.payment-form select:focus {
    border-color: #fff;
    outline: none;
}
.payment-form select option {
    background-color: #222;
    color: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.form-hint {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.25rem;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.payment-method {
    display: flex;
    align-items: center;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    background-color: #1a1a1a;
}
.payment-method input[type="radio"] {
    width: auto;
    margin-right: 1rem;
    accent-color: #fff;
}
.payment-method-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.payment-icon {
    width: 32px;
    height: 32px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.payment-title {
    font-weight: 500;
    color: #fff;
}
.payment-description {
    font-size: 0.8rem;
    color: #aaa;
    display: block;
}
.form-notice {
    background-color: #1a1a1a;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #ccc;
    margin: 1rem 0;
    border: 1px solid #333;
}

.sbp-hint {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #1a1a1a;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #ccc;
    text-align: center;
}

/* ===== SUCCESS MODAL ===== */
.success-modal {
    text-align: center;
}
.success-icon {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}
.success-modal h3 {
    color: #fff;
}
.success-modal p {
    color: #ccc;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
}
.loading-spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-left-color: #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== LIGHTBOX С ПЕРЕЛИСТЫВАНИЕМ ===== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.2s;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 2001;
    background: none;
    border: none;
    font-weight: 300;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    z-index: 2001;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .hero-slogan {
        font-size: 2rem;
    }
    .main-nav ul {
        gap: 1rem;
    }
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .product-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        padding: 0.5rem;
    }
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .product-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .products-grid {
        gap: 16px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .delivery-grid {
        grid-template-columns: 1fr;
    }
}