/* ============================================================
   FILE: css/style.css
   JOEBEST A1 ELECTRONICS STORE - Main Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

/* ── CSS Variables ── */
:root {
  --orange: #f57c00;
  --orange-light: #ff9800;
  --orange-dark: #e65100;
  --orange-pale: #fff3e0;
  --dark: #1a1a2e;
  --dark-2: #16213e;
  --gray-1: #f8f9fa;
  --gray-2: #e9ecef;
  --gray-3: #dee2e6;
  --gray-4: #ced4da;
  --gray-5: #adb5bd;
  --gray-6: #6c757d;
  --text: #212529;
  --text-muted: #6c757d;
  --white: #ffffff;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --danger: #c62828;
  --danger-light: #ffebee;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-h: 64px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ── Utility ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.flex { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.hidden { display: none !important; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 10px;
  line-height: 1;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  transition: all var(--transition); cursor: pointer; border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange); color: #fff;
  box-shadow: 0 2px 8px rgba(245,124,0,0.25);
}
.btn-primary:hover {
  background: var(--orange-dark); color: #fff;
  box-shadow: 0 4px 16px rgba(245,124,0,0.40);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: transparent; color: var(--orange);
  border-color: var(--orange);
}
.btn-outline:hover {
  background: var(--orange); color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--gray-1); color: var(--text);
}
.btn-ghost:hover { background: var(--gray-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b71c1c; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1b5e20; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── Top Bar ── */
.top-bar {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  padding: 7px 0;
}
.top-bar .container {
  display: flex; justify-content: space-between; align-items: center;
}
.top-bar a { color: rgba(255,255,255,0.75); }
.top-bar a:hover { color: var(--orange-light); }
.top-bar-links { display: flex; gap: 20px; }

/* ── Navigation ── */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--orange);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-md);
}
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--nav-h); padding: 0 20px;
  max-width: 1280px; margin: 0 auto;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 20px; color: var(--dark); white-space: nowrap;
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 38px; height: 38px; background: var(--orange);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.nav-logo span.accent { color: var(--orange); }
.nav-search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center;
  background: var(--gray-1); border: 2px solid var(--gray-3);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition);
}
.nav-search:focus-within { border-color: var(--orange); background: #fff; }
.nav-search input {
  flex: 1; padding: 9px 14px; border: none; background: transparent;
  font-size: 14px; color: var(--text); outline: none;
}
.nav-search button {
  padding: 0 16px; height: 42px; background: var(--orange); color: #fff;
  border: none; font-size: 15px; cursor: pointer;
  transition: background var(--transition);
}
.nav-search button:hover { background: var(--orange-dark); }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: var(--text);
  transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--orange-pale); color: var(--orange); }
.nav-cart {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: var(--text);
  transition: all var(--transition); cursor: pointer; background: var(--gray-1);
}
.nav-cart:hover { background: var(--orange-pale); color: var(--orange); }
.nav-cart .cart-count {
  position: absolute; top: 2px; right: 8px;
  background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}
.nav-user {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text);
  background: var(--gray-1); cursor: pointer;
  transition: all var(--transition);
}
.nav-user:hover { background: var(--orange-pale); color: var(--orange); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; cursor: pointer; border-radius: var(--radius-sm);
  background: var(--gray-1);
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Nav ── */
.mobile-nav {
  display: none; flex-direction: column;
  background: var(--white); border-top: 1px solid var(--gray-3);
  padding: 12px 20px 20px;
}
.mobile-nav.open { display: flex; }
.mobile-nav .nav-search { max-width: 100%; margin-bottom: 12px; }
.mobile-nav a {
  padding: 11px 0; border-bottom: 1px solid var(--gray-2);
  font-size: 15px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.mobile-nav a:hover { color: var(--orange); }

/* ── Category Nav ── */
.category-nav {
  background: var(--dark); padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav .container {
  display: flex; align-items: center; gap: 0;
  white-space: nowrap;
}
.cat-nav-link {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.80); transition: all var(--transition);
  border-bottom: 3px solid transparent; cursor: pointer;
  white-space: nowrap;
}
.cat-nav-link:hover, .cat-nav-link.active {
  color: var(--orange-light); border-bottom-color: var(--orange-light);
  background: rgba(255,255,255,0.05);
}
.cat-nav-link .cat-icon { font-size: 16px; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--dark-2) 0%, var(--dark) 50%, #0d0d1a 100%);
  min-height: 460px; display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(245,124,0,0.18) 0%, transparent 70%);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center; padding: 60px 20px; max-width: 1280px; margin: 0 auto; width: 100%;
  position: relative; z-index: 1;
}
.hero-content { color: #fff; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,124,0,0.2); border: 1px solid rgba(245,124,0,0.4);
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600; color: var(--orange-light);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 52px);
  font-weight: 800; line-height: 1.1; margin-bottom: 16px;
  color: #fff;
}
.hero-title .accent { color: var(--orange-light); }
.hero-subtitle {
  font-size: 16px; color: rgba(255,255,255,0.70); margin-bottom: 28px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-image {
  display: flex; align-items: center; justify-content: center;
}
.hero-image img {
  max-height: 340px; object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(245,124,0,0.3));
  animation: floatY 3.5s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.hero-placeholder {
  width: 280px; height: 280px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245,124,0,0.2), rgba(245,124,0,0.05));
  border: 2px dashed rgba(245,124,0,0.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.4); font-size: 48px; gap: 12px;
}
.hero-placeholder p { font-size: 13px; }

