:root {
    --bg-dark: #0f1115;
    --card-bg: #181b22;
    --modal-bg: #1e222b;
    --text-primary: #f0f2f5;
    --text-secondary: #8d96a5;
    
    --female-accent: #e8a5b8;
    --female-bg: rgba(232, 165, 184, 0.12);
    
    --male-accent: #52b788;
    --male-bg: rgba(82, 183, 136, 0.15);
    
    --unisex-accent: #a8b2c1;
    --unisex-bg: rgba(168, 178, 193, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding: 16px;
    padding-bottom: 40px;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 26px;
    letter-spacing: 2px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #a8b2c1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

.filter-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filter-buttons::-webkit-scrollbar { display: none; }

.filter-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn.active {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 12px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform 0.2s;
}

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

.product-card.gender-female { border-left: 4px solid var(--female-accent); }
.product-card.gender-male { border-left: 4px solid var(--male-accent); }
.product-card.gender-unisex { border-left: 4px solid var(--unisex-accent); }

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    z-index: 2;
}

.badge-female { background: var(--female-bg); color: var(--female-accent); border: 1px solid rgba(232, 165, 184, 0.3); }
.badge-male { background: var(--male-bg); color: var(--male-accent); border: 1px solid rgba(82, 183, 136, 0.3); }
.badge-unisex { background: var(--unisex-bg); color: var(--unisex-accent); border: 1px solid rgba(168, 178, 193, 0.3); }

.image-wrapper {
    width: 100%;
    height: 220px;
    background: #12141a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.product-info-preview {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
}

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

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content {
    background: var(--modal-bg);
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.close-btn {
    position: absolute;
    top: 12px; right: 16px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-slider {
    width: 100%;
    height: 260px;
    background: #12141a;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.prev-btn { left: 12px; }
.next-btn { right: 12px; }

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

.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.dot.active-dot {
    background: #ffffff;
    width: 18px;
    border-radius: 4px;
}

.modal-details {
    padding: 20px;
    overflow-y: auto;
}

.product-material {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 12px;
}

.product-desc {
    font-size: 14px;
    color: #a0aab8;
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

.buy-btn {
    background: #ffffff;
    color: #0f1115;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

/* Улучшенная прокрутка фильтров */
.scrollable-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.scrollable-filter::-webkit-scrollbar {
    height: 4px;
}

.scrollable-filter::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
