/* ===== RAMS ELECTRONICS — Master Stylesheet ===== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #6C63FF;
  --primary-dark: #564fd6;
  --primary-light: #e8e6ff;
  --accent: #FF6584;
  --bg: #f0f2f5;
  --surface: #ffffff;
  --text: #2d3436;
  --text-muted: #636e72;
  --border: #dfe6e9;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .25s ease;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  touch-action: none;
}

a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: .95rem; }

/* ---------- NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--nav-height);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-brand {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-brand i { font-size: 1.4rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  padding: .5rem .8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.cart-btn {
  position: relative;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .55rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.cart-btn:hover { background: var(--primary-dark); }

.cart-count {
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -6px;
}

.view-customer-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.view-customer-btn:hover { background: var(--primary-dark); }

/* ---------- HERO ---------- */
.hero {
  background: url('images/05.jpg') center center / cover no-repeat;
  padding: 0 2rem;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,.88) 0%, rgba(139,131,255,.82) 50%, rgba(86,79,214,.85) 100%);
  z-index: 0;
}

.hero-split {
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  gap: 3rem;
  min-height: 480px;
  position: relative;
  z-index: 1;
}

.hero-content {
  flex: 1;
  padding: 3rem 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  color: #ffe082;
  font-size: .78rem;
  font-weight: 600;
  padding: .35rem 1rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: .8rem;
  line-height: 1.2;
}

.hero-content h1 span { color: #ffe082; }

.hero-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.hero-subtitle i {
  color: #ffe082;
  font-size: 1rem;
}

.hero-content > p {
  font-size: 1.05rem;
  opacity: .9;
  margin-bottom: 1.8rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: .8rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  color: var(--primary);
  padding: .8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.hero-btn.outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}

.hero-btn.outline:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
}

.hero-trust {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-trust div {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  opacity: .8;
}

.hero-trust i { font-size: .9rem; color: #ffe082; }

.hero-image {
  flex: 0 0 420px;
  position: relative;
}

.hero-image-lg {
  flex: 0 0 580px;
}

.hero-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: rotate(2deg) scale(1.05);
  transition: transform .4s;
}

.hero-image-lg img {
  transform: rotate(0deg) scale(1.1);
}

.hero-image:hover img { transform: rotate(0deg) scale(1.02); }

.hero-image::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 2px dashed rgba(255,255,255,.2);
  pointer-events: none;
}

/* ---------- SHOWCASE GALLERY ---------- */
.showcase {
  padding: 3rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.showcase-header {
  text-align: center;
  margin-bottom: 2rem;
}

.showcase-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: .4rem;
}

.showcase-header h2 i { color: #f39c12; }

.showcase-header p {
  color: var(--text-muted);
  font-size: .95rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.showcase-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}

.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.showcase-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.showcase-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.showcase-card.featured .showcase-img {
  aspect-ratio: auto;
  min-height: 300px;
}

.showcase-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}

.showcase-card:hover .showcase-img img { transform: scale(1.05); }

.showcase-info {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.showcase-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  width: fit-content;
  margin-bottom: .5rem;
}

.showcase-info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--text);
}

.showcase-info p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- CONTROLS (Search / Sort / Refresh) ---------- */
.controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: .7rem 1rem .7rem 2.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus { border-color: var(--primary); }

.sort-box select {
  padding: .7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface);
  cursor: pointer;
  transition: var(--transition);
}

.sort-box select:focus { border-color: var(--primary); }

.refresh-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  padding: .65rem 1.2rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- PRODUCT GRID ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f5f5f5;
}

/* Stacked image effect for multi-photo products */
.has-multi-img .product-img-wrap::before,
.has-multi-img .product-img-wrap::after {
  content: '';
  position: absolute;
  top: 6px;
  right: -4px;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.5);
  border: 2px solid rgba(108,99,255,.15);
  border-radius: 6px;
  z-index: 0;
  pointer-events: none;
  transition: transform .3s, opacity .3s;
}

.has-multi-img .product-img-wrap::before {
  transform: rotate(2deg) translate(4px, -2px);
}

.has-multi-img .product-img-wrap::after {
  transform: rotate(4deg) translate(7px, -4px);
  opacity: .5;
}

.has-multi-img:hover .product-img-wrap::before {
  transform: rotate(3deg) translate(6px, -3px);
}

.has-multi-img:hover .product-img-wrap::after {
  transform: rotate(5.5deg) translate(10px, -5px);
  opacity: .7;
}

/* Multi-photo badge */
.multi-photo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: .35rem;
  z-index: 3;
  pointer-events: none;
  transition: background .3s;
}

.multi-photo-badge i { font-size: .68rem; color: #ffe082; }

.product-img-wrap:hover .multi-photo-badge {
  background: rgba(108,99,255,.8);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .4s;
  cursor: pointer;
}

.gallery-slide.active { opacity: 1; }

.img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  opacity: 0;
  transition: opacity .3s;
  z-index: 2;
}

.product-img-wrap:hover .img-nav { opacity: 1; }
.img-nav.prev { left: 8px; }
.img-nav.next { right: 8px; }
.img-nav:hover { background: rgba(0,0,0,.7); }

.img-counter {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .7rem;
  padding: 2px 8px;
  border-radius: 10px;
  z-index: 2;
}

.gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: var(--transition);
}

.gallery-dot.active { background: #fff; transform: scale(1.2); }

.product-info {
  padding: 1rem 1.2rem 1.2rem;
}

.product-info .category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .5rem;
}

.product-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--text);
}

.product-info .desc {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pd-link { cursor: pointer; transition: color .2s; -webkit-tap-highlight-color: rgba(108,99,255,.15); }
.product-info h3.pd-link:hover { color: var(--primary); }
.product-info .desc.pd-link:hover { color: var(--text); }
.product-info h3.pd-link:active { color: var(--primary); }

.view-details-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: .5rem;
  padding: .3rem 0;
  transition: var(--transition);
}

.view-details-link:hover { color: var(--primary-dark); }
.view-details-link i { font-size: .72rem; }