/* ── Section ── */
.section { padding: 56px 0; }
.section-alt { background: var(--gray-1); }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(20px, 3vw, 28px);
  font-weight: 700; color: var(--dark);
}
.section-title span { color: var(--orange); }
.section-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.see-all {
  font-size: 13px; font-weight: 600; color: var(--orange);
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--orange); transition: all var(--transition);
}
.see-all:hover { background: var(--orange); color: #fff; }

/* ── Category Shortcuts ── */
.cat-shortcuts { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 10px; background: var(--white); border-radius: var(--radius);
  border: 2px solid var(--gray-2); cursor: pointer;
  transition: all var(--transition); text-align: center;
}
.cat-card:hover {
  border-color: var(--orange); background: var(--orange-pale);
  transform: translateY(-4px); box-shadow: var(--shadow-md);
}
.cat-card .icon {
  width: 52px; height: 52px; background: var(--orange-pale);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; transition: all var(--transition);
}
.cat-card:hover .icon { background: var(--orange); }
.cat-card span { font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3; }

/* ── Product Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ── Product Card ── */
.product-card {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--gray-2); overflow: hidden;
  transition: all var(--transition); position: relative;
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--orange);
}
.product-card-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  display: flex; flex-direction: column; gap: 4px;
}
.badge-sale {
  background: var(--danger); color: #fff;
  padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700;
}
.badge-new {
  background: var(--success); color: #fff;
  padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700;
}
.product-img-wrap {
  aspect-ratio: 1; overflow: hidden; background: var(--gray-1);
  display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 48px; color: var(--gray-4);
  background: linear-gradient(135deg, var(--gray-1), var(--gray-2));
}
.product-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-category {
  font-size: 11px; color: var(--orange); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
}
.product-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 8px; line-height: 1.4; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-price-wrap { margin-bottom: 12px; }
.product-price {
  font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--orange);
}
.product-price-original {
  font-size: 13px; color: var(--text-muted); text-decoration: line-through; margin-left: 6px;
}
.product-actions { display: flex; gap: 8px; }
.product-actions .btn { flex: 1; padding: 8px 10px; font-size: 12.5px; }

