/* ========================================
   DRIFT — Global Styles
   ======================================== */

/* === CSS Variables === */
:root {
  --black: #050505;
  --void: #111111;
  --bg-card: rgba(12, 12, 12, 0.6);
  --surface: #1A1A1A;
  --border: #2A2A2A;
  --muted: #555555;
  --silver: #C0C0C0;
  --white: #F0F0F0;
  --accent: #FFFFFF;
  --red: #CC2200;
  --smoke: rgba(255,255,255,0.04);
  --shadow-card: 0 2px 20px rgba(0,0,0,0.6);
  --shadow-modal: 0 8px 60px rgba(0,0,0,0.9);

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--silver);
  background-color: #050505;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' preserveAspectRatio='none'%3E%3Cdefs%3E%3Cfilter id='s' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeDropShadow dx='0' dy='-15' stdDeviation='20' flood-color='%23000' flood-opacity='1'/%3E%3C/filter%3E%3C/defs%3E%3Crect width='1440' height='900' fill='%23282828'/%3E%3Cpath filter='url(%23s)' fill='%231e1e1e' d='M0,150 C300,-50 600,250 1440,100 L1440,900 L0,900 Z'/%3E%3Cpath filter='url(%23s)' fill='%23171717' d='M0,300 C400,450 800,100 1440,250 L1440,900 L0,900 Z'/%3E%3Cpath filter='url(%23s)' fill='%230f0f0f' d='M0,450 C500,350 900,550 1440,400 L1440,900 L0,900 Z'/%3E%3Cpath filter='url(%23s)' fill='%23070707' d='M0,650 C600,800 1000,500 1440,650 L1440,900 L0,900 Z'/%3E%3Cpath filter='url(%23s)' fill='%23000000' d='M0,800 C700,700 1100,950 1440,850 L1440,900 L0,900 Z'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded {
  opacity: 1;
}

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

a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--white);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--muted);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Remove up/down spin buttons in number inputs */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: 0.02em;
  font-weight: 400;
}

h1 { font-size: clamp(48px, 8vw, 96px); }
h2 { font-size: clamp(36px, 5vw, 64px); }
h3 { font-size: clamp(28px, 4vw, 48px); }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 16px; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 8px;
}

.price {
  font-family: var(--font-mono);
  font-weight: 600;
}

.price-original {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.85em;
  margin-right: 8px;
}

/* === Layout === */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-sm {
  padding: 48px 0;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.flex {
  display: flex;
  align-items: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-center { text-align: center; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-height: 48px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--black);
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--black);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--silver);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.btn-ghost:hover {
  border-color: var(--silver);
  color: var(--white);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 13px;
  min-height: 36px;
}

.btn-full {
  width: 100%;
}

.btn:active {
  transform: scale(0.98);
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar .logo svg {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--silver);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-btn {
  position: relative;
  padding: 8px;
  color: var(--silver);
  transition: color 0.3s ease;
}

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

.cart-btn svg {
  width: 22px;
  height: 22px;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: -2px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

.cart-badge.pulse {
  animation: pulse-badge 0.5s ease;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 1002;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.3s ease;
}

.mobile-nav a:hover {
  opacity: 0.6;
}

/* === Footer === */
.footer {
  background: var(--void);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  display: inline-block;
}

.footer-brand p {
  font-size: 14px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.7;
}

.footer h6 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.footer-links a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.3s ease;
}

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

/* === Badges === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
}

.badge-sale {
  background: var(--red);
  color: #fff;
}

.badge-new {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

/* Status badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pending { background: rgba(255,200,0,0.15); color: #FFD700; }
.status-confirmed { background: rgba(0,120,255,0.15); color: #4da6ff; }
.status-shipped { background: rgba(150,0,255,0.15); color: #b366ff; }
.status-delivered { background: rgba(0,200,80,0.15); color: #00e676; }
.status-cancelled { background: rgba(255,0,0,0.15); color: #ff4444; }

/* === Modal / Overlay === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-modal);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

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

.modal-header h4 {
  font-size: 20px;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 20px;
  transition: color 0.3s ease;
  border-radius: 4px;
}

.modal-close:hover {
  color: var(--white);
  background: var(--border);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--white);
  box-shadow: var(--shadow-card);
  transform: translateX(120%);
  transition: transform 0.4s ease;
  max-width: 360px;
}

.toast.show {
  transform: translateX(0);
}

.toast-success { border-left: 3px solid #00e676; }
.toast-error { border-left: 3px solid var(--red); }
.toast-info { border-left: 3px solid #4da6ff; }

/* === Form Groups === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--silver);
  margin-bottom: 8px;
}

.form-group .error-msg {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--red);
}

.form-group.has-error .error-msg {
  display: block;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.toggle input:checked + .toggle-slider {
  background: #00e676;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--black);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* === Selection === */
::selection {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

/* === Breadcrumb === */
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 64px 0; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  h1 { font-size: 48px; }
  h2 { font-size: 36px; }
  h3 { font-size: 28px; }
}

@media (max-width: 480px) {
  .navbar { padding: 0 16px; }
  h1 { font-size: 36px; }
}

/* Hide admin link in the footer on all views */
.footer a[href*="admin"],
.footer-bottom a[href*="admin"] {
  display: none !important;
}

/* === Floating Contact Buttons === */
.floating-contact {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.floating-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.floating-btn:active {
  transform: scale(0.95);
}

.floating-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Phone Call button: Green/Teal theme */
.floating-btn.phone-btn {
  background-color: #00bfa5;
}

/* WhatsApp button: Green theme */
.floating-btn.whatsapp-btn {
  background-color: #25d366;
}

/* On mobile, adjust positions or sizes slightly */
@media (max-width: 768px) {
  .floating-contact {
    bottom: 20px;
    right: 20px;
    gap: 10px;
  }
  .floating-btn {
    width: 48px;
    height: 48px;
  }
  .floating-btn svg {
    width: 22px;
    height: 22px;
  }
}
