/* =========================================================
   RETAIL VELOCITY DESIGN SYSTEM — UrbanWear
   ========================================================= */

/* ── Color Tokens ──────────────────────────────────────── */
:root {
    --clr-primary:          #a04100;
    --clr-primary-btn:      #f57224;
    --clr-secondary:        #00687a;
    --clr-rating:           #f9c94d;
    --clr-success:          #388e3c;
    --clr-bg:               #f6f3f2;
    --clr-white:            #ffffff;
    --clr-card:             #ffffff;
    --clr-surface:          #f0eded;
    --clr-surface-high:     #e5e2e1;
    --clr-border:           #e0c0b2;
    --clr-border-dark:      #8c7166;
    --clr-text:             #1b1c1c;
    --clr-text-muted:       #584238;
    --clr-header-bg:        #ffffff;
    --clr-subnav-bg:        #ffffff;

    /* Radii */
    --r-xs: 2px;
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-pill: 999px;

    /* Max layout width */
    --max-w: 1280px;
}

/* ── Base Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* Ensure Material Symbols render as icons, not text */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   HEADER
   ========================================================= */
#main-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--clr-header-bg);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Shared inner container */
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Top bar */
.header-top-bar {
    padding: 10px 0;
    background: var(--clr-white);
}

/* Logo */
.header-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--clr-primary);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.header-logo:hover { color: var(--clr-primary-btn); }

/* Search form */
.header-search {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    max-width: 640px;
    min-width: 0;
}
.header-search-icon {
    position: absolute;
    left: 12px;
    font-size: 20px;
    color: var(--clr-text-muted);
    pointer-events: none;
    z-index: 2;
}
.header-search-input {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--clr-border-dark);
    border-radius: var(--r-md);
    padding: 0 110px 0 42px;
    font-size: 14px;
    font-family: 'Inter', Arial, sans-serif;
    color: var(--clr-text);
    background: var(--clr-white);
    outline: none;
    transition: border-color 0.2s;
}
.header-search-input:focus {
    border-color: var(--clr-secondary);
    box-shadow: 0 0 0 2px rgba(0,104,122,0.12);
}
.header-search-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 44px;
    padding: 0 18px;
    background: var(--clr-primary-btn);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', Arial, sans-serif;
    border: none;
    border-radius: 0 var(--r-md) var(--r-md) 0;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.header-search-btn:hover { background: var(--clr-primary); }

/* Right action icons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    margin-left: auto;
}
.header-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--clr-text);
    text-decoration: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    position: relative;
    transition: color 0.2s;
}
.header-action-item .material-symbols-outlined { font-size: 22px; }
.header-action-item:hover { color: var(--clr-primary); }
.header-action-label {
    font-size: 11px;
    font-weight: 600;
    display: block;
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--clr-primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Sub-navigation bar */
.header-subnav {
    background: var(--clr-subnav-bg);
    border-top: 1px solid #f0eded;
    padding: 6px 0;
}
.header-subnav .header-inner {
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.header-subnav .header-inner::-webkit-scrollbar { display: none; }
.subnav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text-muted);
    text-decoration: none;
    padding: 4px 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.subnav-link:hover,
.subnav-link.active {
    color: var(--clr-primary);
    border-bottom-color: var(--clr-primary);
}
.subnav-deals {
    color: var(--clr-primary-btn);
    margin-left: auto !important;
}
.subnav-deals:hover { color: var(--clr-primary); }

/* =========================================================
   PAGE LAYOUT
   ========================================================= */
.page-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px 16px;
}
.page-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
}
@media (max-width: 991px) {
    .page-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    overflow: hidden;
    position: sticky;
    top: 88px;
}
.sidebar-header {
    padding: 16px 20px 10px;
}
.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--clr-primary);
    margin: 0 0 2px;
}
.sidebar-subtitle {
    font-size: 11px;
    color: var(--clr-text-muted);
    margin: 0;
}
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--clr-text-muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
}
.sidebar-nav a .material-symbols-outlined { font-size: 20px; }
.sidebar-nav a:hover {
    background: var(--clr-surface);
    color: var(--clr-primary);
}
.sidebar-nav a.active {
    background: #fff4ed;
    color: var(--clr-primary);
    border-left-color: var(--clr-primary);
    font-weight: 700;
}
.sidebar-nav .sidebar-divider {
    border-top: 1px solid var(--clr-border);
    margin: 4px 0;
}