/* ── Promo Banner ── */
.promo-banner {
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
  border-radius: var(--radius-lg); padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  overflow: hidden; position: relative;
}
.promo-banner::before {
  content: ''; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.07); top: -100px; right: -80px;
}
.promo-text { color: #fff; position: relative; z-index: 1; }
.promo-text h3 { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.promo-text p { font-size: 14px; opacity: 0.9; margin-bottom: 16px; }

/* ── Products Page ── */
.page-header {
  background: linear-gradient(135deg, var(--dark-2), var(--dark));
  color: #fff; padding: 40px 0;
}
.page-header h1 { font-family: var(--font-display); font-size: 32px; font-weight: 800; }
.page-header p { color: rgba(255,255,255,0.65); margin-top: 4px; }
.products-page-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; padding: 36px 0; }
.sidebar {
  background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2);
  padding: 20px; height: fit-content; position: sticky; top: 80px;
}
.sidebar h3 {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  margin-bottom: 14px; color: var(--dark); padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-2);
}
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.filter-radio { display: flex; flex-direction: column; gap: 6px; }
.filter-radio label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 400; color: var(--text);
  cursor: pointer; padding: 6px 8px; border-radius: var(--radius-sm);
  transition: background var(--transition); text-transform: none; letter-spacing: 0;
}
.filter-radio label:hover { background: var(--orange-pale); }
.filter-radio input[type="radio"] { accent-color: var(--orange); }
.products-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.products-count { font-size: 14px; color: var(--text-muted); }
.products-count strong { color: var(--text); }
.sort-select {
  padding: 8px 12px; border: 1.5px solid var(--gray-3);
  border-radius: var(--radius-sm); font-size: 13px; background: var(--white);
  color: var(--text); outline: none; cursor: pointer;
  transition: border-color var(--transition);
}
.sort-select:focus { border-color: var(--orange); }
.no-products {
  grid-column: 1/-1; text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.no-products .icon { font-size: 48px; margin-bottom: 12px; }
.no-products h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* ── Product Detail ── */
.product-detail-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 48px 0;
}
.product-gallery { position: sticky; top: 80px; height: fit-content; }
.main-img-wrap {
  aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  border: 2px solid var(--gray-2); background: var(--gray-1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.main-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.thumb-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-3); overflow: hidden; cursor: pointer;
  transition: border-color var(--transition); background: var(--gray-1);
}
.thumb:hover, .thumb.active { border-color: var(--orange); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-video-wrap { margin-top: 16px; border-radius: var(--radius); overflow: hidden; }
.product-video-wrap video, .product-video-wrap iframe {
  width: 100%; border-radius: var(--radius); border: 2px solid var(--gray-2);
}
.product-info { }
.product-info .category-tag {
  display: inline-block; background: var(--orange-pale); color: var(--orange);
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 10px;
}
.product-info h1 {
  font-family: var(--font-display); font-size: clamp(20px, 3vw, 30px);
  font-weight: 800; color: var(--dark); margin-bottom: 14px; line-height: 1.2;
}
.product-info .price-block { margin-bottom: 20px; }
.price-main {
  font-family: var(--font-display); font-size: 32px; font-weight: 800; color: var(--orange);
}
.price-original {
  font-size: 18px; color: var(--text-muted); text-decoration: line-through; margin-left: 8px;
}
.price-save {
  display: inline-block; background: var(--danger-light); color: var(--danger);
  padding: 2px 10px; border-radius: 4px; font-size: 12px; font-weight: 700;
  margin-left: 8px;
}
.product-info .description {
  font-size: 14.5px; color: var(--text-muted); line-height: 1.8; margin-bottom: 24px;
}
.quantity-wrap {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.quantity-wrap label { font-size: 14px; font-weight: 600; }
.qty-ctrl {
  display: flex; align-items: center; border: 2px solid var(--gray-3);
  border-radius: var(--radius-sm); overflow: hidden;
}
.qty-btn {
  width: 36px; height: 36px; background: var(--gray-1);
  border: none; font-size: 18px; cursor: pointer;
  transition: background var(--transition); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--orange); color: #fff; }
.qty-val {
  width: 44px; text-align: center; border: none; outline: none;
  font-size: 15px; font-weight: 600; padding: 0; background: #fff;
}
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.specs-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.specs-table tr { border-bottom: 1px solid var(--gray-2); }
.specs-table td { padding: 10px 12px; font-size: 13.5px; }
.specs-table td:first-child { color: var(--text-muted); font-weight: 500; width: 40%; }
.specs-table td:last-child { font-weight: 500; }
.specs-section { margin-top: 28px; }
.specs-section h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 12px; }

/* ── Cart Page ── */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; padding: 36px 0; }
.cart-table-wrap { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2); overflow: hidden; }
.cart-table-header {
  display: grid; grid-template-columns: 2.5fr 1fr 1.2fr 1fr auto;
  padding: 14px 20px; background: var(--gray-1); border-bottom: 2px solid var(--gray-2);
  font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.cart-item {
  display: grid; grid-template-columns: 2.5fr 1fr 1.2fr 1fr auto;
  padding: 16px 20px; border-bottom: 1px solid var(--gray-2); align-items: center;
  gap: 12px;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { display: flex; align-items: center; gap: 14px; }
.cart-item-img {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-2); overflow: hidden; flex-shrink: 0;
  background: var(--gray-1); display: flex; align-items: center; justify-content: center;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.cart-item-cat { font-size: 12px; color: var(--text-muted); }
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--orange); }
.cart-qty-ctrl { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--gray-3); border-radius: var(--radius-sm); width: fit-content; overflow: hidden; }
.cart-qty-btn { width: 30px; height: 30px; background: var(--gray-1); border: none; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.cart-qty-btn:hover { background: var(--orange); color: #fff; }
.cart-qty-val { width: 36px; text-align: center; font-size: 14px; font-weight: 600; border: none; outline: none; background: #fff; }
.cart-item-total { font-size: 15px; font-weight: 700; color: var(--text); }
.cart-remove { padding: 6px; background: var(--danger-light); color: var(--danger); border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; border: none; transition: all var(--transition); }
.cart-remove:hover { background: var(--danger); color: #fff; }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty .icon { font-size: 52px; margin-bottom: 14px; }
.cart-empty h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.cart-empty p { color: var(--text-muted); margin-bottom: 20px; }
.order-summary {
  background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2);
  padding: 22px; height: fit-content; position: sticky; top: 80px;
}
.order-summary h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; }
.summary-row.total { font-size: 17px; font-weight: 700; border-top: 2px solid var(--gray-2); padding-top: 14px; margin-top: 8px; }
.summary-row.total .price { color: var(--orange); font-family: var(--font-display); }
.address-wrap { margin: 16px 0; }
.address-wrap label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.address-wrap textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-3);
  border-radius: var(--radius-sm); font-size: 13px; resize: vertical;
  min-height: 80px; transition: border-color var(--transition); outline: none;
}
.address-wrap textarea:focus { border-color: var(--orange); }
.coupon-wrap { display: flex; gap: 8px; margin-bottom: 16px; }
.coupon-wrap input {
  flex: 1; padding: 9px 12px; border: 1.5px solid var(--gray-3);
  border-radius: var(--radius-sm); font-size: 13px; outline: none;
  transition: border-color var(--transition);
}
.coupon-wrap input:focus { border-color: var(--orange); }

