:root {
    --primary-color: #1a1a1a;
    --secondary-color: #5c5c5c;
    --accent-color: #e15c09;
    --accent-hover: #dd6706;
    --bg-color: #ffffff;
    --bg-secondary: #fafafa;
    --border-color: #e5e5e5;
    --text-primary: #1a1a1a;
    --text-secondary: #5c5c5c;
    --hover-color: #f5f5f5;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    --transition: all 0.25s ease;
    --radius: 10px;
    --radius-sm: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background: radial-gradient(ellipse 120% 100% at 50% 0%, #2d2d2d 0%, #1a1a1a 50%, #0f0f0f 100%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Шапка */
.header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}
.logo:hover {
    opacity: 0.8;
}

.header-tagline {
    font-size: 19px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-btn:hover {
    opacity: 0.7;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Основной контент */
.main {
    padding: 40px 0;
}

/* Информационный блок */
.info-block {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.info-content {
    max-width: 100%;
}

.info-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.info-text {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.discounts {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discount-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--accent-color);
}

.discount-label {
    font-size: 14px;
    color: var(--text-primary);
    flex-grow: 1;
}

.discount-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--bg-color);
    background-color: var(--accent-color);
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.discount-details {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

.price-struck {
    text-decoration: line-through;
}

/* Фильтры */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding: 24px;
    background-color: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.filter-select:hover {
    border-color: var(--text-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 0, 0, 0.08);
}

.product-image {
    width: 100%;
    height: 210px;
    object-fit: cover;
    background-color: var(--bg-secondary);
    display: block;
    cursor: zoom-in;
}

.product-info {
    padding: 20px 20px 12px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 8px;
}

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

.product-price {
    background-color: var(--accent-color);
    color: var(--bg-color);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.product-sizes {
    margin-bottom: 4px;
    flex-grow: 1;
}

.product-sizes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 4px;
}

.product-sizes-table td {
    padding: 2px;
    text-align: center;
    vertical-align: middle;
}

.size-btn {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    min-width: 36px;
    width: 100%;
    margin: 0;
}

.size-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.size-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-secondary);
}

.size-btn-selected {
    background-color: var(--accent-color) !important;
    color: var(--bg-color) !important;
    border-color: var(--accent-color) !important;
}

.size-quantity {
    color: var(--text-secondary);
    font-size: 11px;
    padding-top: 2px;
    padding-bottom: 2px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.add-to-cart-btn {
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

.add-to-cart-btn svg {
    width: 20px;
    height: 20px;
}

/* Сообщение об отсутствии результатов */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
}

/* Индикатор загрузки */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 18px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .logo {
        font-size: 24px;
    }

    .main {
        padding: 24px 0;
    }

    .info-block {
        padding: 20px;
        margin-bottom: 24px;
    }

    .info-title {
        font-size: 18px;
    }

    .info-text {
        font-size: 14px;
    }

    .discount-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .discount-label {
        width: 100%;
    }

    .filters {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .filter-group {
        min-width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 16px;
    }

    .product-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 13px;
    }

    .add-to-cart-btn {
        width: 40px;
        height: 40px;
    }
}

/* Лайтбокс */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.lightbox.is-open {
    display: flex;
    opacity: 1;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.lightbox-image {
    position: relative;
    z-index: 1;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Модальное окно корзины */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cart-overlay.is-open {
    display: flex;
    opacity: 1;
}

.cart-modal {
    background: var(--bg-color);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
}

.cart-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
}

.cart-close:hover {
    background: var(--border-color);
}

.cart-modal-title {
    font-size: 22px;
    font-weight: 700;
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cart-modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 24px;
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.cart-left {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cart-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-of-type {
    border-bottom: none;
}

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

.cart-item-brand {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-size {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

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

.cart-item-qty button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--text-primary);
    transition: var(--transition);
}

.cart-item-qty button:hover {
    background: var(--hover-color);
}

.cart-item-qty span {
    min-width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-item-remove {
    padding: 4px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: #c62828;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
    border-top: 2px solid var(--border-color);
    margin-top: auto;
}

.cart-total-label {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.cart-total-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
}

.cart-right {
    display: flex;
    flex-direction: column;
}

.cart-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-form label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.cart-form input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-color);
    transition: var(--transition);
}

.cart-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

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

.cart-submit-btn {
    margin-top: 8px;
    padding: 14px 24px;
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cart-submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

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

.cart-empty-msg {
    padding: 24px 0;
    color: var(--text-secondary);
    text-align: center;
}

@media (max-width: 768px) {
    .cart-modal-body {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cart-left {
        max-height: 280px;
    }
}