/* =========================================================
   HERO BANNER
   ========================================================= */
.hero-banner {
    position: relative;
    height: 360px;
    border-radius: var(--r-md);
    overflow: hidden;
    margin-bottom: 24px;
    background: #1b1c1c;
}
.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
.hero-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,0) 100%);
    display: flex;
    align-items: center;
    padding: 40px;
}
.hero-banner-content { max-width: 480px; }
.hero-badge {
    display: inline-block;
    background: var(--clr-primary-btn);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: var(--r-sm);
    margin-bottom: 14px;
}
.hero-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 12px;
}
.hero-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    margin: 0 0 22px;
    line-height: 1.5;
}
.hero-cta {
    display: inline-block;
    background: var(--clr-primary-btn);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 28px;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: background 0.2s;
}
.hero-cta:hover { background: var(--clr-primary); color: #fff; }

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff4ed;
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 10px 16px;
    margin-bottom: 16px;
}
.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--clr-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.section-title .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: 'FILL' 1;
}
.section-viewall {
    font-size: 12px;
    font-weight: 700;
    color: var(--clr-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.section-viewall:hover { text-decoration: underline; }

/* Countdown timer */
.countdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.countdown-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--clr-text-muted);
}
.countdown-timer {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    color: var(--clr-primary-btn);
    font-size: 13px;
}
.countdown-digit {
    background: #fff;
    border: 1px solid var(--clr-border);
    padding: 1px 6px;
    border-radius: var(--r-xs);
    min-width: 26px;
    text-align: center;
}

/* Flash deals scroll */
.flash-scroll-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.flash-scroll-row::-webkit-scrollbar { display: none; }

/* =========================================================
   PRODUCT CARDS
   ========================================================= */
.p-card {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: var(--clr-text);
}
.p-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-2px);
    color: var(--clr-text);
    text-decoration: none;
}
.p-card-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f6f3f2;
    overflow: hidden;
}
.p-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.p-card:hover .p-card-img-wrap img { transform: scale(1.04); }
.p-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Badges */
.badge-sale {
    position: absolute;
    top: 8px; left: 8px;
    background: var(--clr-secondary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--r-xs);
    z-index: 2;
}
.badge-free {
    position: absolute;
    top: 8px; left: 8px;
    background: var(--clr-success);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--r-xs);
    z-index: 2;
}
.p-card-brand {
    font-size: 11px;
    color: var(--clr-text-muted);
    margin-bottom: 3px;
    font-weight: 500;
}
.p-card-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 400;
    color: var(--clr-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
    margin-bottom: 6px;
    transition: color 0.2s;
}
.p-card:hover .p-card-title { color: var(--clr-primary); }

/* Stars */
.p-card-stars {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-bottom: 8px;
}
.p-card-stars .material-symbols-outlined {
    font-size: 13px;
    color: var(--clr-rating);
    font-variation-settings: 'FILL' 1;
}
.p-card-stars .review-count {
    font-size: 10px;
    color: var(--clr-text-muted);
    margin-left: 3px;
}
.p-card-stars .rating-val {
    font-size: 11px;
    font-weight: 600;
    color: var(--clr-text);
    margin-left: 2px;
}

/* Stock progress bar */
.p-card-progress {
    background: #e5e2e1;
    border-radius: var(--r-pill);
    height: 5px;
    overflow: hidden;
    margin-bottom: 4px;
}
.p-card-progress-fill {
    height: 100%;
    background: var(--clr-primary-btn);
    border-radius: var(--r-pill);
}
.p-card-sold-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

/* Prices */
.p-card-price-row {
    margin-top: auto;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.p-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--clr-primary);
    line-height: 1;
}
.p-card-old-price {
    font-size: 12px;
    text-decoration: line-through;
    color: var(--clr-text-muted);
}