.product-info .price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .3rem;
}

.product-info .shipping-info {
  font-size: .78rem;
  color: var(--primary);
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.product-info .shipping-info i { font-size: .72rem; }

.product-info .stock {
  font-size: .78rem;
  color: #27ae60;
  margin-bottom: .8rem;
}

.product-info .stock.low { color: var(--accent); font-weight: 600; }

.add-cart-btn {
  width: 100%;
  padding: .65rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: var(--transition);
}

.add-cart-btn:hover:not(:disabled) { background: var(--primary-dark); }
.add-cart-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- EMPTY STATE ---------- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; color: var(--border); }
.empty-state h2 { margin-bottom: .5rem; }

/* ---------- CART SIDEBAR ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--surface);
  z-index: 1101;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  transition: right .35s ease;
}

.cart-sidebar.open { right: 0; }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.close-cart:hover { color: var(--accent); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

.cart-empty i { font-size: 2rem; color: var(--border); }

.cart-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h4 {
  font-size: .85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info .ci-price {
  font-size: .78rem;
  color: var(--text-muted);
}

.cart-item-info .ci-shipping {
  font-size: .72rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .25rem;
}

.cart-item-info .ci-shipping i { font-size: .65rem; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: .3rem;
}

.cart-item-qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-item-qty button:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.cart-item-qty span { font-weight: 600; font-size: .85rem; min-width: 20px; text-align: center; }

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .85rem;
  transition: var(--transition);
}

.cart-item-remove:hover { color: var(--accent); }

.cart-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.cart-total {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: right;
  color: var(--text);
}

.cart-total span { color: var(--primary); }

.checkout-btn {
  width: 100%;
  padding: .75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: var(--transition);
}

.checkout-btn:hover { background: var(--primary-dark); }

.clear-cart-btn {
  width: 100%;
  padding: .6rem;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: var(--transition);
}

.clear-cart-btn:hover { background: var(--accent); color: #fff; }

/* ---------- CHECKOUT MODAL ---------- */
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.checkout-overlay.open { opacity: 1; visibility: visible; }

.checkout-modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 650px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .35s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkout-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: var(--transition);
  z-index: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-close:hover { color: var(--accent); }

.checkout-header { text-align: center; margin-bottom: 1.5rem; }

.checkout-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: .5rem;
}

.checkout-header h2 { font-size: 1.4rem; margin-bottom: .3rem; }
.checkout-header p { color: var(--text-muted); font-size: .9rem; }

.checkout-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.checkout-section:last-of-type { border-bottom: none; }

.checkout-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
}

.checkout-section h3 i { color: var(--primary); }

.checkout-items { display: flex; flex-direction: column; gap: .6rem; }

.checkout-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.checkout-item img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
}

.checkout-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.checkout-item-info strong { font-size: .85rem; }
.checkout-item-info span { font-size: .78rem; color: var(--text-muted); }
.checkout-item-info .ci-shipping { font-size: .72rem; color: var(--primary); display: flex; align-items: center; gap: .25rem; }
.checkout-item-info .ci-shipping i { font-size: .65rem; }

.checkout-item-subtotal {
  font-weight: 700;
  color: var(--primary);
  font-size: .9rem;
}

.checkout-order-total {
  text-align: right;
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 2px dashed var(--border);
}

.checkout-order-total span { color: var(--primary); }

.checkout-row { margin-bottom: .8rem; }

.checkout-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

.checkout-field label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: .3rem;
  color: var(--text);
}

.checkout-field input,
.checkout-field textarea {
  width: 100%;
  padding: .6rem .8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.checkout-field input:focus,
.checkout-field textarea:focus {
  border-color: var(--primary);
}

#custNotes {
  width: 100%;
  padding: .6rem .8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  transition: var(--transition);
}

#custNotes:focus { border-color: var(--primary); }

.payment-options {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
}

.payment-option { cursor: pointer; }
.payment-option input { display: none; }

.payment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  padding: 1rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-align: center;
}

.payment-card i { font-size: 1.5rem; color: var(--text-muted); }
.payment-card span { font-size: .8rem; font-weight: 500; }

.payment-option input:checked + .payment-card {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-option input:checked + .payment-card i { color: var(--primary); }

.checkout-submit-btn {
  width: 100%;
  padding: .85rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: var(--transition);
  margin-top: .5rem;
}

.checkout-submit-btn:hover { background: var(--primary-dark); }

/* ---------- ORDER SUCCESS MODAL ---------- */
.order-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.order-success-overlay.open { opacity: 1; visibility: visible; }

.order-success-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp .4s ease;
}

.success-animation i {
  font-size: 4rem;
  color: #27ae60;
  animation: popIn .5s ease;
}

@keyframes popIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.order-success-modal h2 { font-size: 1.3rem; margin: 1rem 0 .3rem; }
.order-success-modal p { color: var(--text-muted); font-size: .9rem; }

.order-ref {
  background: var(--bg);
  padding: .6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-block;
  margin: 1rem 0;
  color: var(--primary);
}

.order-success-info { font-size: .85rem; margin-bottom: 1.2rem; }

.order-success-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.order-success-btn:hover { background: var(--primary-dark); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  padding: .8rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  font-size: .9rem;
  font-weight: 500;
  z-index: 9999;
  transition: bottom .4s ease;
  white-space: nowrap;
}

.toast.show { bottom: 2rem; }
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ---------- LIGHTBOX ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox-overlay.open { opacity: 1; visibility: visible; }

.lb-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  z-index: 2;
  opacity: .7;
  transition: var(--transition);
}

.lb-close:hover { opacity: 1; }

.lb-counter {
  position: absolute;
  top: 1.2rem;
  left: 1.5rem;
  color: rgba(255,255,255,.6);
  font-size: .85rem;
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
}

.lb-arrow:hover { background: rgba(255,255,255,.3); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }

.lb-image-container {
  max-width: 85vw;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-image-container img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 6px;
  transition: opacity .3s, transform .3s;
}

