:root {
    /* Color Palette */
    --primary-color: #000000;
    --secondary-color: #666666;
    --accent-color: #e63946;
    --bg-color: #ffffff;
    --border-color: #eeeeee;
    --text-color: #333333;
    --light-text: #999999;
    
    /* Spacing */
    --container-max-width: 1400px;
    --header-height: 120px;
    --sidebar-width: 200px;
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}


.main-nav {
    padding: 30px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* logo class removed */

.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 50px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 2px;
}

.nav-menu a {
    color: var(--light-text);
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.header-icons {
    grid-column: 3;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    align-items: center;
}

.cart-trigger {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #000;
    color: #fff;
    font-size: 9px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Hero - Hidden on Desktop */
.mobile-hero {
    display: none;
}
.detail-layout {
    max-width: 920px !important; /* Force override modal-content */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 50px;
    text-align: left;
}

.detail-img-box {
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
}

.detail-img-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.detail-info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#detailTitle {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.detail-price {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.option-group {
    margin-bottom: 25px;
}

.option-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.option-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.opt-btn {
    min-width: 45px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.opt-btn:hover {
    border-color: #000;
}

.opt-btn.selected {
    border-color: #000;
    background: #000;
    color: #fff;
}

.add-to-cart-btn {
    margin-top: 20px;
    padding: 18px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    letter-spacing: 1px;
}

.add-to-cart-btn:hover {
    background: #222;
}

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

/* Shipping Bar */
.shipping-bar-container {
    padding: 20px 30px;
    background: #f9f9f9;
}

.shipping-msg {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.progress-bg {
    height: 4px;
    background: #eee;
    width: 100%;
    border-radius: 2px;
}

.progress-bar {
    height: 100%;
    background: #000;
    width: 0%;
    transition: width 0.5s ease;
}

/* Cart Items */
.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.item-thumb {
    width: 80px;
    height: 100px;
    object-fit: cover;
}

.item-details h4 {
    font-size: 13px;
    margin-bottom: 5px;
}

.item-options {
    font-size: 11px;
    color: var(--secondary-color);
}

.item-qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
}

.total-box {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
}

.nav-menu li.point a {
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
}

/* Main Layout */
.main-content {
    display: flex;
    padding-top: 50px;
    gap: 60px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 36px;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.category-list li {
    margin-bottom: 15px;
}

.category-list a {
    font-size: 14px;
    color: var(--light-text);
}

.category-list li.active a {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
}

.category-list li.active a::after {
    content: '•';
    color: var(--accent-color);
    margin-left: 5px;
}

.category-list a:hover {
    color: var(--primary-color);
}

/* Product Grid */
.products {
    flex-grow: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px 15px;
}

/* Product Card */
.product-card {
    cursor: pointer;
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 5.5;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #f5f5f5;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
}

.product-info .title {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 8px;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.original-price {
    font-size: 12px;
    color: var(--light-text);
    text-decoration: line-through;
    font-weight: 400;
}

.discount-rate {
    color: var(--accent-color);
}

.review-count {
    margin-top: 8px;
    font-size: 11px;
    color: var(--light-text);
}

/* Overlays, Modals, Drawers */
.overlay, .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active, .modal.active {
    display: flex;
    opacity: 1;
}

.overlay-content {
    width: 80%;
    max-width: 800px;
    position: relative;
}

.search-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #000;
    background: transparent;
    font-size: 48px;
    padding: 20px 0;
    outline: none;
    font-weight: 300;
}

.modal-content {
    background: #fff;
    padding: 60px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 2px;
}

.modal-content input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    margin-top: 10px;
}

.form-links {
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--secondary-color);
}

.drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.drawer.active {
    right: 0;
}

.drawer-header {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.empty-msg {
    margin: auto;
    color: var(--light-text);
    font-size: 14px;
    text-align: center;
}

.drawer-footer {
    padding: 30px;
    border-top: 1px solid var(--border-color);
}

.checkout-btn {
    width: 100%;
    padding: 20px;
    background: #000;
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

.drawer .close-btn {
    position: static;
}

/* Footer Styles */
.main-footer {
    padding: 100px 0 60px;
    border-top: 1px solid var(--border-color);
    margin-top: 100px;
    background: #fff;
    text-align: center;
}

.footer-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 5px;
    margin-bottom: 40px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-links a {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--light-text);
    transition: color 0.3s;
}

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

.copyright {
    font-size: 10px;
    color: var(--light-text);
    letter-spacing: 0.5px;
}

/* --- Mobile Fixes (Phase 2) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001; /* Ensure above header */
}

.menu-toggle span {
    width: 25px;
    height: 1.5px;
    background: #000;
    transition: 0.3s;
}

@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        padding-top: 30px;
    }
    .sidebar {
        display: none;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 15px 0; /* Compact header */
    }
    .nav-content {
        grid-template-columns: auto 1fr auto;
        gap: 20px;
    }
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px;
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 3000;
    }
    .nav-menu.active {
        left: 0;
    }
    .nav-menu li {
        margin: 20px 0;
    }
    .nav-menu a {
        font-size: 24px;
        letter-spacing: 2px;
    }
    .menu-toggle {
        display: flex;
        grid-column: 1;
    }
    .logo {
        grid-column: 2;
        text-align: center;
    }
    .logo a {
        font-size: 18px;
    }
    .header-icons {
        grid-column: 3;
    }
    
    /* Product Detail Mobile */
    .detail-layout {
        grid-template-columns: 1fr;
        max-height: 95vh;
        overflow-y: auto;
        padding: 60px 20px 40px;
    }
    .detail-img-box {
        margin-bottom: 20px;
    }
    .detail-layout .close-btn {
        position: fixed;
        top: 20px;
        right: 20px;
        background: rgba(255,255,255,0.8);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    #detailTitle {
        font-size: 18px;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile Hero Styles */
    .mobile-hero {
        display: flex;
        position: relative;
        height: 60vh;
        width: 100%;
        background-image: url('img/mobile_hero_bg.png');
        background-size: cover;
        background-position: center;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #fff;
        margin-bottom: 40px;
    }

    .mobile-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.2);
    }

    .hero-content {
        position: relative;
        z-index: 1;
        padding: 20px;
    }

    .hero-title {
        font-size: 42px;
        font-weight: 300;
        line-height: 1.1;
        letter-spacing: -1px;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 14px;
        font-weight: 400;
        margin-bottom: 30px;
        opacity: 0.9;
    }

    .hero-btn {
        display: inline-block;
        padding: 15px 40px;
        background: #fff;
        color: #000;
        font-weight: 700;
        font-size: 12px;
        letter-spacing: 2px;
        transition: transform 0.2s;
    }
    
    .hero-btn:active {
        transform: scale(0.95);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    .logo a {
        font-size: 16px;
        letter-spacing: 2px;
    }
}

/* Responsive Update */
@media (max-width: 900px) {
    .drawer {
        width: 100%;
        right: -100%;
    }
}

