/*
 * ════════════════════════════════════════════════════════════
 *  Maran Men's Wear — Storefront CSS
 *  Customer-facing pages: header, hero, shop, product, cart
 * ════════════════════════════════════════════════════════════
 */

/* ─── Promo Bar ─────────────────────────────────────────── */
.promo-bar {
    background: var(--muted);
    text-align: center;
    padding: 8px 16px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-fg);
    border-bottom: 1px solid var(--border-light);
}
.promo-bar span { color: var(--primary); }

/* ─── Header ────────────────────────────────────────────── */
.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 76px;
    padding: 0 32px;
    max-width: 1440px;
    margin: 0 auto;
    gap: 40px;
}

/* Brand Logo Integration */
.header-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--duration) var(--ease);
}

.header-logo:hover {
    opacity: 0.92;
}

.brand-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
}

.header-logo:hover .brand-logo-img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 10px rgba(219, 168, 74, 0.45));
}

.brand-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.header-logo .brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-transform: uppercase;
}

.header-logo .brand-sub {
    font-family: 'Jost', sans-serif;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.28em;
    color: var(--muted-fg);
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 1px;
}

/* Main Navigation Bar */
.main-navbar {
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.header-nav a {
    font-size: 11.5px;
    letter-spacing: 0.16em;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--muted-fg);
    transition: all 0.25s ease;
    position: relative;
    padding: 6px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--primary);
    text-shadow: 0 0 12px rgba(219, 168, 74, 0.2);
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1.5px;
    background: var(--gold-gradient);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.header-nav a:hover::after,
.header-nav a.active::after {
    width: 100%;
}

.nav-badge {
    background: var(--primary);
    color: var(--primary-fg);
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    box-shadow: 0 2px 6px rgba(219, 168, 74, 0.3);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.header-action-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-fg);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}

.header-action-link:hover {
    color: var(--primary);
    background: rgba(219, 168, 74, 0.08);
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    letter-spacing: 0.14em;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--primary);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    background: rgba(29, 27, 24, 0.6);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.header-action-btn:hover {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(219, 168, 74, 0.25);
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--fg);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* Mobile Nav Drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: var(--card);
    border-right: 1px solid var(--border);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
    padding: 24px;
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: var(--fg);
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 16px;
    right: 16px;
}

.mobile-nav-links {
    list-style: none;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-links a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-fg);
    border-radius: var(--radius-sm);
    transition: all var(--duration) var(--ease);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--primary);
    background: rgba(219,168,74,0.06);
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    min-height: 520px;
    gap: 18px;
    background: linear-gradient(160deg, #26221C 0%, #141311 40%, #0E0D0B 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(219,168,74,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero .eyebrow { font-size: 12px; letter-spacing: 0.3em; }

.hero h1 {
    font-size: 56px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    max-width: 700px;
}

.hero p {
    color: var(--muted-fg);
    font-size: 15px;
    max-width: 480px;
}

/* ─── Section ───────────────────────────────────────────── */
.section {
    padding: 72px 0;
}

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

.section-header .eyebrow { margin-bottom: 8px; }

.section-header h2 {
    margin-top: 4px;
}

/* ─── Product Card ──────────────────────────────────────── */
.product-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
    position: relative;
}

.product-card:hover {
    border-color: rgba(219,168,74,0.3);
    transform: translateY(-2px);
}

.product-card .product-img {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(160deg, #26221C, #141311);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

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

.product-card .product-img .no-img {
    color: #5C5348;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.product-card .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.product-card .product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transform: translateX(8px);
    transition: all var(--duration) var(--ease);
    z-index: 2;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-card .product-actions button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all var(--duration) var(--ease);
}

.product-card .product-actions button:hover {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
}

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

.product-card .product-category {
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--primary);
}

.product-card .product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    margin-top: 6px;
    color: var(--fg);
    line-height: 1.2;
}

.product-card .product-name a {
    color: inherit;
    text-decoration: none;
}
.product-card .product-name a:hover {
    color: var(--accent-fg);
}

.product-card .product-price {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.product-card .product-price .price {
    color: var(--primary);
    font-size: 16px;
    font-weight: 400;
}

.product-card .product-price .mrp {
    color: var(--muted-fg);
    font-size: 13px;
    text-decoration: line-through;
}

.product-card .product-price .discount {
    color: var(--success);
    font-size: 12px;
    font-weight: 500;
}

.product-card.sold-out { opacity: 0.6; }

/* ─── Quick Add to Cart (bottom of card) ────────────────── */
.product-card .quick-add {
    display: none;
    padding: 0 16px 16px;
}

.product-card:hover .quick-add {
    display: block;
}

/* ─── Product Detail ────────────────────────────────────── */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
}

.product-gallery {
    display: flex;
    gap: 12px;
}