.lb-zoom { cursor: zoom-in; }
.lb-zoomed { cursor: zoom-out; transform: scale(1.5); }

.lb-info-bar {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
}

.lb-info-bar h3 { font-size: 1rem; font-weight: 500; }

.lb-price {
  font-size: .9rem;
  color: #ffe082;
  font-weight: 600;
}

.lb-thumbs {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  max-width: 80vw;
  overflow-x: auto;
}

.lb-thumbs img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .5;
  transition: var(--transition);
}

.lb-thumbs img.active,
.lb-thumbs img:hover {
  border-color: #fff;
  opacity: 1;
}

/* ========================================= */
/* ============= ADMIN STYLES ============= */
/* ========================================= */

.admin-body { background: var(--bg); }

/* ---------- ADMIN TABS ---------- */
.admin-tabs {
  display: flex;
  gap: 0;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  padding: 0 2rem;
}

.admin-tab {
  padding: .9rem 1.5rem;
  background: none;
  border: none;
  font-weight: 500;
  font-size: .95rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: var(--transition);
  position: relative;
}

.admin-tab:hover { color: var(--primary); }

.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-badge {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

/* ---------- ADMIN CONTAINER ---------- */
.admin-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

/* ---------- ADMIN FORM PANEL ---------- */
.admin-form-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + 60px);
}

.form-header {
  padding: 1.2rem 1.5rem;
  background: var(--primary);
  color: #fff;
}

.form-header h2 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

#productForm { padding: 1.2rem 1.5rem; }

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  margin-bottom: .3rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.form-group label i { color: var(--primary); font-size: .8rem; }

.form-group .optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: .75rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .6rem .8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group small {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

.btn-add-url {
  margin-top: .4rem;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: .4rem .8rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: var(--transition);
}

.btn-add-url:hover { background: var(--primary); color: #fff; }

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: .5rem;
  margin-top: .6rem;
}

.img-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: grab;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.img-preview-item:active { cursor: grabbing; }

.img-preview-item.is-main {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.img-preview-item.dragging {
  opacity: .4;
  transform: scale(.9);
}

.img-preview-item.drag-over {
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(108,99,255,.3);
}

.img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.img-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 2;
}

.img-remove-btn:hover { background: var(--accent); }

.img-main-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: var(--primary);
  color: #fff;
  font-size: .55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .2rem;
  z-index: 2;
}

.img-main-badge i { font-size: .5rem; color: #ffe082; }

.img-set-main-btn {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,.5);
  color: rgba(255,255,255,.7);
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  z-index: 2;
}

.img-preview-item:hover .img-set-main-btn { opacity: 1; }
.img-set-main-btn:hover { background: var(--primary); color: #ffe082; }

.img-order-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.img-preview-item.is-main .img-order-badge {
  background: var(--primary);
}

.img-drag-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  z-index: 2;
}

.img-preview-item:hover .img-drag-handle { opacity: .7; }

.no-images-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: .82rem;
  padding: .5rem;
}

.form-actions {
  display: flex;
  gap: .6rem;
  margin-top: .5rem;
}

.btn-save {
  flex: 1;
  padding: .7rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: var(--transition);
}

.btn-save:hover { background: var(--primary-dark); }

.btn-cancel {
  padding: .7rem 1rem;
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: var(--transition);
}

.btn-cancel:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- ADMIN TABLE PANEL ---------- */
.admin-table-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: .8rem;
}

.table-header h2 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.table-search {
  position: relative;
}

.table-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .8rem;
}

.table-search input {
  padding: .5rem .8rem .5rem 2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: .85rem;
  width: 220px;
  transition: var(--transition);
}

.table-search input:focus { border-color: var(--primary); }

.table-wrapper { overflow-x: auto; }

.product-table {
  width: 100%;
  border-collapse: collapse;
}

.product-table th,
.product-table td {
  padding: .8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}

