/* ============================================
   LENSKART CLONE - MAIN STYLESHEET
   ============================================ */

:root {
    --primary: #00bcd4;
    --primary-dark: #0097a7;
    --secondary: #1a237e;
    --accent: #ff5722;
    --light-bg: #f5f5f5;
    --text-dark: #212121;
    --text-muted: #757575;
    --border: #e0e0e0;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: #fff;
}

/* ---- NAVBAR ---- */
.navbar { border-bottom: 2px solid var(--primary); }
.navbar-brand { font-size: 1.6rem !important; letter-spacing: -1px; }
.nav-link { font-size: 13px; font-weight: 600; color: #333 !important; padding: 8px 12px !important; }
.nav-link:hover { color: var(--primary) !important; }

/* ---- SEARCH ---- */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
}
.search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.search-item:hover { background: #f5f5f5; }

/* ---- HERO SLIDER ---- */
.hero-swiper { height: 500px; }
.hero-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) { .hero-swiper { height: 250px; } }

/* ---- CATEGORY CARDS ---- */
.category-card {
    text-align: center;
    padding: 20px 15px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    display: block;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,188,212,0.2);
    color: var(--primary);
}
.category-card .icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 28px;
    color: var(--primary);
}
.category-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* ---- PRODUCT CARD ---- */
.product-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
    position: relative;
}
.product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}
.product-card .card-img-container {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card .card-img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}
.product-card:hover .card-img-container img { transform: scale(1.05); }

.product-card .badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.product-card .badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}
.product-card .wishlist-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.product-card .wishlist-btn:hover, .product-card .wishlist-btn.active {
    background: #ffebee;
    border-color: #ef5350;
    color: #ef5350;
}

.product-card .card-body { padding: 12px; }
.product-card .product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.product-card .price-box { margin-top: 8px; }
.product-card .sale-price { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.product-card .mrp { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.product-card .discount-text { font-size: 12px; color: var(--success); font-weight: 600; }

.product-card .colors { display: flex; gap: 5px; margin-top: 8px; }
.product-card .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ccc;
    cursor: pointer;
}
.product-card .add-to-cart-btn {
    width: 100%;
    margin-top: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all 0.2s;
}
.product-card .add-to-cart-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ---- SECTION HEADERS ---- */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}
.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.section-header p { color: var(--text-muted); margin-top: 15px; }

/* ---- OFFER BANNER ---- */
.offer-banner {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.offer-banner img { width: 100%; height: 180px; object-fit: cover; }
.offer-banner .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.6), transparent);
    display: flex;
    align-items: center;
    padding: 20px;
    color: #fff;
}

/* ---- BRAND LOGOS ---- */
.brand-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}
.brand-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,188,212,0.15);
}
.brand-card img { height: 50px; object-fit: contain; filter: grayscale(100%); }
.brand-card:hover img { filter: grayscale(0%); }

/* ---- FEATURES BAR ---- */
.features-bar { background: var(--light-bg); padding: 20px 0; }
.feature-item { text-align: center; }
.feature-item i { font-size: 28px; color: var(--primary); margin-bottom: 8px; }
.feature-item h6 { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.feature-item p { font-size: 11px; color: var(--text-muted); margin: 0; }

/* ---- CART ---- */
.cart-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
}
.cart-item img { width: 100px; height: 80px; object-fit: contain; }
.qty-control { display: flex; align-items: center; gap: 10px; }
.qty-control button {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-control button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- ORDER SUMMARY ---- */
.order-summary {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    position: sticky;
    top: 80px;
}
.order-summary .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}
.order-summary .grand-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    border-top: 2px solid var(--border);
    padding-top: 10px;
}

/* ---- PRODUCT DETAIL ---- */
.product-gallery .main-img {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}
.product-gallery .main-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.thumb-img {
    width: 70px;
    height: 60px;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
    background: #f9f9f9;
}
.thumb-img.active, .thumb-img:hover { border-color: var(--primary); }

/* ---- TABS ---- */
.nav-tabs .nav-link { color: var(--text-muted); font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom: 2px solid var(--primary); }

/* ---- RATING STARS ---- */
.stars i { font-size: 13px; }
.rating-bar { height: 8px; border-radius: 4px; background: #e0e0e0; }
.rating-bar-fill { height: 100%; border-radius: 4px; background: var(--warning); }

/* ---- CHECKOUT ---- */
.checkout-step {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.step-number {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

/* ---- FILTERS ---- */
.filter-section { border-bottom: 1px solid var(--border); padding-bottom: 15px; margin-bottom: 15px; }
.filter-section h6 { font-weight: 700; margin-bottom: 10px; font-size: 13px; }
.filter-chip {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    margin: 3px;
    transition: all 0.2s;
}
.filter-chip:hover, .filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- PAGINATION ---- */
.pagination .page-link { color: var(--primary); border-color: var(--border); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ---- BUTTONS ---- */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ---- BREADCRUMB ---- */
.breadcrumb { font-size: 13px; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }

/* ---- TOAST ---- */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; }

/* ---- LOADER ---- */
.page-loader {
    position: fixed;
    inset: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .product-card .card-img-container { height: 150px; }
    .hero-swiper { height: 200px; }
    .category-card .icon { width: 50px; height: 50px; font-size: 20px; }
}

/* ---- SWIPER CUSTOM ---- */
.swiper-button-next, .swiper-button-prev {
    color: var(--primary) !important;
    background: rgba(255,255,255,0.9);
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.swiper-button-next::after, .swiper-button-prev::after { font-size: 14px !important; }
.swiper-pagination-bullet-active { background: var(--primary) !important; }

/* ---- ADMIN ---- */
.admin-sidebar {
    background: var(--secondary);
    min-height: 100vh;
    width: 250px;
    position: fixed;
    top: 0; left: 0;
    overflow-y: auto;
}
.admin-sidebar .logo { padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar .nav-link { color: rgba(255,255,255,0.7); padding: 10px 20px; font-size: 13px; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left: 3px solid var(--primary);
}
.admin-content { margin-left: 250px; padding: 20px; }
.admin-stat-card {
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.admin-stat-card i { font-size: 40px; opacity: 0.3; position: absolute; right: 20px; bottom: 15px; }

/* ===== FOOTER & BODY FULL WIDTH FIX ===== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}
body > footer, footer {
    display: block;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.page-content {
    background: #f7f8fc;
    width: 100%;
}