/* ===== LKMart Global Styles ===== */
:root {
  --primary: #1a3a8f;
  --primary-dark: #0f2560;
  --secondary: #0a1628;
  --accent: #f47920;
  --success: #28a745;
  --light-bg: #f0f4f8;
  --white: #fff;
  --text-dark: #222;
  --text-muted: #888;
  --border: #e0e0e0;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--light-bg); color: var(--text-dark); }
a { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }

/* ===== Top Bar ===== */
.top-bar { background: var(--secondary); padding: 6px 0; }
.top-bar a { transition: opacity .2s; }
.top-bar a:hover { opacity: .8; }

/* ===== Header ===== */
.main-header { background: #1a3a8f; box-shadow: 0 2px 8px rgba(0,0,0,.15); z-index: 1000; }

.logo-link { display: block; }
.logo-text { line-height: 1; }
.logo-lk { font-size: 2rem; font-weight: 900; color: #fff; letter-spacing: -1px; }
.logo-mart { font-size: 2rem; font-weight: 900; color: var(--accent); }
.logo-sub { font-size: .6rem; color: rgba(255,255,255,.7); letter-spacing: 2px; text-transform: uppercase; margin-top: -2px; }

/* Search */
.search-form .search-input { border: none; border-radius: var(--radius) 0 0 var(--radius); height: 44px; font-size: .95rem; }
.search-form .search-cat { border: none; border-left: 1px solid #ddd; height: 44px; font-size: .85rem; border-radius: 0; }
.search-form .btn-search { background: var(--accent); color: #fff; border: none; border-radius: 0 var(--radius) var(--radius) 0; padding: 0 20px; font-size: 1.1rem; height: 44px; }
.search-form .btn-search:hover { background: #d96510; }

/* Header Icons */
.header-icon { display: flex; flex-direction: column; align-items: center; color: #fff; transition: transform .2s; position: relative; }
.header-icon:hover { transform: translateY(-2px); color: var(--accent); }
.icon-wrap { position: relative; font-size: 1.3rem; }
.badge-count { position: absolute; top: -8px; right: -10px; background: #ff4757; color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: .65rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.icon-label { font-size: .7rem; margin-top: 2px; }

/* ===== Category Nav ===== */
.cat-nav { background: var(--secondary); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; overflow-x: auto; gap: 0; }
.nav-list::-webkit-scrollbar { height: 0; }
.nav-item > a { display: block; padding: 10px 16px; color: #fff; font-size: .85rem; font-weight: 500; white-space: nowrap; transition: background .2s; }
.nav-item > a:hover, .nav-item.active > a { background: rgba(255,255,255,.12); color: var(--accent); }
.nav-item.hot > a { color: #ff4757; font-weight: 700; }
.nav-item.hot > a:hover { background: rgba(255,71,87,.15); }
.nav-item.all-cats { position: relative; }
.nav-item.all-cats > a { background: var(--primary); }
.nav-item.all-cats:hover > a { background: var(--primary-dark); }

/* Mega Menu */
.mega-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.15); z-index: 999; padding: 20px; display: none; min-width: 700px; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.nav-item.all-cats:hover .mega-menu { display: grid; }
.mega-col { display: flex; flex-direction: column; }
.mega-title { font-weight: 700; color: var(--primary); font-size: .85rem; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.mega-col a:not(.mega-title) { color: var(--text-dark); font-size: .82rem; padding: 3px 0; }
.mega-col a:not(.mega-title):hover { color: var(--primary); padding-left: 4px; transition: padding .15s; }

/* ===== Hero Banner ===== */
.hero-section { background: var(--white); }
.banner-carousel .owl-item img { height: 380px; object-fit: cover; border-radius: var(--radius); }
.hero-sidebar { display: flex; flex-direction: column; gap: 8px; }
.hero-sidebar img { border-radius: var(--radius); width: 100%; height: 183px; object-fit: cover; cursor: pointer; transition: transform .2s; }
.hero-sidebar img:hover { transform: scale(1.01); }

/* ===== Section Titles ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-title { font-size: 1.3rem; font-weight: 700; position: relative; padding-left: 14px; }
.section-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 24px; background: var(--accent); border-radius: 2px; }
.view-all { color: var(--primary); font-size: .85rem; font-weight: 600; }
.view-all:hover { text-decoration: underline; color: var(--primary-dark); }

/* ===== Category Cards ===== */
.cat-card { background: var(--white); border-radius: var(--radius); padding: 20px 10px; text-align: center; transition: all .25s; cursor: pointer; border: 2px solid transparent; }
.cat-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-icon { width: 70px; height: 70px; border-radius: 50%; background: linear-gradient(135deg, #e3f2fd, #bbdefb); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 1.8rem; color: var(--primary); }
.cat-name { font-size: .82rem; font-weight: 600; color: var(--text-dark); }

/* ===== Product Cards ===== */
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; transition: all .25s; border: 1px solid var(--border); height: 100%; position: relative; }
.product-card:hover { box-shadow: 0 8px 25px rgba(0,0,0,.12); transform: translateY(-4px); }
.product-img-wrap { position: relative; overflow: hidden; padding-top: 100%; background: #f9f9f9; }
.product-img-wrap img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .3s; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-badge { position: absolute; top: 10px; left: 10px; background: #ff4757; color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; z-index: 1; }
.product-badge.new { background: var(--success); }
.product-badge.hot { background: #ff6b35; }
.product-wishlist { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; background: rgba(255,255,255,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; transition: all .2s; z-index: 1; }
.product-wishlist:hover { background: #ffebeb; color: #ff4757; }
.product-wishlist.active { background: #ffebeb; color: #ff4757; }
.product-info { padding: 12px; }
.product-name { font-size: .88rem; font-weight: 500; color: var(--text-dark); margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; font-size: .75rem; }
.product-rating .count { color: var(--text-muted); }
.product-price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-sale { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.price-original { font-size: .82rem; color: var(--text-muted); text-decoration: line-through; }
.price-discount { font-size: .75rem; color: var(--success); font-weight: 600; }
.btn-add-cart { width: 100%; background: var(--accent); color: #fff; border: none; padding: 9px; font-size: .85rem; font-weight: 600; border-radius: 0 0 var(--radius) var(--radius); transition: background .2s; cursor: pointer; }
.btn-add-cart:hover { background: #d96510; }

/* ===== Flash Sale ===== */
.flash-sale-section { background: #f47920; border-radius: var(--radius); padding: 20px; }
.flash-title { color: #fff; font-size: 1.5rem; font-weight: 900; }
.flash-subtitle { color: rgba(255,255,255,.85); font-size: .85rem; }
.countdown { display: flex; gap: 8px; }
.countdown-box { background: rgba(255,255,255,.2); border-radius: 6px; padding: 6px 10px; text-align: center; min-width: 50px; }
.countdown-num { font-size: 1.4rem; font-weight: 900; color: #fff; line-height: 1; }
.countdown-label { font-size: .6rem; color: rgba(255,255,255,.8); text-transform: uppercase; }

/* ===== Deals Banner ===== */
.deals-banner { border-radius: var(--radius); overflow: hidden; position: relative; cursor: pointer; }
.deals-banner img { width: 100%; height: 220px; object-fit: cover; transition: transform .3s; }
.deals-banner:hover img { transform: scale(1.03); }
.deals-banner-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.5) 0%, transparent 60%); display: flex; align-items: flex-end; padding: 20px; }
.deals-banner-text h5 { color: #fff; font-weight: 700; margin-bottom: 4px; }
.deals-banner-text span { color: rgba(255,255,255,.85); font-size: .82rem; }

/* ===== Filter Sidebar ===== */
.filter-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.filter-title { font-weight: 700; margin-bottom: 15px; font-size: 1rem; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.filter-group label { font-size: .85rem; cursor: pointer; }
.price-range input { width: 100%; }
.price-inputs { display: flex; gap: 8px; }
.price-inputs input { width: 50%; font-size: .85rem; }

/* ===== Product Detail ===== */
.product-detail-imgs .main-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.product-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.product-thumbs img { width: 70px; height: 70px; object-fit: contain; border: 2px solid var(--border); border-radius: 6px; cursor: pointer; transition: border-color .2s; }
.product-thumbs img.active, .product-thumbs img:hover { border-color: var(--primary); }
.product-detail-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.product-detail-price .big-price { font-size: 2rem; font-weight: 900; color: var(--primary); }
.variant-btn { border: 2px solid var(--border); background: var(--white); border-radius: 6px; padding: 6px 16px; font-size: .85rem; cursor: pointer; transition: all .2s; }
.variant-btn.active, .variant-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-input { display: flex; align-items: center; gap: 0; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; }
.qty-btn { background: var(--light-bg); border: none; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; transition: background .2s; }
.qty-btn:hover { background: var(--border); }
.qty-num { width: 50px; text-align: center; border: none; font-size: 1rem; font-weight: 600; }
.btn-buy-now { background: var(--primary); color: #fff; border: none; padding: 12px 30px; font-weight: 700; border-radius: var(--radius); font-size: 1rem; transition: background .2s; }
.btn-buy-now:hover { background: var(--primary-dark); }
.btn-add-wishlist { background: #fff; color: var(--primary); border: 2px solid var(--primary); padding: 12px 20px; border-radius: var(--radius); font-weight: 600; transition: all .2s; }
.btn-add-wishlist:hover { background: #e3f2fd; }

/* ===== Cart ===== */
.cart-table { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-item img { width: 80px; height: 80px; object-fit: contain; }
.cart-summary { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }

/* ===== Auth Pages ===== */
.auth-card { background: var(--white); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,.1); padding: 40px; max-width: 450px; margin: 0 auto; }
.auth-logo { text-align: center; margin-bottom: 25px; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(21,101,192,.2); }

/* ===== Newsletter ===== */
.newsletter-section { background: linear-gradient(135deg, #0a1628 0%, #1565c0 100%); }

/* ===== Footer ===== */
.main-footer { background: #fff; border-top: 3px solid var(--primary); }
.footer-title { font-weight: 700; color: var(--text-dark); margin-bottom: 15px; font-size: .95rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; font-size: .85rem; }
.footer-links a { color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.social-links { display: flex; gap: 8px; }
.social-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; transition: transform .2s; }
.social-btn:hover { transform: scale(1.1); color: #fff; }
.social-btn.fb { background: #3b5998; }
.social-btn.tw { background: #1da1f2; }
.social-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.yt { background: #ff0000; }
.payment-icons img { width: 42px; height: auto; margin-right: 6px; }
.footer-bottom { background: #f8f8f8; border-top: 1px solid var(--border); padding: 15px 0; }

/* ===== Back to Top ===== */
.back-to-top { position: fixed; bottom: 25px; right: 25px; width: 44px; height: 44px; background: var(--primary); color: #fff; border: none; border-radius: 50%; display: none; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(21,101,192,.4); transition: all .2s; z-index: 999; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-2px); }
.back-to-top.show { display: flex; }

/* ===== Breadcrumb ===== */
.page-breadcrumb { background: var(--white); border-bottom: 1px solid var(--border); }
.breadcrumb-item a { color: var(--primary); }

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

/* ===== Rating Stars ===== */
.stars-5 { color: #ffc107; }

/* ===== Admin ===== */
.admin-sidebar { background: var(--secondary); min-height: 100vh; }
.admin-nav-link { color: rgba(255,255,255,.75) !important; padding: 10px 20px !important; border-radius: 6px; margin: 2px 8px; transition: all .2s; }
.admin-nav-link:hover, .admin-nav-link.active { background: var(--primary) !important; color: #fff !important; }
.admin-stat-card { border-left: 4px solid var(--primary); border-radius: var(--radius); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .banner-carousel .owl-item img { height: 200px; }
  .hero-sidebar { flex-direction: row; }
  .hero-sidebar img { height: 96px; }
  .cat-icon { width: 50px; height: 50px; font-size: 1.3rem; }
  .mega-menu { min-width: 100vw; grid-template-columns: repeat(2, 1fr); }
  .product-detail-title { font-size: 1.1rem; }
  .product-detail-price .big-price { font-size: 1.5rem; }
  .auth-card { padding: 25px 15px; }
}

/* ===== Skeleton Loading ===== */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Misc ===== */
.section-bg { background: var(--white); border-radius: var(--radius); padding: 25px; box-shadow: var(--shadow); }
.img-placeholder { background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 2rem; }
.sold-bar { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.sold-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; }
.badge-free { background: var(--success); color: #fff; font-size: .7rem; padding: 2px 6px; border-radius: 4px; }