/* Add to Cart */
.btn-add-cart {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px 0;
    text-align: center;
    background: #f0eded;
    color: var(--clr-primary);
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', Arial, sans-serif;
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.btn-add-cart:hover {
    background: var(--clr-primary-btn);
    color: #fff;
    text-decoration: none;
}

/* Flash card (fixed width for horizontal scroll) */
.flash-card { width: 185px; flex-shrink: 0; }

/* =========================================================
   PRODUCT GRID
   ========================================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 1199px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   CATEGORY TILES
   ========================================================= */
.dept-section {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    padding: 20px;
    margin-bottom: 24px;
}
.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 767px) { .dept-grid { grid-template-columns: repeat(2, 1fr); } }
.dept-tile {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: block;
    text-decoration: none;
    cursor: pointer;
    background: #ddd;
}
.dept-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.dept-tile:hover img { transform: scale(1.06); }
.dept-tile-dark {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.25);
    transition: background 0.3s;
}
.dept-tile:hover .dept-tile-dark { background: rgba(0,0,0,.12); }
.dept-tile-label {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    color: var(--clr-text);
    border-radius: var(--r-sm);
    letter-spacing: 0.3px;
}

/* =========================================================
   LOAD MORE
   ========================================================= */
.load-more-wrap {
    display: flex;
    justify-content: center;
    margin: 32px 0 16px;
}
.btn-load-more {
    padding: 12px 48px;
    border: 2px solid var(--clr-secondary);
    color: var(--clr-secondary);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Inter', Arial, sans-serif;
    border-radius: var(--r-md);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
}
.btn-load-more:hover {
    background: var(--clr-secondary);
    color: #fff;
    text-decoration: none;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: #e5e2e1;
    border-top: 1px solid var(--clr-border);
    padding: 48px 0 0;
    margin-top: 48px;
    font-family: 'Inter', Arial, sans-serif;
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 32px;
    padding-bottom: 32px;
}
@media (max-width: 991px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand-name {
    font-size: 20px;
    font-weight: 900;
    color: var(--clr-primary);
    margin-bottom: 12px;
    display: block;
}
.footer-brand-desc {
    font-size: 13px;
    color: var(--clr-text-muted);
    line-height: 1.6;
    margin-bottom: 18px;
}
.footer-social { display: flex; gap: 14px; }
.footer-social a {
    color: var(--clr-text-muted);
    transition: color 0.2s;
}
.footer-social a:hover { color: var(--clr-primary); }
.footer-social .material-symbols-outlined { font-size: 22px; }
.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--clr-text);
    margin-bottom: 14px;
}
.footer-link {
    display: block;
    font-size: 13px;
    color: var(--clr-text-muted);
    text-decoration: none;
    margin-bottom: 9px;
    transition: color 0.2s;
}
.footer-link:hover { color: var(--clr-primary); }
.newsletter-desc {
    font-size: 13px;
    color: var(--clr-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}
.newsletter-form { display: flex; }
.newsletter-input {
    flex: 1;
    height: 40px;
    border: 1px solid var(--clr-border-dark);
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    padding: 0 12px;
    font-size: 13px;
    font-family: 'Inter', Arial, sans-serif;
    background: var(--clr-white);
    outline: none;
}
.newsletter-input:focus { border-color: var(--clr-primary); }
.newsletter-btn {
    background: var(--clr-primary);
    color: #fff;
    border: none;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    padding: 0 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', Arial, sans-serif;
}
.newsletter-btn:hover { background: var(--clr-primary-btn); }
.footer-bottom {
    border-top: 1px solid var(--clr-border);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.footer-copy {
    font-size: 12px;
    color: var(--clr-text-muted);
}
.footer-pay {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--clr-text-muted);
}
.footer-pay .material-symbols-outlined { font-size: 20px; opacity: 0.5; }

/* =========================================================
   FLOATING CHAT BUTTON
   ========================================================= */
.btn-float-chat {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--clr-primary-btn);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    cursor: pointer;
    border: none;
    transition: transform 0.2s, background 0.2s;
    z-index: 999;
}
.btn-float-chat:hover {
    transform: scale(1.1);
    background: var(--clr-primary);
}
.btn-float-chat .material-symbols-outlined { font-size: 26px; }

/* =========================================================
   UTILITIES
   ========================================================= */
.section-block {
    background: var(--clr-white);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    padding: 20px;
    margin-bottom: 24px;
}
.retail-section-title {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--clr-text);
    border-bottom: 1px solid var(--clr-border);
    padding-bottom: 10px;
    margin-bottom: 16px;
}
