/* ============================
   DigiMart - Main Stylesheet
   ============================ */

:root {
  --primary: #6C63FF;
  --primary-dark: #5a52d5;
  --secondary: #FF6584;
  --accent: #43E97B;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --dark-3: #0f3460;
  --text: #2d3748;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --bg: #f7f8fc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f0f4f8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 4px 15px rgba(108,99,255,.12);
  --shadow-lg: 0 10px 40px rgba(108,99,255,.18);
  --shadow-xl: 0 20px 60px rgba(108,99,255,.22);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', 'Hind Siliguri', sans-serif;
  --gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
  --gradient-2: linear-gradient(135deg, #43E97B 0%, #38F9D7 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ============================
   PRELOADER
   ============================ */
#preloader {
  position: fixed; inset: 0; background: var(--dark); z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { text-align: center; }
.preloader-logo {
  font-size: 2.5rem; font-weight: 800; color: #fff;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 20px; letter-spacing: -1px;
}
.preloader-bar { width: 200px; height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; margin: 0 auto; }
.preloader-fill { height: 100%; background: var(--gradient); border-radius: 2px; animation: preload 1.5s ease-in-out infinite; }
@keyframes preload { 0%{width:0} 60%{width:100%} 100%{width:100%} }

/* ============================
   TOPBAR
   ============================ */
.topbar {
  background: var(--dark); color: rgba(255,255,255,.7);
  padding: 8px 0; font-size: .8rem;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; }
.topbar-left { display: flex; gap: 20px; }
.topbar-right { display: flex; gap: 8px; }
.lang-btn {
  padding: 2px 10px; border-radius: var(--radius-full);
  color: rgba(255,255,255,.7); font-size: .75rem; transition: var(--transition);
}
.lang-btn.active, .lang-btn:hover { background: var(--primary); color: #fff; }

/* ============================
   HEADER
   ============================ */
.site-header {
  background: #fff; box-shadow: 0 2px 20px rgba(0,0,0,.06);
  position: sticky; top: 0; z-index: 1000;
  transition: var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 30px rgba(108,99,255,.15); }
.header-inner {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 0; flex-wrap: nowrap;
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.logo-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: #fff; letter-spacing: -0.5px;
}
.logo-title { font-size: 1.2rem; font-weight: 800; color: var(--dark); line-height: 1.1; }
.logo-sub { font-size: .65rem; color: var(--text-light); display: block; }

.header-search { flex: 1; max-width: 480px; }
.search-wrapper { position: relative; }
.search-wrapper input {
  width: 100%; padding: 11px 48px 11px 18px;
  border: 2px solid var(--border); border-radius: var(--radius-full);
  font-size: .9rem; transition: var(--transition); background: var(--bg);
  color: var(--text);
}
.search-wrapper input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108,99,255,.1); background: #fff;
}
.search-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.search-btn:hover { transform: translateY(-50%) scale(1.05); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* User Menu */
.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px;
  border-radius: var(--radius-full); border: 2px solid var(--border);
  font-size: .85rem; font-weight: 500; transition: var(--transition); background: #fff;
}
.user-btn:hover { border-color: var(--primary); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xl);
  min-width: 200px; padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: var(--transition); z-index: 100;
}
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 8px; font-size: .85rem; color: var(--text); transition: var(--transition);
}
.user-dropdown a:hover { background: var(--bg); color: var(--primary); }
.user-dropdown a.admin-link { color: var(--primary); }
.user-dropdown a.logout-link { color: var(--secondary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* Mobile Menu */
.mobile-menu-btn {
  display: none; flex-direction: column; gap: 5px; padding: 6px;
  width: 38px;
}
.mobile-menu-btn span {
  display: block; height: 2px; background: var(--text); border-radius: 2px;
  transition: var(--transition);
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Navigation */
.site-nav { border-top: 1px solid var(--border-light); }
.nav-list {
  display: flex; align-items: center; gap: 4px; padding: 6px 0;
}
.nav-link {
  display: flex; align-items: center; gap: 4px; padding: 8px 14px;
  border-radius: 8px; font-size: .88rem; font-weight: 500; color: var(--text);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--primary); background: rgba(108,99,255,.06); }
.has-dropdown { position: relative; }
.nav-dropdown {
  position: absolute; left: 0; top: calc(100% + 8px);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xl);
  min-width: 220px; padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: var(--transition); z-index: 100;
}
.has-dropdown:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: 8px; font-size: .85rem; color: var(--text); transition: var(--transition);
}
.nav-dropdown a:hover { background: rgba(108,99,255,.06); color: var(--primary); }
.cat-icon { font-size: 1.1rem; }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--radius-full); font-size: .9rem;
  font-weight: 600; transition: var(--transition); cursor: pointer; border: 2px solid transparent;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--gradient); color: #fff; box-shadow: 0 4px 15px rgba(108,99,255,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(108,99,255,.45); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #e05575; transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: .82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ============================
   FLASH / ALERT
   ============================ */
