:root {
  --navy: #0f3d91;
  --navy-dark: #0a2a5e;
  --navy-darker: #071b3d;
  --navy-light: #eef2fa;
  --orange: #ff7a00;
  --orange-dark: #e66d00;
  --orange-light: #fff3e6;
  --gray: #1f2937;
  --light: #f5f7fa;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.02em; }
.btn, .chip, .logo, .btn-cart { font-family: var(--font-heading); font-weight: 600; }
/* Flex items default to min-width:auto, letting wide descendants (tables, nowrap text)
   force the item — and the whole page — wider than the viewport. */
body > * { min-width: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}
@media (max-width: 639px) { .site-header .row { justify-content: center; } }
.site-header .row { display: flex; align-items: center; gap: 16px; padding: 12px 16px; max-width: 1152px; margin: 0 auto; }
.site-header .logo { flex-shrink: 0; }
.site-header .logo img { height: 40px; width: auto; }
.site-header nav { display: flex; gap: 24px; font-size: 14px; font-weight: 500; margin-left: 16px; }
.site-header nav a:hover { color: var(--navy); }
.header-icon-link { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.search-form { position: relative; flex: 1; min-width: 0; max-width: 400px; }
.search-form input {
  width: 100%; border: 1px solid #d1d5db; background: #f9fafb; border-radius: 999px;
  padding: 8px 40px 8px 16px; font-size: 14px;
}
.search-form button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px; border-radius: 999px;
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-cart {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
}
.btn-cart .badge {
  background: var(--orange); color: var(--gray); font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 600;
  cursor: pointer; border: none; font-size: 14px; text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease;
}
.btn:active { transform: scale(0.96) translateY(2px) !important; }
.btn-primary {
  background: var(--navy); color: #fff;
  box-shadow: 0 4px 14px rgba(15,61,145,0.35), 0 1px 3px rgba(15,61,145,0.2);
}
.btn-primary:hover { background: var(--navy-dark); box-shadow: 0 8px 24px rgba(15,61,145,0.45), 0 2px 6px rgba(15,61,145,0.25); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy-light); }
.btn-whatsapp { background: #25D366; color: #fff; }

/* Hero */
.hero { position: relative; height: 260px; overflow: hidden; background: linear-gradient(135deg, var(--navy), var(--navy-dark), var(--navy-darker)); }
.hero .hero-swiper, .hero .swiper-wrapper, .hero .swiper-slide { height: 100%; }
.hero img { width: 100%; height: 100%; object-fit: fill; }
.hero .swiper-pagination-bullet { background: #fff; opacity: 0.5; }
.hero .swiper-pagination-bullet-active { opacity: 1; }
@media (min-width: 640px) { .hero { height: 420px; } }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, rgba(7,27,61,0.75) 0%, rgba(7,27,61,0.35) 55%, rgba(7,27,61,0.05) 100%);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 20px; max-width: 640px;
}
.hero-overlay h1 { color: #fff; font-size: 22px; margin: 0 0 8px; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-overlay p { color: rgba(255,255,255,0.92); font-size: 13px; margin: 0 0 16px; }
.hero-overlay .btn { pointer-events: auto; width: fit-content; }
@media (min-width: 640px) {
  .hero-overlay { padding: 0 48px; }
  .hero-overlay h1 { font-size: 36px; }
  .hero-overlay p { font-size: 16px; }
}

/* Product detail page layout */
.pdp-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .pdp-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* Product gallery swiper (product detail page) */
.gallery-swiper { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #f3f4f6; }
.gallery-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { margin-top: 12px; }
.gallery-thumbs .swiper-slide { aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: 0.7; }
.gallery-thumbs .swiper-slide-thumb-active { border-color: var(--navy); opacity: 1; }
.gallery-thumbs .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { border: 1px solid #d1d5db; border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 500; }
@media (max-width: 639px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
}
.chip:hover, .chip.active { border-color: var(--navy); background: var(--navy-light); color: var(--navy); }

/* Product grid + card */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  position: relative;
  border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 2px 12px rgba(15,61,145,0.07), 0 1px 3px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease, transform 0.25s ease;
}
.product-card:hover { box-shadow: 0 24px 64px rgba(15,61,145,0.18), 0 8px 24px rgba(15,61,145,0.1), 0 2px 6px rgba(0,0,0,0.06); }

/* Glare overlay added by 3d-effects.js */
.card-glare {
  position: absolute; inset: 0; border-radius: 14px;
  opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity 0.2s ease;
}
.product-card .img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: #f3f4f6; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover .img-wrap img { transform: scale(1.07); }
.product-card .badges-left { position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.badge-sale {
  background: var(--orange); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
}
.badge-imported {
  position: absolute; right: 8px; top: 8px; background: rgba(0,0,0,0.7); color: #fff;
  font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px;
}
.badge-new {
  background: #16a34a; color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
}
.badge-bestseller {
  background: linear-gradient(135deg, #f59e0b, var(--orange)); color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
  display: inline-flex; align-items: center; gap: 4px;
}
.sale-countdown {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,0.72); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 3px 9px; display: inline-flex; align-items: center; gap: 5px;
}
.sale-countdown-lg {
  position: static; display: inline-flex; background: var(--orange-light); color: var(--orange-dark);
  font-size: 13px; font-weight: 700; border-radius: 8px; padding: 8px 14px; align-items: center; gap: 6px;
}
.product-card .body { padding: 12px; }
.product-card .category { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--navy); }
.product-card h3 { font-size: 14px; font-weight: 600; margin: 4px 0; }
.product-card .price { font-size: 18px; font-weight: 800; }
.product-card .price-old { font-size: 12px; color: #9ca3af; text-decoration: line-through; margin-left: 6px; }

/* Testimonials */
.testimonials { padding: 48px 0; background: linear-gradient(175deg, #f0f4fb 0%, var(--light) 60%); }
.testimonials-swiper { padding-bottom: 40px !important; }
.testimonials-swiper .swiper-pagination-bullet { background: var(--navy); opacity: 0.3; }
.testimonials-swiper .swiper-pagination-bullet-active { opacity: 1; }
.testimonial-card {
  background: rgba(255,255,255,0.80); backdrop-filter: blur(6px);
  border-radius: 16px; padding: 24px; height: 100%;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 8px 32px rgba(15,61,145,0.09), 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(255,255,255,0.72);
}
.testimonial-text { font-size: 14px; color: var(--gray); line-height: 1.5; flex: 1; font-style: italic; }
.testimonial-author { font-size: 13px; }

/* Trust badges */
.trust-badges { background: linear-gradient(180deg, var(--light) 0%, #e8edf7 100%); padding: 40px 0; }
.trust-badges .grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .trust-badges .grid { grid-template-columns: repeat(3, 1fr); } }
.trust-badges .card {
  background: rgba(255,255,255,0.82); backdrop-filter: blur(8px);
  border-radius: 12px; padding: 20px; text-align: center;
  box-shadow: 0 4px 20px rgba(15,61,145,0.09), 0 1px 4px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.65);
}
.trust-badges .trust-icon { font-size: 26px; color: var(--navy); }

/* Font Awesome icon sizing */
.bottom-nav a i { font-size: 18px; }
.star-rating i { color: var(--orange); font-size: 14px; }
.star-rating i.fa-regular { color: #d1d5db; }
.search-form button i { font-size: 15px; color: #6b7280; }
.btn-cart i { font-size: 14px; }

/* Forms */
input, textarea, select {
  font-family: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid #d1d5db;
  border-radius: 8px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(15,61,145,0.15); }
label { font-size: 14px; font-weight: 500; color: #374151; }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid #e5e7eb; background: linear-gradient(180deg, var(--light) 0%, #e4eaf6 100%); }

/* Product gallery 3D viewer */
.gallery-swiper { transition: transform 0.15s ease; }
.badge-360 {
  position: absolute; top: 10px; right: 10px; z-index: 10;
  background: rgba(15,61,145,0.82); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; pointer-events: none; letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}
.gallery-3d-hint {
  text-align: center; margin-top: 10px; font-size: 12px; color: #9ca3af; user-select: none;
}
.site-footer .grid { display: grid; gap: 32px; padding: 40px 16px; max-width: 1152px; margin: 0 auto; }
@media (min-width: 640px) { .site-footer .grid { grid-template-columns: repeat(3, 1fr); } }
.site-footer h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: 14px; color: #4b5563; }
.site-footer ul li { margin-bottom: 4px; }
.site-footer .copyright { border-top: 1px solid #e5e7eb; padding: 16px; text-align: center; font-size: 12px; color: #6b7280; }

/* Social icons */
.footer-socials { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.social-icon {
  width: 36px; height: 36px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff; transition: transform 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
}
.social-icon:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.18); }
.social-fb { background: #1877f2; }
.social-ig { background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.social-wa { background: #25D366; }
.social-tk { background: #010101; }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: none;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-top: 1px solid #e5e7eb;
}
.bottom-nav .row { display: flex; }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 0; font-size: 11px; font-weight: 500; color: #6b7280;
}
.bottom-nav a.active { color: var(--navy); }
@media (max-width: 639px) { .bottom-nav { display: block; } }
@media (max-width: 639px) {
  .site-header nav { display: none; }
  .site-header .search-form { display: none; }
  .site-header .header-actions { display: none; }
}

/* Cart / checkout */
.cart-item { display: flex; gap: 16px; align-items: center; border: 1px solid #e5e7eb; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.cart-item img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #d1d5db; border-radius: 8px; }
.qty-control button { background: none; border: none; padding: 6px 12px; font-size: 18px; cursor: pointer; }
.summary-box { background: var(--light); border-radius: 8px; padding: 20px; margin-top: 32px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; color: #4b5563; margin-bottom: 4px; }
.summary-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; border-top: 1px solid #d1d5db; padding-top: 8px; margin-top: 8px; }

/* WOW.js: hide until the scroll-triggered animation reveals it (WOW.js
   itself flips visibility to visible right as it adds the animate.css class) */
.wow { visibility: hidden; }

/* Utility */
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }

/* Admin/staff form grids — minmax(0,1fr) avoids the grid-blowout bug, stacks on mobile */
.admin-form-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.admin-form-grid-4 { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 639px) {
  .admin-form-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-gray { color: #6b7280; }
.error-text { color: #dc2626; font-size: 13px; }
.success-box { background: #f0fdf4; color: #166534; border-radius: 8px; padding: 16px; font-size: 14px; }