/* ── Auth Pages ── */
.auth-page { min-height: calc(100vh - var(--nav-h)); background: var(--gray-1); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg); border: 1.5px solid var(--gray-2);
}
.auth-card .logo { text-align: center; margin-bottom: 28px; }
.auth-card h2 { font-family: var(--font-display); font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-3);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--white);
  transition: border-color var(--transition); outline: none; color: var(--text);
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245,124,0,0.1); }
.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--orange); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Profile Page ── */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 36px 0; }
.profile-sidebar { }
.profile-card {
  background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2);
  padding: 24px; text-align: center; margin-bottom: 16px;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; color: #fff; margin: 0 auto 12px; font-weight: 700;
  font-family: var(--font-display);
}
.profile-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.profile-email { font-size: 13px; color: var(--text-muted); }
.profile-menu { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2); overflow: hidden; }
.profile-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; font-size: 14px; font-weight: 500; cursor: pointer;
  border-bottom: 1px solid var(--gray-2); transition: all var(--transition);
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:hover, .profile-menu-item.active { background: var(--orange-pale); color: var(--orange); }
.profile-content-box { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2); padding: 28px; }
.profile-content-box h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* ── Admin ── */
.admin-login { min-height: 100vh; background: var(--dark); display: flex; align-items: center; justify-content: center; }
.admin-login .auth-card { max-width: 380px; }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: var(--dark); color: #fff; padding: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-logo {
  padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-display); font-size: 16px; font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.admin-logo .dot { width: 10px; height: 10px; background: var(--orange); border-radius: 50%; }
.admin-menu { padding: 16px 0; }
.admin-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.65);
  cursor: pointer; transition: all var(--transition); border-left: 3px solid transparent;
}
.admin-menu-item:hover, .admin-menu-item.active {
  color: #fff; background: rgba(245,124,0,0.15); border-left-color: var(--orange);
}
.admin-main { background: var(--gray-1); overflow-y: auto; }
.admin-topbar {
  background: var(--white); padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1.5px solid var(--gray-2); position: sticky; top: 0; z-index: 10;
  box-shadow: var(--shadow-sm);
}
.admin-topbar h2 { font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.admin-content { padding: 24px 28px; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius); padding: 20px;
  border: 1.5px solid var(--gray-2); display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--orange-pale); color: var(--orange);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.stat-val { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--dark); }
