/* ============================
   FIXED & OPTIMIZED STYLES.CSS
   ============================ */

:root {
  --bg: #070707;
  --panel: #0f0f10;
  --panel2: #0b0b0c;
  --text: #f3f3f3;
  --muted: #b9b9b9;
  --gold: #d7b66a;
  --gold2: #f1d38c;
  --line: rgba(215,182,106,.18);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 28px;
  --max: 1180px;
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-serif, "Georgia", "Times New Roman", serif;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(215,182,106,.08), transparent 55%),
    radial-gradient(900px 600px at 80% 20%, rgba(215,182,106,.06), transparent 55%),
    linear-gradient(180deg, #050505, #070707 40%, #050505);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none;
}

button, input, select, textarea {
  font: inherit;
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

::selection {
  background: rgba(215,182,106,.25);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0,0,0,.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(215,182,106,.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(215,182,106,.5);
}

/* ===== LAYOUT & UTILITIES ===== */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.spacer {
  height: 28px;
}

.hr {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
  border: none;
}

/* ===== HEADER & NAVIGATION FIXES ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5,5,5,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: all 0.3s ease;
}

.topbar.scrolled {
  background: rgba(5,5,5,.98);
  box-shadow: 0 5px 20px rgba(0,0,0,.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  min-height: 64px;
}

/* Brand styling */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  object-fit: cover;
}

.brandText {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brandText b {
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--gold2);
}

.brandText span {
  font-size: 12px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* Desktop Navigation */
.navlinks {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}

.navlinks a {
  color: rgba(243,243,243,.85);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 14px;
  border-radius: 12px;
  transition: all .2s ease;
  white-space: nowrap;
}

.navlinks a:hover,
.navlinks a:focus {
  background: rgba(215,182,106,.09);
  color: var(--gold2);
  transform: translateY(-1px);
  outline: none;
}

/* Actions & Icons */
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.iconBtn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  color: aliceblue;
  border: 1px solid rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}

.iconBtn:hover,
.iconBtn:focus {
  transform: translateY(-1px);
  border-color: rgba(215,182,106,.28);
  background: rgba(215,182,106,.06);
  outline: none;
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0 6px;
  background: rgba(215,182,106,.92);
  color: #111;
  font-size: 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0,0,0,.35);
  font-family: ui-sans-serif, system-ui;
}

/* Mobile Menu Toggle */
.mobileToggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  color: aliceblue;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.mobileToggle:hover {
  border-color: rgba(215,182,106,.28);
  background: rgba(215,182,106,.06);
}

/* ===== BUTTON STYLES ===== */
.btn, .miniBtn {
  cursor: pointer;
  border-radius: 16px;
  padding: 12px 20px;
  border: 1px solid rgba(215,182,106,.28);
  background: rgba(215,182,106,.08);
  color: var(--gold2);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transition: all .3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover,
.btn:focus,
.miniBtn:hover,
.miniBtn:focus {
  transform: translateY(-2px);
  background: rgba(215,182,106,.12);
  border-color: rgba(215,182,106,.42);
  outline: none;
}

.btn.primary,
.miniBtn.primary {
  background: linear-gradient(140deg, rgba(241,211,140,.95), rgba(215,182,106,.75));
  color: #121212;
  border-color: rgba(241,211,140,.65);
}

.btn.primary:hover,
.miniBtn.primary:hover {
  background: linear-gradient(140deg, rgba(241,211,140,1), rgba(215,182,106,.85));
  transform: translateY(-2px) scale(1.02);
}

.btn.ghost {
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.08);
  color: rgba(243,243,243,.9);
}

.btn.ghost:hover {
  background: rgba(255,255,255,.05);
  border-color: rgba(215,182,106,.22);
  color: var(--gold2);
}

/* ===== CARD & PANEL STYLES ===== */
.card, .panel {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid rgba(215,182,106,.18);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panelPad {
  padding: 20px;
}

/* ===== PRODUCT GRID & CARDS ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.productCard {
  border-radius: var(--radius2);
  overflow: hidden;
  border: 1px solid rgba(215,182,106,.18);
  background: rgba(255,255,255,.02);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  transition: all .3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.productCard:hover {
  transform: translateY(-8px);
  border-color: rgba(241,211,140,.34);
  background: rgba(215,182,106,.04);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}

.pImg {
  height: 240px;
  background: rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.pImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.productCard:hover .pImg img {
  transform: scale(1.05);
}

.discountBadge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #e53935, #c62828);
  color: white;
  border: 1px solid rgba(0,0,0,.35);
  box-shadow: 0 6px 20px rgba(229, 57, 53, 0.3);
  z-index: 2;
}

.pBody {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.pTitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  flex: 1;
}

.price {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--gold2);
  white-space: nowrap;
}

.pMeta {
  color: rgba(243,243,243,.72);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 15px;
  flex: 1;
}

.pActions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* ===== FORM STYLES ===== */
.formGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.formGrid .full {
  grid-column: 1 / -1;
}

.label {
  display: block;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(241,211,140,.9);
  font-family: ui-sans-serif, system-ui, sans-serif;
  margin-bottom: 8px;
}

.control {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  padding: 12px 16px;
  color: var(--text);
  font-size: 16px; /* Prevents zoom on iOS */
  transition: all .3s ease;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.control:focus {
  border-color: rgba(241,211,140,.5);
  box-shadow: 0 0 0 3px rgba(215,182,106,.12);
  outline: none;
}

textarea.control {
  min-height: 120px;
  resize: vertical;
}

/* ===== FOOTER STYLES ===== */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  padding: 40px 0 20px;
}

.footerGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  margin: 0 0 15px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--gold2);
}

