/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #0d0d0d;
    background: #f7f7f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eaeae8;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #0d0d0d;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    color: #0d0d0d;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #0d0d0d;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.burger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #0d0d0d;
    border-radius: 2px;
    transition: 0.2s;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #eaeae8;
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    z-index: 999;
}

.mobile-nav.open {
    transform: translateY(0);
}

.mobile-nav__list {
    display: flex;
    flex-direction: column;
}

.mobile-nav__link {
    display: block;
    padding: 14px 16px;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 1px solid #f0f0ee;
}

/* ===== HERO ===== */
.hero {
    padding: 40px 0 24px;
}

.hero__inner h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.hero__inner p {
    font-size: 14px;
    color: #6b6b68;
}

/* ===== GENDER NAV ===== */
.gender-nav {
    position: sticky;
    top: 56px;
    z-index: 101;
    background: #f7f7f5;
    padding: 10px 0 8px;
    border-bottom: 1px solid #eaeae8;
}

.gender-nav__inner {
    display: flex;
    gap: 0;
    width: fit-content;
}

.gender-btn {
    padding: 8px 24px;
    border: 1px solid #d4d4d0;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #6b6b68;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.gender-btn:first-child {
    border-radius: 3px 0 0 3px;
}

.gender-btn:last-child {
    border-radius: 0 3px 3px 0;
}

.gender-btn + .gender-btn {
    border-left: none;
}

.gender-btn.active {
    background: #0d0d0d;
    color: #fff;
    border-color: #0d0d0d;
}

/* ===== BRAND NAV ===== */
.brand-nav {
    position: sticky;
    top: 109px;
    z-index: 100;
    background: #f7f7f5;
    padding: 8px 0 12px;
}

.brand-nav__wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-nav__inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    scroll-behavior: smooth;
}

.brand-nav__inner::-webkit-scrollbar {
    display: none;
}

.brand-nav__arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #d4d4d0;
    background: #fff;
    color: #6b6b68;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.brand-nav__arrow:hover {
    background: #0d0d0d;
    color: #fff;
    border-color: #0d0d0d;
}

.brand-nav__arrow[hidden] {
    visibility: hidden;
}

@media (max-width: 640px) {
    .brand-nav__arrow {
        display: none;
    }
}

.brand-btn {
    flex-shrink: 0;
    padding: 8px 18px;
    border: 1px solid #d4d4d0;
    border-radius: 100px;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #6b6b68;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.brand-btn.active {
    background: #0d0d0d;
    color: #fff;
    border-color: #0d0d0d;
}

.brand-btn--hidden {
    display: none;
}

/* ===== CATALOG HEADER ===== */
.catalog-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 24px 0 16px;
}

.catalog-title {
    font-size: 20px;
    font-weight: 600;
}

.catalog-count {
    font-size: 13px;
    color: #6b6b68;
}

.catalog-header__right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    row-gap: 10px;
}

.filter-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #eaeae8;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 1px 2px rgba(13, 13, 13, 0.04);
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.filter-field:hover {
    background: #f7f7f5;
}

.filter-field__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a3a39e;
    padding-left: 1px;
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 2px 22px 2px 1px;
    border: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b6b68' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right center no-repeat;
    border-radius: 3px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #0d0d0d;
    cursor: pointer;
    transition: color 0.15s;
}

.sort-select:hover {
    color: #6b6b68;
}

.sort-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 13, 13, 0.07);
    border-radius: 4px;
}

@media (max-width: 640px) {
    .filter-bar {
        width: 100%;
        justify-content: space-between;
    }

    .filter-field {
        flex: 1;
    }
}

/* ===== PRODUCT GRID ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 600px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

@media (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* ===== PRODUCT CARD ===== */
.product-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.15s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:active {
    transform: scale(0.98);
}

.product-card__image {
    aspect-ratio: 1 / 1;
    background: #ecece8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9a9a96;
    position: relative;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #cc2a2a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 2px;
    z-index: 2;
}

