/* =========================================
   1. GLOBAL VARIABLES & TYPOGRAPHY
   ========================================= */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #6c757d;
    --success: #198754;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --border-radius: 8px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #111;
    letter-spacing: -0.5px;
}

a { text-decoration: none; transition: 0.3s; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.top-bar { background: #111; color: #ccc; font-size: 0.85rem; padding: 8px 0; }
.top-bar a { color: #ccc; margin-left: 15px; }
.top-bar a:hover { color: #fff; }

.main-header { background: #fff; padding: 15px 0; box-shadow: var(--shadow-sm); }
.navbar-brand { font-weight: 800; font-size: 1.6rem; color: var(--primary); }

.search-input { 
    border-radius: 50px 0 0 50px; 
    border: 1px solid #e1e1e1; 
    padding: 10px 20px; 
    background: #f8f9fa;
}
.search-input:focus { background: #fff; box-shadow: none; border-color: var(--primary); }
.search-btn { border-radius: 0 50px 50px 0; padding: 0 25px; }

.icon-nav { font-size: 1.3rem; color: #333; margin-left: 20px; position: relative; }
.icon-nav:hover { color: var(--primary); transform: translateY(-2px); display: inline-block; }
.badge-cart { position: absolute; top: -5px; right: -8px; font-size: 0.65rem; padding: 4px 6px; }

/* =========================================
   3. HOME PAGE (HERO & PRODUCTS)
   ========================================= */
/* Carousel */
.carousel-item { height: 450px; }
.carousel-item img { object-fit: cover; height: 100%; width: 100%; filter: brightness(0.7); }
.carousel-caption { bottom: 30%; text-align: left; text-shadow: 2px 2px 10px rgba(0,0,0,0.7); }
.carousel-caption h2 { font-size: 3.5rem; font-weight: 800; margin-bottom: 15px; }

/* Category Circles */
.cat-circle { 
    width: 90px; height: 90px; object-fit: cover; border-radius: 50%; 
    border: 3px solid #fff; box-shadow: var(--shadow-md); transition: 0.3s; 
}
.cat-item:hover .cat-circle { transform: scale(1.1); border-color: var(--primary); }
.cat-label { font-size: 0.9rem; font-weight: 600; margin-top: 10px; color: #444; display: block; }
.cat-item:hover .cat-label { color: var(--primary); }

/* Product Cards */
.product-card { 
    border: none; border-radius: var(--border-radius); background: #fff; 
    transition: transform 0.3s, box-shadow 0.3s; overflow: hidden; 
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card-img-top { height: 240px; object-fit: cover; transition: 0.5s; }
.product-card:hover .card-img-top { transform: scale(1.05); }

/* Hover Action Buttons on Product */
.product-overlay {
    position: absolute; top: 15px; right: 15px;
    display: flex; flex-direction: column; gap: 10px;
    opacity: 0; transition: all 0.3s ease; z-index: 2;
}
.product-card:hover .product-overlay { opacity: 1; right: 10px; }
.action-btn {
    width: 35px; height: 35px; background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #333; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.action-btn:hover { background: var(--primary); color: white; }

/* Promo Banner (Middle of Grid) */
.promo-banner { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
    color: white; border-radius: var(--border-radius); overflow: hidden; 
}

/* Trust Strip */
.feature-box { padding: 30px 20px; border-right: 1px solid #eee; text-align: center; }
.feature-box:last-child { border-right: none; }
.feature-icon { font-size: 2rem; color: var(--primary); margin-bottom: 15px; opacity: 0.8; }

/* Brands */
.brand-img { height: 40px; filter: grayscale(100%); opacity: 0.5; transition: 0.3s; }
.brand-img:hover { filter: grayscale(0%); opacity: 1; }

/* =========================================
   4. CART & CHECKOUT
   ========================================= */
.table-cart th { background: #f8f9fa; border-top: none; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; color: #666; }
.table-cart td { vertical-align: middle; }
.cart-img { width: 60px; height: 60px; object-fit: cover; border-radius: 5px; }

.checkout-summary { position: sticky; top: 100px; }
.list-group-item { border-color: #eee; padding: 15px; }

/* =========================================
   5. AUTH PAGES (LOGIN / REGISTER)
   ========================================= */
.auth-card { 
    max-width: 450px; margin: auto; border: none; 
    box-shadow: var(--shadow-lg); border-radius: 12px; overflow: hidden; 
}
.auth-header { background: var(--primary); color: white; padding: 30px; text-align: center; }
.auth-body { padding: 40px; background: white; }
.form-floating > .form-control { border-radius: 6px; border: 1px solid #ddd; }
.form-floating > .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15); }

/* =========================================
   6. MY ORDERS & TRACKING
   ========================================= */
.track-line { height: 6px; background-color: #e9ecef; width: 100%; position: relative; margin-top: 30px; border-radius: 10px; }
.step-dot { width: 20px; height: 20px; background-color: #e9ecef; border-radius: 50%; position: absolute; top: -7px; border: 2px solid #fff; }
.step-text { position: absolute; top: 25px; transform: translateX(-40%); font-size: 0.8rem; font-weight: 600; color: #999; width: 100px; text-align: center; }

.active-line { background-color: var(--success); height: 100%; width: 0%; transition: width 0.5s; border-radius: 10px; }
.active-dot { background-color: var(--success); box-shadow: 0 0 0 3px #c3e6cb; }
.active-text { color: var(--success); }

.dot-1 { left: 0%; }
.dot-2 { left: 33%; }
.dot-3 { left: 66%; }
.dot-4 { left: 100%; }

/* =========================================
   7. FOOTER
   ========================================= */
footer { background: #1a1d20; color: #adb5bd; padding-top: 70px; font-size: 0.9rem; }
footer h5 { color: #fff; font-weight: 700; margin-bottom: 25px; }
footer a { color: #adb5bd; text-decoration: none; display: block; margin-bottom: 12px; transition: 0.3s; }
footer a:hover { color: #fff; padding-left: 5px; }
.social-icon { font-size: 1.2rem; margin-right: 15px; color: #fff; background: rgba(255,255,255,0.1); width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: 0.3s; }
.social-icon:hover { background: var(--primary); transform: translateY(-3px); }

/* =========================================
   8. RESPONSIVE TWEAKS
   ========================================= */
@media (max-width: 768px) {
    .carousel-item { height: 250px; }
    .carousel-caption h2 { font-size: 1.8rem; }
    .top-bar { display: none; }
    .feature-box { border-right: none; border-bottom: 1px solid #eee; }
    .cat-circle { width: 70px; height: 70px; }
}