.product-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.product-table tr:hover { background: #f8f9fa; }

.table-img-wrap {
  position: relative;
  width: 50px;
  height: 50px;
}

.table-img-wrap img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.img-count-badge {
  position: absolute;
  bottom: -2px;
  right: -6px;
  background: var(--primary);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}

.action-btns { display: flex; gap: .4rem; }

.btn-edit {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: .4rem .7rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: var(--transition);
}

.btn-edit:hover { background: var(--primary); color: #fff; }

.btn-delete {
  background: #ffeef0;
  color: var(--accent);
  border: none;
  padding: .4rem .7rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: var(--transition);
}

.btn-delete:hover { background: var(--accent); color: #fff; }

.no-products {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.no-products i { font-size: 2.5rem; margin-bottom: .5rem; color: var(--border); display: block; }

/* ---------- ADMIN STATS ---------- */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.stat-card i {
  font-size: 1.3rem;
  color: var(--primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 10px;
}

.stat-card div { display: flex; flex-direction: column; }
.stat-card span { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.stat-card label { font-size: .72rem; color: var(--text-muted); }

.stat-card.danger i { color: var(--accent); background: #ffeef0; }

/* ---------- ORDERS TAB ---------- */
.orders-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.order-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.order-stat {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
  box-shadow: var(--shadow);
}

.order-stat i {
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-light);
}

.order-stat div { display: flex; flex-direction: column; }
.order-stat span { font-size: 1.1rem; font-weight: 700; }
.order-stat label { font-size: .72rem; color: var(--text-muted); }

.pending-stat i { color: #f39c12; background: #fff8e1; }
.processing-stat i { color: #3498db; background: #e3f2fd; }
.shipped-stat i { color: #9b59b6; background: #f3e5f5; }
.delivered-stat i { color: #27ae60; background: #e8f5e9; }

/* Clickable status cards: filter the orders list on click */
.order-stat[data-status] {
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.order-stat[data-status]:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg, 0 6px 18px rgba(0,0,0,.12));
}
.order-stat[data-status].active { border-color: var(--primary); }
.order-stat.pending-stat.active { border-color: #f39c12; }
.order-stat.processing-stat.active { border-color: #3498db; }
.order-stat.shipped-stat.active { border-color: #9b59b6; }
.order-stat.delivered-stat.active { border-color: #27ae60; }

.order-group-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1.1rem 0 .55rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.order-group-label span {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: .05rem .5rem;
  font-size: .72rem;
}
.order-group-label.pending span { background: #fff8e1; color: #f39c12; }
.order-group-label.processing span { background: #e3f2fd; color: #3498db; }
.order-group-label.shipped span { background: #f3e5f5; color: #9b59b6; }
.order-group-label.delivered span { background: #e8f5e9; color: #27ae60; }
.order-group-label.cancelled span { background: #ffeef0; color: #e74c3c; }

.order-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .8rem;
}

.order-filter-bar h2 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.order-filters {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.order-filters select {
  padding: .5rem .8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: .85rem;
  background: var(--surface);
  cursor: pointer;
}

.orders-list { display: flex; flex-direction: column; gap: 1rem; }

.order-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-left: 4px solid var(--border);
}

.order-card.pending { border-left-color: #f39c12; }
.order-card.processing { border-left-color: #3498db; }
.order-card.shipped { border-left-color: #9b59b6; }
.order-card.delivered { border-left-color: #27ae60; }
.order-card.cancelled { border-left-color: #e74c3c; }

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.order-card-info { display: flex; flex-direction: column; gap: .2rem; }

.order-number { font-weight: 700; font-size: .9rem; }

.order-date {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.order-status-badge {
  padding: .3rem .8rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.order-status-badge.pending { background: #fff8e1; color: #f39c12; }
.order-status-badge.processing { background: #e3f2fd; color: #3498db; }
.order-status-badge.shipped { background: #f3e5f5; color: #9b59b6; }
.order-status-badge.delivered { background: #e8f5e9; color: #27ae60; }
.order-status-badge.cancelled { background: #ffeef0; color: #e74c3c; }

.order-card-body {
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.order-customer-brief {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
}

.customer-avatar i { font-size: 2rem; color: var(--primary); }

.order-customer-brief div {
  display: flex;
  flex-direction: column;
}

.order-customer-brief strong { font-size: .9rem; }
.order-customer-brief span { font-size: .78rem; color: var(--text-muted); }

.order-items-brief { display: flex; flex-direction: column; gap: .4rem; }

.order-item-mini {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.order-item-mini img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 4px;
}

.order-item-mini div { display: flex; flex-direction: column; }
.item-name { font-size: .78rem; font-weight: 500; }
.item-qty { font-size: .7rem; color: var(--text-muted); }

.order-more-items {
  font-size: .75rem;
  color: var(--primary);
  font-weight: 500;
}

.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1.2rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
  gap: .5rem;
}

.order-total-info { display: flex; flex-direction: column; }
.order-item-count { font-size: .78rem; color: var(--text-muted); }
.order-total-amount { font-size: 1rem; font-weight: 700; color: var(--primary); }

.order-card-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.btn-view-order {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: .45rem .8rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .3rem;
  transition: var(--transition);
}

.btn-view-order:hover { background: var(--primary); color: #fff; }

.status-select {
  padding: .4rem .6rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: .8rem;
  outline: none;
  background: var(--surface);
  cursor: pointer;
}

.no-orders {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.no-orders i { font-size: 2.5rem; margin-bottom: .5rem; color: var(--border); display: block; }

/* ---------- DELETE MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}

.modal-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: .8rem;
}

.modal h3 { margin-bottom: .5rem; }
.modal p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.2rem; }

.modal-actions { display: flex; gap: .6rem; justify-content: center; }

.btn-confirm-del {
  padding: .6rem 1.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}

.btn-confirm-del:hover { background: #e0556e; }

.btn-modal-cancel {
  padding: .6rem 1.2rem;
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: var(--transition);
}

.btn-modal-cancel:hover { border-color: var(--text-muted); color: var(--text); }

/* ---------- ORDER DETAIL MODAL ---------- */
.order-detail-modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .3s ease;
}

.order-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.order-detail-header h2 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.order-detail-section {
  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.order-detail-section:last-of-type { border-bottom: none; }

.order-detail-section h3 {
  font-size: .95rem;
  margin-bottom: .6rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.order-detail-section h3 i { color: var(--primary); }

.od-row {
  display: flex;
  justify-content: space-between;
  padding: .3rem 0;
  font-size: .88rem;
}

.od-label { color: var(--text-muted); }
.od-value { font-weight: 500; text-align: right; }
.od-value a { color: var(--primary); }

.od-items { display: flex; flex-direction: column; gap: .5rem; }

.od-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.od-item img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
}

.od-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.od-item-info strong { font-size: .85rem; }
.od-item-info span { font-size: .78rem; color: var(--text-muted); }

.od-item-subtotal {
  font-weight: 700;
  color: var(--primary);
  font-size: .9rem;
}

.od-total {
  display: flex;
  justify-content: space-between;
  margin-top: .8rem;
  padding-top: .8rem;
  border-top: 2px dashed var(--border);
  font-size: 1rem;
}

.od-notes {
  background: var(--bg);
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  color: var(--text-muted);
  font-style: italic;
}

.status-select-large {
  width: 100%;
  padding: .7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  outline: none;
  background: var(--surface);
  cursor: pointer;
}

.btn-delete-order {
  width: 100%;
  margin-top: 1rem;
  padding: .7rem;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: var(--transition);
}

.btn-delete-order:hover { background: var(--accent); color: #fff; }

/* ---------- AUTH NAV BUTTONS ---------- */
.auth-nav-btn {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid var(--border);
  padding: .45rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.auth-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.auth-nav-btn.register {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.auth-nav-btn.register:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ---------- PROFILE DROPDOWN ---------- */
.profile-dropdown { position: relative; }

.profile-btn {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: var(--transition);
}

.profile-btn:hover { background: var(--primary); color: #fff; }
.profile-btn .profile-arrow { font-size: .65rem; margin-left: .2rem; }

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 1050;
}

.profile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .7rem;
}

.profile-menu-header i { font-size: 2rem; color: var(--primary); }
.profile-menu-header div { display: flex; flex-direction: column; }
.profile-menu-header strong { font-size: .9rem; }
.profile-menu-header small { font-size: .75rem; color: var(--text-muted); }

.profile-menu a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  color: var(--text);
  font-size: .88rem;
  transition: var(--transition);
}

.profile-menu a:hover { background: var(--bg); color: var(--primary); }
.profile-menu a i { width: 18px; text-align: center; color: var(--text-muted); }

/* ---------- AUTH MODAL ---------- */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 3rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.auth-overlay.open { opacity: 1; visibility: visible; }

.auth-modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .35s ease;
}

.auth-header { text-align: center; margin-bottom: 1.5rem; }

.auth-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: .5rem;
}

.auth-header h2 { font-size: 1.3rem; margin-bottom: .3rem; }
.auth-header p { color: var(--text-muted); font-size: .88rem; }

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.auth-switch a { color: var(--primary); font-weight: 600; }

/* ---------- CART SHIPPING LINE ---------- */
.cart-subtotal,
.cart-shipping {
  display: flex;
  justify-content: space-between;
  font-size: .88rem;
  color: var(--text-muted);
}

.cart-shipping span { color: var(--primary); font-weight: 500; }

/* ---------- CHECKOUT SHIPPING LINE ---------- */
.checkout-order-subtotal,
.checkout-order-shipping {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: var(--text-muted);
  margin-top: .4rem;
}

.checkout-order-shipping span { color: var(--primary); font-weight: 500; }

/* ---------- SETTINGS PANEL ---------- */
.settings-panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.settings-body { padding: 1.5rem; }

.settings-section {
  margin-bottom: 1.5rem;
}

.settings-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.settings-section h3 i { color: var(--primary); }

.settings-desc {
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 1rem;
}

.settings-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.shipping-preview {
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text-muted);
}

.shipping-preview strong { color: var(--primary); }

/* ---------- BACKUP & RESTORE ---------- */
.backup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.backup-card {
  display: flex;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  transition: var(--transition);
}

.backup-card:hover { border-color: var(--primary); }
.backup-card.import:hover { border-color: var(--accent); }

.backup-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.backup-card.export .backup-card-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.backup-card.import .backup-card-icon {
  background: #ffeef0;
  color: var(--accent);
}

.backup-card-content h4 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .3rem;
}

.backup-card-content p {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: .8rem;
}

/* ---------- HERO FLOATING SHAPES ---------- */
.hero { position: relative; }

.hero-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  animation: floatShape 20s ease-in-out infinite;
}

.shape-1 { width: 300px; height: 300px; top: -80px; right: -60px; animation-duration: 25s; }
.shape-2 { width: 200px; height: 200px; bottom: -50px; left: 10%; animation-duration: 18s; animation-delay: -5s; }
.shape-3 { width: 120px; height: 120px; top: 40%; left: 5%; animation-duration: 22s; animation-delay: -3s; background: rgba(255,224,130,.08); }
.shape-4 { width: 80px; height: 80px; top: 20%; right: 30%; animation-duration: 15s; animation-delay: -8s; }
.shape-5 { width: 150px; height: 150px; bottom: 10%; right: 20%; animation-duration: 28s; animation-delay: -12s; background: rgba(255,255,255,.04); }

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -25px) rotate(5deg); }
  50% { transform: translate(-20px, 15px) rotate(-3deg); }
  75% { transform: translate(15px, 20px) rotate(4deg); }
}

/* ---------- NAVBAR SCROLL EFFECT ---------- */
.navbar { transition: background .3s, box-shadow .3s, height .3s; }

.navbar.scrolled {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

/* ---------- WHY CHOOSE US ---------- */
.why-us {
  padding: 3.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.why-us-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.why-us-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.why-us-header h2 span { color: var(--primary); }

.why-us-header p {
  color: var(--text-muted);
  font-size: .95rem;
  max-width: 540px;
  margin: 0 auto;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.why-card {
  background: var(--surface);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}

.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #a78bfa);
  transform: scaleX(0);
  transition: transform .4s;
}

.why-card:hover::before { transform: scaleX(1); }

.why-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.why-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-light), #f0edff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  color: var(--primary);
  transition: var(--transition);
}

.why-card:hover .why-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.1);
}

.why-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.why-card p {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---------- SCROLL REVEAL ANIMATIONS ---------- */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-child {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible .reveal-child {
  opacity: 1;
  transform: translateY(0);
}

.reveal.visible .reveal-child:nth-child(1) { transition-delay: .1s; }
.reveal.visible .reveal-child:nth-child(2) { transition-delay: .2s; }
.reveal.visible .reveal-child:nth-child(3) { transition-delay: .3s; }
.reveal.visible .reveal-child:nth-child(4) { transition-delay: .4s; }
.reveal.visible .reveal-child:nth-child(5) { transition-delay: .5s; }

/* ---------- BACK TO TOP BUTTON ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(108,99,255,.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .3s, visibility .3s, transform .3s, background .2s;
  z-index: 900;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ---------- CART PULSE ---------- */
@keyframes cartPulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(.95); }
  100% { transform: scale(1); }
}

.cart-btn.pulse { animation: cartPulse .5s ease; }

.cart-count {
  transition: transform .3s, background .3s;
}

/* ---------- BUTTON RIPPLE ---------- */
.add-cart-btn,
.hero-btn,
.checkout-btn,
.checkout-submit-btn {
  position: relative;
  overflow: hidden;
}

.add-cart-btn::after,
.hero-btn::after,
.checkout-btn::after,
.checkout-submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.3) 10%, transparent 60%);
  transform: scale(0);
  opacity: 0;
  transition: transform .5s, opacity .4s;
  border-radius: inherit;
}

.add-cart-btn:active::after,
.hero-btn:active::after,
.checkout-btn:active::after,
.checkout-submit-btn:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: 0s;
}

/* ---------- ENHANCED FOOTER ---------- */
.footer {
  background: #1a1a2e;
  color: rgba(255,255,255,.7);
  border-top: none;
  margin-top: 3rem;
  padding: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.footer-col h3 i { color: var(--primary); }

.footer-col h4 {
  color: #fff;
  font-size: .92rem;
  margin-bottom: .8rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.footer-col > p {
  font-size: .85rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-col a {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  padding: .3rem 0;
  transition: var(--transition);
}

.footer-col a:hover { color: #fff; padding-left: .3rem; }
.footer-col a i { font-size: .7rem; color: var(--primary); }

.footer-social {
  display: flex;
  gap: .6rem;
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  padding: 0;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  padding-left: 0;
}

.footer-contact div {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  padding: .3rem 0;
}

.footer-contact i { color: var(--primary); width: 16px; text-align: center; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: .8rem;
}

/* ---------- ADMIN LOGIN GATE ---------- */
.admin-gate {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.admin-gate-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: slideUp .4s ease;
}

.admin-gate-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.admin-gate-box h2 { font-size: 1.4rem; margin-bottom: .3rem; }
.admin-gate-box > p { color: var(--text-muted); font-size: .9rem; }

/* ---------- PRODUCT CARD IMPROVEMENTS ---------- */
.product-card {
  position: relative;
}

.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 2px solid transparent;
  transition: border-color .3s;
  pointer-events: none;
}

.product-card:hover::after { border-color: var(--primary); }

/* ---------- VIDEO GALLERY (STOREFRONT) ---------- */
.video-gallery {
  padding: 3rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.video-gallery-header {
  text-align: center;
  margin-bottom: 2rem;
}

.video-gallery-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: .4rem;
}

.video-gallery-header h2 i { color: var(--accent); }

.video-gallery-header p {
  color: var(--text-muted);
  font-size: .95rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.video-card-thumb img,
.video-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.video-card:hover .video-card-thumb img,
.video-card:hover .video-card-thumb video {
  transform: scale(1.05);
}

.video-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,255,255,.8) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform .3s, box-shadow .3s, background .3s;
  z-index: 2;
  box-shadow: 0 4px 25px rgba(0,0,0,.3);
}

.video-card-play i { margin-left: 4px; }

.video-card:hover .video-card-play {
  transform: translate(-50%, -50%) scale(1.2);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 30px rgba(108,99,255,.5);
}

.vid-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(229,45,39,.9);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: .3rem;
  z-index: 2;
}

.vid-card-badge.upload {
  background: rgba(108,99,255,.9);
}

.video-card-yt-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e52d27, #b31217);
  z-index: 2;
}

.video-card-info {
  padding: 1rem 1.2rem;
}

.video-card-info h4 {
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--text);
}

.video-card-info p {
  font-size: .82rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- VIDEO PLAYER MODAL ---------- */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  -webkit-overflow-scrolling: touch;
}

.video-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.video-modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: slideUp .35s ease;
  position: relative;
}

.video-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.7);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: var(--transition);
}

.video-modal-close:hover { background: var(--accent); }

.video-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-modal-player iframe,
.video-modal-player video {
  width: 100%;
  height: 100%;
  border: none;
}

.video-modal-info {
  padding: 1.2rem 1.5rem;
}

.video-modal-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: .3rem;
}

.video-modal-info p {
  font-size: .88rem;
  color: var(--text-muted);
}

/* ---------- VIDEO ADMIN TAB ---------- */
.video-source-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}

.vid-src-tab {
  flex: 1;
  padding: .7rem 1rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: var(--transition);
  color: var(--text-muted);
}

.vid-src-tab:hover { border-color: var(--primary); color: var(--primary); }

.vid-src-tab.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.vid-src-tab .fab.fa-youtube { color: #e52d27; }
.vid-src-tab.active .fab.fa-youtube { color: #e52d27; }

.vid-preview { margin-top: .8rem; }

.vid-preview-frame {
  position: relative;
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  max-width: 300px;
}

.vid-preview-frame img {
  width: 100%;
  display: block;
}

.vid-preview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  pointer-events: none;
}

.vid-preview-id {
  display: block;
  padding: .3rem .6rem;
  background: var(--bg);
  font-size: .72rem;
  color: var(--text-muted);
}

.video-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1.2rem 1.5rem;
}

.video-admin-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.video-admin-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.video-admin-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.video-admin-thumb img,
.video-admin-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vid-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,.8);
  font-size: 2.5rem;
  pointer-events: none;
}

.vid-type-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .3rem;
  z-index: 2;
}

.vid-type-badge.youtube {
  background: rgba(229,45,39,.9);
  color: #fff;
}

.vid-type-badge.upload {
  background: rgba(108,99,255,.9);
  color: #fff;
}

.video-admin-info {
  padding: .8rem 1rem;
}

.video-admin-info h4 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .2rem;
}

.video-admin-info p {
  font-size: .78rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: .3rem;
}

.video-admin-date {
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.video-admin-actions {
  padding: .6rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .4rem;
}

/* ---------- HAMBURGER MENU ---------- */
.hamburger {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 3px;
  transition: transform .3s, opacity .3s;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ---------- CATEGORY FILTER BAR ---------- */
.category-bar {
  display: flex;
  gap: .5rem;
  padding: 0 2rem .8rem;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem 1rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cat-pill:hover { border-color: var(--primary); color: var(--primary); }

.cat-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cat-pill i { font-size: .75rem; }

.cat-pill .cat-count {
  background: rgba(255,255,255,.2);
  font-size: .7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 2px;
}

.cat-pill.active .cat-count { background: rgba(255,255,255,.3); }

.cat-pill:not(.active) .cat-count {
  background: var(--bg);
  color: var(--text-muted);
}

/* ---------- LOADING SKELETON ---------- */
.product-grid-loading {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 0 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.skeleton-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 14px;
  margin: 1rem 1.2rem .5rem;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.price { width: 35%; height: 18px; margin-bottom: 1.2rem; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.product-grid-loading.hidden { display: none; }

/* ---------- QUANTITY SELECTOR (Product Card) ---------- */
.qty-selector {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .6rem;
}

.qty-selector label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: .3rem;
}

.qty-selector button {
  width: 30px;
  height: 30px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text);
}

.qty-selector button:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.qty-selector input {
  width: 44px;
  text-align: center;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: .3rem;
  font-weight: 600;
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
}

.qty-selector input:focus { border-color: var(--primary); }

/* ---------- MY ORDERS LIST ---------- */
.my-orders-list {
  max-height: 60vh;
  overflow-y: auto;
}

.my-order-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: .8rem;
  transition: var(--transition);
  border-left: 4px solid var(--border);
}

.my-order-card.pending { border-left-color: #f39c12; }
.my-order-card.processing { border-left-color: #3498db; }
.my-order-card.shipped { border-left-color: #9b59b6; }
.my-order-card.delivered { border-left-color: #27ae60; }
.my-order-card.cancelled { border-left-color: #e74c3c; }

.my-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
  flex-wrap: wrap;
  gap: .4rem;
}

.my-order-number {
  font-weight: 700;
  font-size: .88rem;
}

.my-order-date {
  font-size: .75rem;
  color: var(--text-muted);
}

.my-order-items {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .5rem;
}

.my-order-item-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.my-order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
}

.my-order-total {
  font-weight: 700;
  color: var(--primary);
  font-size: .95rem;
}

.my-order-status {
  padding: .25rem .7rem;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.my-order-status.pending { background: #fff8e1; color: #f39c12; }
.my-order-status.processing { background: #e3f2fd; color: #3498db; }
.my-order-status.shipped { background: #f3e5f5; color: #9b59b6; }
.my-order-status.delivered { background: #e8f5e9; color: #27ae60; }
.my-order-status.cancelled { background: #ffeef0; color: #e74c3c; }

.my-orders-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.my-orders-empty i {
  font-size: 2.5rem;
  color: var(--border);
  display: block;
  margin-bottom: .5rem;
}

/* ---------- ORDER TIMELINE ---------- */
.order-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: .8rem 0 .3rem;
  position: relative;
}

.order-timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  height: 3px;
  background: var(--border);
  z-index: 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: var(--text-muted);
  margin-bottom: .3rem;
  transition: var(--transition);
}

.timeline-step.done .timeline-dot {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

.timeline-step.current .timeline-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108,99,255,.4); }
  50% { box-shadow: 0 0 0 8px rgba(108,99,255,0); }
}

.timeline-label {
  font-size: .62rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.timeline-step.done .timeline-label,
.timeline-step.current .timeline-label { color: var(--text); font-weight: 600; }

/* ---------- PRODUCT DETAIL MODAL ---------- */
.product-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.product-detail-overlay.open { opacity: 1; visibility: visible; }

.product-detail-modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 900px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .35s ease;
  overflow: hidden;
}

.pd-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pd-gallery {
  position: relative;
  background: #f5f5f5;
  min-height: 350px;
}

.pd-gallery-main {
  width: 100%;
  height: 350px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: #f5f5f5;
  padding: .5rem;
  transition: opacity .2s;
}

.pd-thumbs {
  display: flex;
  gap: 6px;
  padding: .5rem .8rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
}

.pd-thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: .6;
  transition: var(--transition);
  flex-shrink: 0;
}

.pd-thumbs img.active,
.pd-thumbs img:hover {
  border-color: var(--primary);
  opacity: 1;
}

.pd-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
}

.pd-gallery-nav:hover { background: rgba(0,0,0,.75); }
.pd-gallery-nav.prev { left: 8px; }
.pd-gallery-nav.next { right: 8px; }

.pd-info {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 80vh;
}

.pd-category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .5px;
  width: fit-content;
}

.pd-info h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.pd-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.pd-shipping {
  font-size: .85rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: .35rem;
}

.pd-shipping i { font-size: .78rem; }

.pd-stock {
  font-size: .85rem;
  color: #27ae60;
  font-weight: 500;
}

.pd-stock.low { color: var(--accent); }
.pd-stock.out { color: #e74c3c; }

.pd-desc-full {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: .5rem;
  padding-top: .8rem;
  border-top: 1px solid var(--border);
  white-space: pre-line;
}

.pd-actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.pd-actions .qty-selector { margin-bottom: 0; }

.pd-actions .add-cart-btn {
  flex: 1;
  padding: .75rem 1.2rem;
}

/* Mobile back button - hidden on desktop */
.pd-close-btn {
  display: none;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1rem;
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  font-weight: 600;
  color: var(--primary);
  width: 100%;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 10;
}

.pd-close-btn i { font-size: .85rem; }

/* Desktop close X button */
.pd-close-x { display: flex; }

@media (max-width: 768px) {
  .product-detail-overlay { padding: 0; align-items: flex-start; }
  .product-detail-modal {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }
  .pd-close-btn { display: flex; }
  .pd-close-x { display: none; }
  .pd-body { grid-template-columns: 1fr; }
  .pd-gallery { min-height: 220px; }
  .pd-gallery-main { height: 220px; }
  .pd-info { max-height: none; padding: 1.2rem 1rem; }
  .pd-actions { flex-wrap: wrap; }
  .pd-actions .qty-selector { width: 100%; justify-content: center; }
  .pd-actions .add-cart-btn { width: 100%; }
}

/* ---------- MOBILE CAROUSEL ---------- */
.mobile-carousel {
  display: none;
}

.carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem .5rem;
}

.carousel-counter {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: .3rem .8rem;
  border-radius: 20px;
}

.carousel-arrows {
  display: flex;
  gap: .4rem;
}

.carousel-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--surface);
  color: var(--primary);
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  -webkit-tap-highlight-color: rgba(108,99,255,.2);
}

.carousel-arrow:active,
.carousel-arrow:hover {
  background: var(--primary);
  color: #fff;
}

.carousel-track {
  overflow: hidden;
  position: relative;
  padding: 0 1rem;
}

.carousel-track .product-card,
.carousel-track .video-card {
  width: 100%;
  transition: opacity .3s, transform .3s;
}

.carousel-track .product-card {
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.carousel-track .video-card {
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.carousel-track .product-info { padding: 1rem 1.2rem 1.2rem; }
.carousel-track .product-info h3 { font-size: 1.05rem; }
.carousel-track .product-info .desc { font-size: .82rem; }
.carousel-track .product-info .price { font-size: 1.2rem; }
.carousel-track .qty-selector button { width: 30px; height: 30px; }
.carousel-track .qty-selector input { width: 44px; font-size: .9rem; }
.carousel-track .add-cart-btn { font-size: .9rem; padding: .65rem; }

@media (max-width: 768px) {
  .mobile-carousel { display: none !important; }
  .product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
    padding: 0 .8rem 1.5rem;
  }
  .product-grid .product-card {
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
  }
  .product-grid .product-img-wrap {
    aspect-ratio: 1 / 1;
  }
  .product-grid .product-info {
    padding: .7rem .6rem .8rem;
  }
  .product-grid .product-info .category {
    font-size: .62rem;
    padding: 1px 7px;
    margin-bottom: .3rem;
  }
  .product-grid .product-info h3 {
    font-size: .82rem;
    line-height: 1.3;
    margin-bottom: .2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-grid .product-info .desc {
    display: none;
  }
  .product-grid .product-info .view-details-link {
    display: none;
  }
  .product-grid .product-info .price {
    font-size: .95rem;
    margin-bottom: .2rem;
  }
  .product-grid .product-info .shipping-info {
    font-size: .68rem;
    margin-bottom: .2rem;
  }
  .product-grid .product-info .stock {
    font-size: .68rem;
    margin-bottom: .5rem;
  }
  .product-grid .qty-selector {
    display: none;
  }
  .product-grid .add-cart-btn {
    font-size: .78rem;
    padding: .5rem;
    border-radius: 8px;
  }
  .product-grid .product-card:hover {
    transform: none;
  }
  .product-grid .has-multi-img .product-img-wrap::before,
  .product-grid .has-multi-img .product-img-wrap::after {
    display: none;
  }
  .video-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
  }
  .video-grid .video-card-info h3 {
    font-size: .82rem;
    line-height: 1.3;
  }
  .video-grid .video-card-info p {
    display: none;
  }
}

/* ---------- PRINT INVOICE BUTTON ---------- */
.btn-print-order {
  width: 100%;
  margin-top: .6rem;
  padding: .7rem;
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: var(--transition);
}

.btn-print-order:hover { background: var(--primary); color: #fff; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .admin-container {
    grid-template-columns: 1fr;
  }

  .admin-form-panel {
    position: static;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .hero-split { flex-direction: column; text-align: center; gap: 2rem; }
  .hero-content { padding: 2.5rem 0 0; }
  .hero-content > p { max-width: none; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-image, .hero-image-lg { flex: none; width: 90%; max-width: 540px; margin-bottom: -30px; }
  .hero-image img { transform: rotate(0deg); }

  .showcase-card.featured { grid-template-columns: 1fr; }
  .why-us-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .navbar { padding: 0 1rem; height: var(--nav-height); flex-wrap: nowrap; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    gap: .5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
    z-index: 999;
    align-items: stretch;
  }

  .nav-links.mobile-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links a { justify-content: flex-start; }

  .auth-nav-btn { justify-content: center; }
  .auth-nav-btn span { display: inline; }

  .profile-dropdown { width: 100%; }
  .profile-btn { width: 100%; justify-content: center; }

  .cart-btn { width: 100%; justify-content: center; }

  .category-bar { display: none; }

  .hero { padding: 0 1rem; }
  .hero-content h1 { font-size: 1.6rem; }
  .hero-subtitle { font-size: .85rem; letter-spacing: 1.5px; justify-content: center; }
  .hero-content > p { font-size: .9rem; }

  .showcase-grid { grid-template-columns: 1fr; }
  .showcase { padding: 2rem 1rem; }

  .why-us { padding: 2rem 1rem; }
  .why-us-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; padding: 2rem 1rem; }

  .controls { padding: 1rem; }

  .checkout-modal { padding: 1.5rem; }
  .checkout-row.two-col { grid-template-columns: 1fr; }
  .auth-modal { padding: 1.5rem; }

  .order-card-body { grid-template-columns: 1fr; }

  .admin-container { padding: 1rem; }
  .admin-stats { grid-template-columns: 1fr 1fr; }

  .order-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .orders-container { padding: 1rem; }

  .order-card-footer { flex-direction: column; align-items: flex-start; }

  .settings-row { flex-direction: column; align-items: stretch; }
  .backup-actions { grid-template-columns: 1fr; }

  .video-gallery { padding: 2rem 1rem; }
  .video-admin-grid { grid-template-columns: 1fr; }
  .video-modal { border-radius: 0; max-width: 100%; width: 100%; }
  .video-modal-overlay { padding: 0; align-items: center; }
  .video-modal-close { top: 8px; right: 8px; width: 44px; height: 44px; font-size: 1.2rem; }
}

@media (max-width: 480px) {
  .nav-brand { font-size: 1.3rem; }

  .payment-options { flex-direction: column; }

  .admin-stats { grid-template-columns: 1fr; }
  .order-stats-bar { grid-template-columns: 1fr; }

  .admin-tabs { flex-wrap: wrap; padding: 0 .5rem; }
  .admin-tab { padding: .7rem .8rem; font-size: .82rem; }

  .why-us-grid { grid-template-columns: 1fr; }
}

/* ---------- CONNECTION RETRY ---------- */
.connection-retry {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.retry-content {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow);
  max-width: 400px;
}

.retry-content h3 {
  margin-bottom: .3rem;
  color: var(--text);
}

.retry-content p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}

.retry-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.retry-btn:hover {
  background: var(--primary-dark);
}

.retry-btn i.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