.product-card__body {
    padding: 10px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.product-card__brand {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9a9a96;
}

.product-card__name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: #0d0d0d;
}

/* ===== STAR RATING ===== */
.stars {
    position: relative;
    display: inline-block;
    color: #d4d4d0;
    white-space: nowrap;
    line-height: 1;
}

.stars__bg {
    display: block;
}

.stars__fg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f5a623;
    white-space: nowrap;
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-count {
    font-size: 11px;
    color: #9a9a96;
}

.product-card__prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.product-card__old-price {
    font-size: 12px;
    color: #9a9a96;
    text-decoration: line-through;
}

.product-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #0d0d0d;
}

.product-card__price--sale {
    color: #cc2a2a;
}

.product-card__sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.size-tag {
    font-size: 10px;
    padding: 2px 6px;
    border: 1px solid #e0e0dc;
    border-radius: 2px;
    color: #6b6b68;
}

.add-to-cart-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background: #0d0d0d;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: 0.15s;
}

.add-to-cart-btn:hover {
    background: #333;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 32px 0 40px;
}

.pagination button {
    width: 38px;
    height: 38px;
    border: 1px solid #d4d4d0;
    border-radius: 4px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #0d0d0d;
    cursor: pointer;
    transition: 0.15s;
}

.pagination button.active {
    background: #0d0d0d;
    color: #fff;
    border-color: #0d0d0d;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ===== FOOTER ===== */
.footer {
    margin-top: auto;
    background: #0d0d0d;
    color: #d4d4d0;
    padding: 36px 0 24px;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer__brand .logo--footer {
    color: #fff;
    font-size: 18px;
}

.footer__tagline {
    font-size: 12px;
    color: #8a8a86;
    margin-top: 4px;
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer__links a {
    font-size: 13px;
    color: #b0b0ac;
    transition: 0.15s;
}

.footer__links a:hover {
    color: #fff;
}

.footer__payments-label {
    display: block;
    font-size: 12px;
    color: #8a8a86;
    margin-bottom: 8px;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payment-icon {
    padding: 4px 10px;
    border: 1px solid #3a3a38;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #b0b0ac;
}

.footer__copy small {
    font-size: 11px;
    color: #6b6b68;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-page {
    padding: 24px 0 48px;
}

.checkout-page h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.checkout-layout {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr 380px;
    }
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #eaeae8;
    position: relative;
}

.cart-item__image {
    width: 100px;
    height: 75px;
    background: #ecece8;
    flex-shrink: 0;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.cart-item__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item__brand {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9a9a96;
}

.cart-item__name {
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #0d0d0d;
}

.cart-item__size {
    font-size: 12px;
    color: #6b6b68;
}

.cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d4d4d0;
    border-radius: 3px;
}

.quantity-control button {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    color: #0d0d0d;
}

.quantity-control span {
    font-size: 14px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.cart-item__price {
    font-size: 15px;
    font-weight: 700;
}

.cart-item__remove {
    position: absolute;
    top: 16px;
    right: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #9a9a96;
    padding: 4px;
    transition: 0.15s;
}

.cart-item__remove:hover {
    color: #cc2a2a;
}

.coupon-field {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.coupon-field input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d4d4d0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
}

.coupon-field button {
    padding: 10px 16px;
    background: #0d0d0d;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6b6b68;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input {
    padding: 12px 14px;
    border: 1px solid #d4d4d0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    transition: 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: #0d0d0d;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-section {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #eaeae8;
    border-radius: 4px;
}

.payment-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.stripe-element {
    padding: 12px;
    border: 1px solid #d4d4d0;
    border-radius: 2px;
    background: #fff;
    min-height: 42px;
}

.payment-express {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.express-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    border: 1px solid #d4d4d0;
    border-radius: 3px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: 0.15s;
}

.express-btn:hover {
    background: #f0f0ee;
}

.express-btn--paypal {
    background: #0070ba;
    color: #fff;
    border-color: #0070ba;
}

.express-btn--paypal:hover {
    background: #005d9e;
}

.express-btn--klarna {
    background: #ffb3c7;
    color: #0d0d0d;
    border-color: #ffb3c7;
}

.express-btn--klarna:hover {
    background: #ff9ab5;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 2px solid #0d0d0d;
    margin-top: 12px;
}

.order-total__label {
    font-size: 14px;
    font-weight: 600;
}

.order-total__price {
    font-size: 20px;
    font-weight: 700;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #0d0d0d;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    margin-top: 8px;
}

.submit-btn:hover {
    background: #333;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== UTILITY ===== */
.text-muted {
    color: #6b6b68;
}

.text-small {
    font-size: 12px;
}

.mt-8 {
    margin-top: 8px;
}

.mb-8 {
    margin-bottom: 8px;
}

/* ===== FIELD HINTS ===== */
.field-hint {
    font-size: 12px;
    min-height: 18px;
    margin-top: 4px;
    transition: color 0.15s;
}

.field-hint--error { color: #cc2a2a; }
.field-hint--success { color: #1a7a3a; }

/* ===== CARD VALIDATION ===== */
.card-input-wrap {
    position: relative;
}

.card-input-wrap input {
    letter-spacing: 0.1em;
    padding-right: 80px;
}

.card-type-badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 3px;
    background: #f0f0ee;
    color: #6b6b68;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.card-type-badge.visible { opacity: 1; }
.card-type-badge.visa { background: #e8eaf6; color: #1a1f71; }
.card-type-badge.mastercard { background: #ffe0e0; color: #c01; }
.card-type-badge.amex { background: #e0f0fb; color: #007bc1; }
.card-type-badge.mir { background: #e3f5e9; color: #1a7a3a; }

.card-fields-group {
    margin-bottom: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eaeae8;
}

.card-fields-group > label.section-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #0d0d0d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.card-fields-group .form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6b6b68;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    display: block;
}

.card-fields-group .form-group input {
    padding: 12px 14px;
    border: 1px solid #d4d4d0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    width: 100%;
    transition: border-color 0.15s;
}

.card-fields-group .form-group input:focus {
    outline: none;
    border-color: #0d0d0d;
}

/* ===== OTP ===== */
.otp-send-btn {
    white-space: nowrap;
    padding: 11px 16px;
    background: #0d0d0d;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.otp-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.otp-verify-block {
    background: #fafaf8;
    border: 1px solid #eaeae8;
    border-radius: 4px;
    padding: 14px 16px 12px;
}

.otp-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 6px;
}

.otp-input-row input {
    flex: 1;
    padding: 12px 14px;
    border: 1.5px solid #d4d4d0;
    border-radius: 2px;
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-align: center;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.otp-input-row input:focus {
    outline: none;
    border-color: #0d0d0d;
    box-shadow: 0 0 0 3px rgba(13,13,13,0.07);
}

.otp-input-row input:disabled {
    background: #f0f0ee;
    color: #6b6b67;
    cursor: not-allowed;
}

.otp-input-row input.input--error {
    border-color: #cc2a2a;
    box-shadow: 0 0 0 3px rgba(204,42,42,0.1);
}

.otp-input-row input.input--success {
    border-color: #1a7a3a;
    box-shadow: 0 0 0 3px rgba(26,122,58,0.1);
    background: #f3fbf6;
}

.otp-verify-btn {
    padding: 0 20px;
    background: #0d0d0d;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.otp-verify-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.otp-verify-btn--success {
    background: #1a7a3a !important;
    opacity: 1 !important;
    font-size: 18px;
}

.otp-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    min-height: 18px;
}

.otp-status--pending { color: #8a6d00; }
.otp-status--error   { color: #cc2a2a; }
.otp-status--success { color: #1a7a3a; }