.footer a, .footer p {
  margin: 0;
  display: block;
  color: rgba(243,243,243,.72);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 8px;
}

.footer a:hover {
  color: var(--gold2);
}

.copy {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: rgba(243,243,243,.55);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  text-align: center;
}

/* ===== MOBILE MENU FIXES ===== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 999;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 1000;
  transition: right 0.3s ease;
  padding: 20px;
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.mobile-menu-links a {
  padding: 15px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.mobile-menu-links a:hover {
  background: rgba(215,182,106,0.1);
  border-color: rgba(215,182,106,0.3);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold2);
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  margin-left: 10px;
}

.menu-close {
  background: none;
  border: none;
  color: var(--gold2);
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .pImg {
    height: 200px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }
  
  .navlinks {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }
  
  .productCard {
    border-radius: 20px;
  }
  
  .pImg {
    height: 180px;
  }
  
  .pBody {
    padding: 15px;
  }
  
  .footerGrid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  /* Mobile menu adjustments */
  .mobile-menu {
    width: 280px;
  }
  
  /* Force display of mobile menu items */
  .mobile-menu-links a {
    display: block;
  }
  
  /* Hide desktop social icons in mobile */
  .topbar .social-icons {
    display: none;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .pImg {
    height: 160px;
  }
  
  .pTitle {
    font-size: 16px;
  }
  
  .price {
    font-size: 16px;
  }
  
  .pActions {
    flex-direction: column;
  }
  
  .btn, .miniBtn {
    width: 100%;
    padding: 12px;
  }
  
  /* Mobile menu smaller screens */
  .mobile-menu {
    width: 100%;
    max-width: 280px;
  }
}

/* ===== ANIMATION CLASSES ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--gold2);
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--gold2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== PRINT STYLES ===== */
@media print {
  .topbar,
  .mobile-menu,
  .menu-toggle,
  .mobile-menu-overlay,
  .footer,
  .pActions {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  .productCard {
    break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}

/* ===== IMAGE GALLERY THUMBNAILS ===== */
.image-gallery,
.thumbnails-container {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.thumbnail,
.thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumbnail:hover,
.thumb:hover {
  border-color: var(--gold2);
  transform: scale(1.05);
}

.thumbnail.active,
.thumb.active {
  border-color: var(--gold2);
}

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

/* ===== QUANTITY STEPPER ===== */
.stepper {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.stepBtn {
  background: none;
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.stepBtn:hover {
  background: rgba(255,255,255,0.1);
}

.qtyVal {
  width: 40px;
  text-align: center;
  font-size: 14px;
  color: var(--text);
}

/* ===== ALERT MESSAGES ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert-error {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.3);
  color: #ff9999;
}

.alert-success {
  background: rgba(0, 255, 0, 0.1);
  border-color: rgba(0, 255, 0, 0.3);
  color: #99ff99;
}

/* ===== CHECKBOX STYLES ===== */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox span {
  font-size: 14px;
  line-height: 1.4;
}

/* ===== SOCIAL ICONS ===== */
.social-icons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-icons a {
  color: var(--muted);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.social-icons a:hover {
  color: var(--gold2);
  background: rgba(215,182,106,0.1);
  transform: translateY(-2px);
}

/* ===== PAGE HEADER ===== */
.pageHead {
  padding: 22px 0 8px;
}

.pageHead h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.pageHead p {
  margin: 8px 0 0;
  color: rgba(243,243,243,.72);
  font-family: ui-sans-serif, system-ui, sans-serif;
  line-height: 1.6;
}

/* ===== TWO COLUMN LAYOUT ===== */
.twoCol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .twoCol {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0;
}

.field {
  flex: 1;
  min-width: 220px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
}

.field input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  width: 100%;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}

/* ===== CHIP ROW ===== */
.chipRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(215,182,106,0.22);
  background: rgba(215,182,106,0.06);
  color: rgba(241,211,140,0.9);
  font-size: 12px;
  letter-spacing: .06em;
  cursor: pointer;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.chip:hover {
  transform: translateY(-1px);
  background: rgba(215,182,106,0.1);
  border-color: rgba(241,211,140,0.35);
}

.chip.active {
  background: rgba(241,211,140,0.14);
  border-color: rgba(241,211,140,0.5);
}