.flash-container { position: sticky; top: 70px; z-index: 900; }
.alert {
  display: flex; align-items: center; gap: 12px; padding: 14px 20px;
  margin: 0; font-size: .9rem; font-weight: 500; animation: slideDown .3s ease;
}
@keyframes slideDown { from{transform:translateY(-20px);opacity:0} to{transform:translateY(0);opacity:1} }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid var(--accent); }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid var(--secondary); }
.alert-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.alert-icon { font-size: 1.1rem; }

/* ============================
   HERO SECTION
   ============================ */
.hero {
  background: var(--gradient-dark); color: #fff; overflow: hidden;
  position: relative; padding: 80px 0 60px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236C63FF' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 16px; border-radius: var(--radius-full); font-size: .8rem; margin-bottom: 20px;
}
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.2;
  margin-bottom: 20px; letter-spacing: -1px;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, #FFD700, #FF6584);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.75); margin-bottom: 32px; line-height: 1.7; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 40px; }
.hero-stat .num { font-size: 1.8rem; font-weight: 800; color: #fff; }
.hero-stat .label { font-size: .78rem; color: rgba(255,255,255,.6); }

.hero-visual { position: relative; }
.hero-cards { display: grid; gap: 16px; }
.hero-card {
  background: rgba(255,255,255,.08); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-lg);
  padding: 20px; display: flex; align-items: center; gap: 16px;
  transition: var(--transition);
}
.hero-card:hover { background: rgba(255,255,255,.12); transform: translateX(4px); }
.hero-card-icon {
  width: 48px; height: 48px; border-radius: var(--radius); background: var(--gradient);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.hero-card-info .title { font-weight: 600; margin-bottom: 4px; }
.hero-card-info .meta { font-size: .8rem; color: rgba(255,255,255,.6); }

/* ============================
   SECTION HEADERS
   ============================ */
.section-header { text-align: center; margin-bottom: 50px; }
.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(108,99,255,.08); color: var(--primary);
  padding: 6px 16px; border-radius: var(--radius-full); font-size: .78rem; font-weight: 600;
  margin-bottom: 14px; letter-spacing: .5px; text-transform: uppercase;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800;
  color: var(--dark); margin-bottom: 14px; letter-spacing: -0.5px;
}
.section-sub { color: var(--text-light); max-width: 550px; margin: 0 auto; font-size: .95rem; }

/* ============================
   CATEGORIES
   ============================ */