.product-gallery .thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 72px;
    flex-shrink: 0;
}

.product-gallery .thumbs img,
.product-gallery .thumbs .thumb-placeholder {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--duration) var(--ease);
}

.product-gallery .thumbs .active { border-color: var(--primary); }

.product-gallery .main-image {
    flex: 1;
    aspect-ratio: 3/4;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(160deg, #26221C, #141311);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Size / Color Selector */
.variant-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.variant-selector .variant-btn {
    min-width: 44px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--muted);
    color: var(--fg);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.variant-selector .variant-btn:hover { border-color: var(--primary); }
.variant-selector .variant-btn.active {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
}
.variant-selector .variant-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color var(--duration) var(--ease);
}
.color-swatch:hover { border-color: var(--primary); }
.color-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(219,168,74,0.3); }

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 42px;
}

.qty-selector button {
    width: 42px;
    height: 100%;
    background: var(--muted);
    border: none;
    color: var(--fg);
    font-size: 16px;
    cursor: pointer;
    transition: background var(--duration) var(--ease);
}

.qty-selector button:hover { background: var(--primary); color: var(--primary-fg); }

.qty-selector input {
    width: 50px;
    height: 100%;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    background: var(--card);
    color: var(--fg);
    text-align: center;
    font-size: 14px;
    font-family: 'Jost', sans-serif;
    outline: none;
}

/* ─── Cart Page ─────────────────────────────────────────── */
.cart-table { width: 100%; border-collapse: collapse; }

.cart-table td { padding: 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }

.cart-item-img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.cart-summary {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--muted-fg);
}

.cart-summary .summary-row.total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 500;
    color: var(--fg);
}

/* ─── Checkout ──────────────────────────────────────────── */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    padding: 48px 0;
}

/* ─── Category Grid ─────────────────────────────────────── */
.category-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    aspect-ratio: 4/3;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    background: linear-gradient(160deg, #26221C, #141311);
    transition: border-color var(--duration) var(--ease);
}

.category-card:hover { border-color: rgba(219,168,74,0.4); }

.category-card .cat-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--fg);
}

.category-card .cat-count {
    font-size: 12px;
    color: var(--muted-fg);
}

/* ─── Filters Sidebar ───────────────────────────────────── */
.filter-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-fg);
    margin-bottom: 12px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: var(--fg);
    cursor: pointer;
}

.filter-option input[type="checkbox"] {
    accent-color: var(--primary);
}

/* ─── Shop Layout ───────────────────────────────────────── */
.shop-layout {
    display: flex;
    gap: 32px;
    padding: 48px 0;
}

.shop-content { flex: 1; }

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.shop-toolbar .result-count {
    font-size: 13px;
    color: var(--muted-fg);
}

/* ─── Footer ────────────────────────────────────────────── */
.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
    margin-top: 72px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 28px;
}

.footer-col h4 {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 18px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
}

.footer-col p {
    font-size: 14px;
    color: var(--muted-fg);
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul a {
    font-size: 14px;
    color: var(--muted-fg);
    transition: color var(--duration) var(--ease);
}

.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    margin-top: 48px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--muted-fg);
    letter-spacing: 0.1em;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}

.newsletter-form {
    display: flex;
    gap: 0;
    margin-top: 16px;
}

.newsletter-form input {
    flex: 1;
    height: 42px;
    background: #1B1917;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 0 14px;
    color: var(--fg);
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    outline: none;
}

.newsletter-form button {
    height: 42px;
    padding: 0 20px;
    background: var(--primary);
    color: var(--primary-fg);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
}

/* ─── Auth Pages ────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 40px 36px;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-logo img,
.auth-logo-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(219, 168, 74, 0.2);
    margin: 0 auto 14px;
    display: block;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.auth-card .auth-logo img:hover,
.auth-logo-img:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.auth-card .auth-logo h1 {
    font-size: 28px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-card .auth-logo p {
    font-size: 13px;
    color: var(--muted-fg);
    margin-top: 4px;
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    font-size: 12px;
    color: var(--muted-fg);
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--muted-fg);
}

/* ─── Customer Dashboard ────────────────────────────────── */
.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    padding: 48px 0;
}

.dashboard-sidebar {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.dashboard-sidebar a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-fg);
    transition: all var(--duration) var(--ease);
}

.dashboard-sidebar a:hover,
.dashboard-sidebar a.active {
    color: var(--primary);
    background: rgba(219,168,74,0.06);
}

/* ─── Responsive Storefront ─────────────────────────────── */
@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header-nav, .promo-msg { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav { display: block; }

    .hero { min-height: 380px; padding: 40px 20px; }
    .hero h1 { font-size: 36px; }

    .shop-layout { flex-direction: column; }
    .filter-sidebar { width: 100%; }

    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { position: static; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
