:root {
  /* Titanium Dark Palette - Cohesive & Premium */
  --bg: #050505;
  /* Deepest Matte Black */
  --surface: #121212;
  /* Eerie Black - slightly lighter for cards */
  --surface-hover: #1A1A1A;
  --border: #262626;
  /* Titanium Grey - Subtle separation, no clash */
  --text-main: #EDEDED;
  /* Soft White - readable but not harsh */
  --text-muted: #A1A1A1;
  /* Neutral Grey */
  --accent: #FFFFFF;
  /* Pure White - only for primary actions */
  --error: #ef4444;
  --success: #10b981;

  --radius: 16px;
  /* Modern, slightly tighter radius */
  --btn-radius: 9999px;
  /* Pill shape for buttons */
  --container-w: 1200px;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button,
input,
select {
  font-family: inherit;
}

/* --- Layout --- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.85);
  /* Glassmorph background */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.main-nav,
.header-actions {
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text-main);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  position: relative;
  padding: 8px;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 800;
  height: 16px;
  min-width: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

#mobile-menu {
  display: none;
}

/* Simplified for this snippet */
#mobile-menu.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

#mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
}

/* --- Hero Section --- */
.hero {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 24px;
  /* Gradient Text */
  background: linear-gradient(135deg, #FFFFFF 0%, #777777 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--btn-radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn-xl {
  padding: 16px 32px;
  font-size: 1.1rem;
  width: 100%;
}

/* --- Cards & Grid --- */
.intro-cards {
  display: flex;
  gap: 24px;
  padding: 60px 0;
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  flex: 1;
  min-width: 280px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--text-muted);
  transform: translateY(-4px);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Shop Layout --- */
.shop-hero {
  padding: 60px 0 40px;
}

.shop-hero h1 {
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}

.shop-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding-bottom: 80px;
}

/* Sidebar */
.shop-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.shop-sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.shop-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.shop-sidebar li {
  margin-bottom: 4px;
}

/* Input styling to match sidebar look */
.sidebar-radio {
  display: none;
}

/* Hide actual radio if using custom UI (simplified here to labels) */
.shop-sidebar label {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.shop-sidebar label:hover {
  color: var(--text-main);
  background: var(--surface);
}

.sidebar-radio:checked+label {
  color: var(--accent);
  background: var(--surface);
  font-weight: 500;
}


/* Product Grid */
.product-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  /* Optimized width */
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  border-color: #444;
  /* Slight highlight */
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: contain;
  background: #000;
  /* Inner contrast */
  border-radius: 12px;
  margin-bottom: 20px;
  padding: 20px;
  /* Air around device */
}

.product-card h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Product subtitle (e.g. "256GB | Pacific Blue") */
.product-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 8px;
}

/* Product badge (e.g. "New", "🔥 Flagship") */
.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.rating {
  color: #FBBF24;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
}

.card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-actions .btn {
  padding: 10px;
  font-size: 0.9rem;
}

.add-cart {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--btn-radius);
}

.add-cart:hover {
  border-color: var(--text-main);
}

/* --- Product Detail Page --- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 0;
}

.product-detail img {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.product-meta h2 {
  font-size: 2.5rem;
  margin: 0 0 16px;
}


/* --- Forms (Checkout) --- */
.checkout-page h2 {
  margin-bottom: 32px;
  font-size: 2rem;
}

.checkout-form {
  display: grid;
  gap: 32px;
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.form-section h4 {
  margin: 0 0 24px;
  font-size: 1.1rem;
  font-weight: 600;
}

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

@media(min-width: 600px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Unified Input Style */
input,
select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

input::placeholder {
  color: #555;
}

/* Bank Details Box */
#bank-details {
  margin-top: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* --- Footer --- */
.site-footer {
  margin-top: 100px;
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  background: #080808;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-col h4 {
  color: var(--text-main);
  margin: 0 0 20px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li a {
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.footer-col li a:hover {
  color: var(--text-main);
}

.footer-bottom {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Modal (Fixed) --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex !important;
  /* Flex by default for layout */
  align-items: center;
  justify-content: center;
}

.modal-overlay[hidden] {
  display: none !important;
  /* Strict hide */
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.check-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

.email-preview {
  background: #000;
  border: 1px dashed var(--border);
  padding: 20px;
  border-radius: 8px;
  margin: 24px 0;
  text-align: left;
  font-size: 0.9rem;
  font-family: monospace;
  color: var(--text-muted);
}

/* --- Tables (Account) --- */
.table-container {
  overflow-x: auto;
}

.order-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.order-table th {
  text-align: left;
  padding: 12px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.order-table td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
}

.badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
}

/* Responsive */
@media(max-width: 900px) {
  .shop-wrapper {
    flex-direction: column;
  }

  .shop-sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
  }

  .shop-sidebar label {
    white-space: nowrap;
  }
}

@media(max-width: 700px) {

  .main-nav,
  .header-actions {
    display: none;
  }

  /* Simplified: In real app, toggle would be here */
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }
}

/* Quantity Input */
.qty-input {
  width: 60px;
  padding: 10px;
  text-align: center;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-main);
  font-weight: 600;
  margin-right: 8px;
}

.qty-input:focus {
  border-color: var(--accent);
  outline: none;
}

/* ===== SECTION BLOCKS ===== */
.section-block {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}

/* ===== HOW IT WORKS ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: var(--transition);
}

.step-card:hover {
  border-color: #444;
  transform: translateY(-4px);
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.step-card p {
  color: var(--text-muted);
  margin: 0;
}

/* ===== DELIVERY TIMELINE ===== */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.delivery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}

.delivery-card:hover {
  border-color: #444;
  transform: translateY(-3px);
}

.delivery-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.delivery-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.delivery-time {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 12px;
}

.delivery-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.delivery-total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 32px;
  font-size: 1.1rem;
}

.delivery-total strong {
  color: var(--accent);
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: var(--transition);
}

.testimonial-card:hover {
  border-color: #444;
}

.testimonial-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.testimonial-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 16px;
  line-height: 1.7;
  font-style: italic;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testimonial-meta strong {
  color: var(--text-main);
  font-size: 0.95rem;
}

.testimonial-meta span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.proof-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.proof-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 2.5rem;
}

.contact-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.contact-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.contact-cta {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ===== NEWSLETTER ===== */
.newsletter {
  margin: 60px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}

.newsletter h2 {
  margin: 0 0 24px;
  font-size: 1.8rem;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
}

/* ===== CUSTOMER REVIEW FORM ===== */
.review-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 720px;
  margin: 0 auto;
}

.review-form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
}

#star-rating span {
  transition: transform 0.1s ease;
  user-select: none;
}

#star-rating span:hover {
  transform: scale(1.2);
}