.categories-section { padding: 70px 0; }
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.category-card {
  background: #fff; border-radius: var(--radius-lg); padding: 28px 20px;
  text-align: center; border: 2px solid var(--border); transition: var(--transition);
  cursor: pointer; text-decoration: none; color: var(--text);
}
.category-card:hover {
  border-color: var(--primary); transform: translateY(-4px);
  box-shadow: var(--shadow-lg); color: var(--primary);
}
.category-icon { font-size: 2.2rem; margin-bottom: 12px; display: block; }
.category-name { font-weight: 600; font-size: .88rem; }
.category-count { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* ============================
   PRODUCT CARDS
   ============================ */
.products-section { padding: 70px 0; background: var(--bg); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

.product-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); transition: var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-xl);
  border-color: rgba(108,99,255,.2);
}
.product-thumb { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-thumb img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-new { background: var(--accent); color: var(--dark); }
.badge-hot { background: var(--secondary); color: #fff; }
.badge-sale { background: var(--primary); color: #fff; }
.product-discount-tag {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--secondary); color: #fff;
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700;
}

.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-category-tag {
  font-size: .72rem; color: var(--primary); font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 8px;
}
.product-title {
  font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 10px;
  line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-title a { color: inherit; }
.product-title a:hover { color: var(--primary); }
.product-desc {
  font-size: .82rem; color: var(--text-light); margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.star { color: #ddd; font-size: .9rem; }
.star.filled { color: #fbbf24; }
.rating-count { font-size: .75rem; color: var(--text-muted); }

.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-price { }
.price-original { font-size: .8rem; color: var(--text-muted); text-decoration: line-through; }
.price-current { font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.product-buy-btn {
  background: var(--gradient); color: #fff; padding: 9px 20px;
  border-radius: var(--radius-full); font-size: .82rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.product-buy-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(108,99,255,.35); }

/* ============================
   PRODUCT DETAIL PAGE
   ============================ */
.product-detail { padding: 50px 0 80px; }
.product-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-light); margin-bottom: 30px; }
.product-breadcrumb a { color: var(--primary); }
.product-breadcrumb span { color: var(--text-muted); }

.product-detail-grid { display: grid; grid-template-columns: 1fr 420px; gap: 50px; align-items: start; }

.product-gallery { }
.main-image { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 12px; aspect-ratio: 16/10; background: var(--bg); }
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumb {
  width: 70px; height: 55px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--border); cursor: pointer; transition: var(--transition);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-info { }
.product-info .category-tag { font-size: .78rem; color: var(--primary); font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.product-info h1 { font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 800; color: var(--dark); margin-bottom: 14px; line-height: 1.3; }
.product-info .rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.product-info .downloads { font-size: .82rem; color: var(--text-muted); }

.price-box {
  background: linear-gradient(135deg, rgba(108,99,255,.05), rgba(255,101,132,.05));
  border: 1px solid rgba(108,99,255,.15); border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 24px;
}
.price-box .price-display { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.price-box .price-big { font-size: 2.4rem; font-weight: 900; color: var(--primary); }
.price-box .price-old { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; }
.price-box .discount-label { background: var(--secondary); color: #fff; padding: 3px 10px; border-radius: var(--radius-full); font-size: .78rem; font-weight: 700; }
.price-box .price-note { font-size: .78rem; color: var(--text-light); }

.buy-box { margin-bottom: 24px; }
.buy-box .coupon-row { display: flex; gap: 10px; margin-bottom: 14px; }
.buy-box .coupon-input { flex: 1; padding: 11px 16px; border: 2px solid var(--border); border-radius: var(--radius-full); font-size: .88rem; transition: var(--transition); }
.buy-box .coupon-input:focus { outline: none; border-color: var(--primary); }
.buy-box .coupon-btn { padding: 11px 20px; border-radius: var(--radius-full); background: var(--border); font-size: .85rem; font-weight: 600; transition: var(--transition); }
.buy-box .coupon-btn:hover { background: var(--primary); color: #fff; }
.buy-btn-large {
  width: 100%; padding: 16px; border-radius: var(--radius-full);
  background: var(--gradient); color: #fff; font-size: 1.05rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 6px 20px rgba(108,99,255,.4); transition: var(--transition);
}
.buy-btn-large:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(108,99,255,.5); }

.product-meta-list { display: grid; gap: 10px; }
.product-meta-item { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.product-meta-item .icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(108,99,255,.08); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.product-meta-item .label { color: var(--text-muted); }
.product-meta-item .val { font-weight: 600; color: var(--text); }

.product-tabs { margin-top: 50px; }
.tab-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 30px; }
.tab-btn {
  padding: 12px 22px; font-size: .88rem; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition);
  background: none; cursor: pointer;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============================
   CHECKOUT PAGE
   ============================ */
.checkout-page { padding: 50px 0 80px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; }
.checkout-card {
  background: #fff; border-radius: var(--radius-lg); padding: 30px;
  border: 1px solid var(--border); margin-bottom: 24px;
}
.checkout-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--dark); }

.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 7px; }
.form-control {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: var(--radius); font-size: .9rem; transition: var(--transition);
  background: var(--bg); color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(108,99,255,.1); }
.form-control.is-error { border-color: var(--secondary); }
.form-error { font-size: .78rem; color: var(--secondary); margin-top: 4px; }

.payment-options { display: grid; gap: 12px; }
.payment-option {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer;
  transition: var(--transition);
}
.payment-option:hover, .payment-option.selected { border-color: var(--primary); background: rgba(108,99,255,.04); }
.payment-option input[type=radio] { width: 18px; height: 18px; accent-color: var(--primary); }
.payment-logo { font-weight: 800; font-size: 1rem; padding: 6px 12px; border-radius: 8px; }
.pay-bkash { background: #e2136e; color: #fff; }
.pay-nagad { background: #f55f2a; color: #fff; }
.payment-desc { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

.order-summary-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; position: sticky; top: 100px; }
.order-summary-header { background: var(--gradient); color: #fff; padding: 20px 24px; }
.order-summary-header h3 { font-weight: 700; }
.order-summary-body { padding: 24px; }
.summary-product { display: flex; gap: 14px; margin-bottom: 20px; }
.summary-product img { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.summary-product .title { font-weight: 600; font-size: .9rem; color: var(--dark); }
.summary-product .category { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.summary-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: .88rem; }
.summary-line:last-child { border-bottom: none; }
.summary-line.total { font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.summary-line .discount-val { color: var(--accent); font-weight: 600; }

/* ============================
   AUTH PAGES
   ============================ */
.auth-page {
  min-height: calc(100vh - 200px);
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  display: flex; align-items: center; justify-content: center; padding: 60px 20px;
}
.auth-card {
  background: #fff; border-radius: var(--radius-xl); padding: 44px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow-xl);
}
.auth-logo { text-align: center; margin-bottom: 30px; }
.auth-logo .logo-icon { width: 60px; height: 60px; border-radius: 16px; font-size: 1.4rem; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; background: var(--gradient); color: #fff; font-weight: 800; }
.auth-logo h1 { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.auth-logo p { font-size: .85rem; color: var(--text-muted); }
.auth-divider { text-align: center; color: var(--text-muted); font-size: .82rem; margin: 20px 0; position: relative; }
.auth-divider::before { content:''; position:absolute; left:0; top:50%; width:40%; height:1px; background:var(--border); }
.auth-divider::after { content:''; position:absolute; right:0; top:50%; width:40%; height:1px; background:var(--border); }
.auth-link { text-align: center; font-size: .85rem; color: var(--text-muted); margin-top: 20px; }
.auth-link a { color: var(--primary); font-weight: 600; }

/* ============================
   DASHBOARD
   ============================ */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 170px); }
.dashboard-sidebar { background: var(--dark); color: #fff; padding: 30px 0; }
.sidebar-user { padding: 0 20px 24px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.sidebar-user .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--gradient); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.sidebar-user .name { font-weight: 700; font-size: .95rem; }
.sidebar-user .email { font-size: .75rem; color: rgba(255,255,255,.5); }
.sidebar-nav { padding: 0 12px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-radius: 8px; font-size: .87rem; color: rgba(255,255,255,.7);
  transition: var(--transition); margin-bottom: 2px;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: rgba(108,99,255,.3); color: #fff; }
.dashboard-main { padding: 36px; background: var(--bg); }
.dashboard-title { font-size: 1.6rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.dashboard-sub { color: var(--text-muted); font-size: .88rem; margin-bottom: 32px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 36px; }
.stat-card {
  background: #fff; border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon { width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.stat-icon.purple { background: rgba(108,99,255,.1); }
.stat-icon.pink { background: rgba(255,101,132,.1); }
.stat-icon.green { background: rgba(67,233,123,.1); }
.stat-icon.blue { background: rgba(59,130,246,.1); }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--dark); }
.stat-label { font-size: .78rem; color: var(--text-muted); }

/* ============================
   DATA TABLES
   ============================ */
.data-table-wrap { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.data-table-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.data-table-header h3 { font-weight: 700; font-size: 1rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 18px; background: var(--bg); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); text-align: left; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 18px; font-size: .87rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(108,99,255,.02); }

/* Status Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-paid { background: #d1fae5; color: #065f46; }
.badge-delivered { background: #dbeafe; color: #1e40af; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-refunded { background: #ede9fe; color: #5b21b6; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.badge-banned { background: #fee2e2; color: #991b1b; }

/* ============================
   ADMIN PANEL
   ============================ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; background: var(--dark); flex-shrink: 0;
  display: flex; flex-direction: column; position: fixed; height: 100vh; overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 10px;
}
.admin-sidebar-logo .logo-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--gradient); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: .9rem; }
.admin-sidebar-logo .title { font-weight: 700; color: #fff; font-size: .95rem; }
.admin-sidebar-logo .sub { font-size: .7rem; color: rgba(255,255,255,.4); }
.admin-nav-section { padding: 16px 12px 8px; }
.admin-nav-section-title { font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.3); font-weight: 600; padding: 0 8px; margin-bottom: 6px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; color: rgba(255,255,255,.65); font-size: .85rem; font-weight: 500;
  transition: var(--transition); margin-bottom: 2px; text-decoration: none;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.active { background: rgba(108,99,255,.25); color: #fff; }

.admin-main { margin-left: 260px; flex: 1; background: var(--bg); min-height: 100vh; }
.admin-topbar {
  background: #fff; padding: 16px 30px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100;
}
.admin-topbar h2 { font-size: 1.1rem; font-weight: 700; color: var(--dark); }
.admin-content { padding: 30px; }

.admin-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.admin-stat-card {
  background: #fff; border-radius: var(--radius-lg); padding: 24px;
  border: 1px solid var(--border); transition: var(--transition);
}
.admin-stat-card:hover { box-shadow: var(--shadow); }
.admin-stat-card .stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.admin-stat-card .stat-icon2 { width: 44px; height: 44px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.admin-stat-card .stat-num { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.admin-stat-card .stat-label { font-size: .78rem; color: var(--text-muted); }
.admin-stat-card .stat-change { font-size: .78rem; font-weight: 600; }
.stat-change.up { color: var(--accent); }
.stat-change.down { color: var(--secondary); }

/* ============================
   SUCCESS PAGE
   ============================ */
.success-page { padding: 80px 0; text-align: center; }
.success-card { background: #fff; border-radius: var(--radius-xl); padding: 60px 40px; max-width: 550px; margin: 0 auto; box-shadow: var(--shadow-xl); }
.success-icon { width: 80px; height: 80px; border-radius: 50%; background: var(--gradient-2); display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 24px; }
.success-card h1 { font-size: 1.8rem; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.success-card p { color: var(--text-light); margin-bottom: 30px; }
.order-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 30px; text-align: left; }
.order-info-item { background: var(--bg); border-radius: var(--radius); padding: 14px; }
.order-info-item .label { font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.order-info-item .value { font-weight: 700; font-size: .9rem; color: var(--dark); }
.download-area { background: linear-gradient(135deg, rgba(108,99,255,.06), rgba(255,101,132,.06)); border: 2px dashed rgba(108,99,255,.3); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px; }
.download-area h3 { font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.download-area p { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; }

/* ============================
   PAGINATION
   ============================ */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 40px 0 0; }
.page-btn {
  width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: .88rem; font-weight: 600; transition: var(--transition); border: 2px solid var(--border);
  color: var(--text); background: #fff;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(108,99,255,.35); }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ============================
   BACK TO TOP
   ============================ */
.back-to-top {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 15px rgba(108,99,255,.4); transition: var(--transition);
  opacity: 0; visibility: hidden; transform: translateY(10px);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ============================
   FOOTER
   ============================ */
.site-footer { background: var(--dark); color: rgba(255,255,255,.75); }
.footer-top { padding: 70px 0 50px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .logo-title { color: #fff; font-size: 1.1rem; font-weight: 800; }
.footer-brand .logo-sub { color: rgba(255,255,255,.4); font-size: .7rem; }
.footer-brand p { font-size: .85rem; color: rgba(255,255,255,.55); line-height: 1.7; margin-bottom: 20px; }
.social-links { display: flex; gap: 10px; }
.social-link { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.65); transition: var(--transition); }
.social-link:hover { background: var(--primary); color: #fff; }
.footer-col h4 { font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .83rem; color: rgba(255,255,255,.55); transition: var(--transition); }
.footer-col ul a:hover { color: var(--primary); padding-left: 4px; }
.payment-badges { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.pay-badge { padding: 4px 12px; border-radius: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .5px; }
.pay-badge.bkash { background: #e2136e; color: #fff; }
.pay-badge.nagad { background: #f55f2a; color: #fff; }
.pay-badge.rocket { background: #8b5cf6; color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.06); padding: 20px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: .78rem; color: rgba(255,255,255,.35); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1100px) {
  .product-detail-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .order-summary-card { position: static; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { display: none; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .topbar { display: none; }
}

@media (max-width: 700px) {
  .header-search { display: none; }
  .mobile-menu-btn { display: flex; }
  .site-nav { display: none; }
  .site-nav.open { display: block; }
  .nav-list { flex-direction: column; padding: 12px 0; }
  .hero { padding: 50px 0 40px; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-main { padding: 20px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr; }
  .order-info-grid { grid-template-columns: 1fr; }
}

/* ============================
   UTILITIES
   ============================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.pt-40 { padding-top: 40px; }
.pb-40 { padding-bottom: 40px; }
.gap-10 { gap: 10px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 4rem; margin-bottom: 16px; opacity: .5; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