.stat-lbl { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.admin-card { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--gray-2); overflow: hidden; margin-bottom: 24px; }
.admin-card-header {
  padding: 16px 20px; border-bottom: 1.5px solid var(--gray-2);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--gray-1);
}
.admin-card-header h3 { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 12px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--gray-2); }
.admin-table th { background: var(--gray-1); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-size: 11px; }
.admin-table tr:hover td { background: var(--orange-pale); }
.admin-table td .product-thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--gray-2); }
.admin-form { padding: 24px; }
.admin-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form .form-full { grid-column: 1 / -1; }
.admin-form .form-group { }
.admin-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.admin-form .form-control, .admin-form select, .admin-form textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-3);
  border-radius: var(--radius-sm); font-size: 13px; background: var(--white);
  outline: none; transition: border-color var(--transition); font-family: inherit;
}
.admin-form .form-control:focus, .admin-form select:focus, .admin-form textarea:focus { border-color: var(--orange); }
.admin-form textarea { min-height: 90px; resize: vertical; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.form-check input { accent-color: var(--orange); width: 15px; height: 15px; }
.img-preview-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.img-preview {
  width: 70px; height: 70px; border-radius: var(--radius-sm);
  border: 2px solid var(--gray-3); overflow: hidden; position: relative;
  background: var(--gray-1); cursor: pointer;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview .rm { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; background: var(--danger); border-radius: 50%; color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ── Toast ── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  background: var(--dark); color: #fff; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg); min-width: 260px; max-width: 340px;
  animation: slideInToast 0.3s ease, fadeOut 0.4s ease 2.6s forwards;
  pointer-events: all;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--dark-2); border-left: 4px solid var(--orange); }
@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(40px); }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white); border-radius: var(--radius-lg); padding: 0;
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  transform: scale(0.95); transition: transform 0.2s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  padding: 20px 24px; border-bottom: 1.5px solid var(--gray-2);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-header h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.modal-close { font-size: 20px; cursor: pointer; color: var(--text-muted); background: var(--gray-1); border: none; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.modal-close:hover { background: var(--gray-2); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1.5px solid var(--gray-2); display: flex; justify-content: flex-end; gap: 10px; }

/* ── Footer ── */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-brand .nav-logo { margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; line-height: 1.7; }
.footer-col h4 { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--orange-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0; display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px;
}
.footer-pay { display: flex; gap: 8px; align-items: center; }
.pay-icon {
  background: rgba(255,255,255,0.1); padding: 4px 10px;
  border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff;
}

/* ── Loading ── */
.loader {
  width: 36px; height: 36px; border: 3px solid var(--gray-2);
  border-top-color: var(--orange); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, var(--gray-2) 25%, var(--gray-1) 50%, var(--gray-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .cat-shortcuts { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .products-page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .profile-layout { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-image { display: none; }
  .hero-actions { justify-content: center; }
  .cart-table-header { display: none; }
  .cart-item { grid-template-columns: 1fr auto; gap: 10px; }
  .cart-item > *:not(.cart-item-info):not(.cart-remove) { display: none; }
  .cart-item-info { grid-column: 1; }
  .cart-remove { grid-column: 2; grid-row: 1; }
  .admin-form .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-search { display: none; }
  .cat-shortcuts { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .top-bar .top-bar-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 36px 0; }
  .promo-banner { flex-direction: column; text-align: center; }
  .category-nav .container { padding: 0 8px; }
}

@media (max-width: 480px) {
  .cat-shortcuts { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-body { padding: 10px; }
  .product-name { font-size: 13px; }
  .product-price { font-size: 15px; }
  .product-actions { flex-direction: column; }
  .hero-title { font-size: 24px; }
  .auth-card { padding: 24px 20px; }
  .container { padding: 0 14px; }
}

/* ── Performance & Touch Fixes (appended) ─────────────────── */

/* Eliminate 300ms tap delay on all interactive elements */
a, button, .btn, .cat-card, .product-card, .nav-link, .nav-cart,
.nav-user, .hamburger, .profile-menu-item, .pmenu-btn,
.pay-method-btn, .cart-qty-btn, .cart-remove {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile nav links — large tap targets */
.mobile-nav a {
  display: block;
  padding: 13px 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Hamburger — instantly responsive on touch */
.hamburger {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Force GPU compositing on animated elements */
.product-card, .cat-card, .btn, .modal, .toast {
  will-change: transform;
}

/* Product images — prevent layout shift */
.product-img-wrap {
  contain: layout style;
}
.product-img-wrap img {
  content-visibility: auto;
}

/* Skeleton loader animation — GPU only */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--gray-2) 25%, var(--gray-1) 50%, var(--gray-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

/* Smooth scroll everywhere */
html { scroll-behavior: smooth; }

/* Prevent text size adjustment on mobile rotation */
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ── International shipping badge ─────────────────────────── */
.badge-intl {
  position: absolute;
  top: 36px;
  left: 8px;
  background: #1D4ED8;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .3px;
  white-space: nowrap;
  z-index: 2;
}
