:root {
  --container: 1180px;
  --primary: #0d6efd;
  --primary-600: #0a58ca;
  --bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fafafa;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.topbar__inner {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 16px;
  align-items: center;
  height: 70px;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.logo img { height: auto; width: 100%; display: block; }
.search {
  display: flex;
}
.search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 8px 0 0 8px;
}
.search button {
  width: 44px;
  border: 1px solid var(--border);
  border-left: 0;
  background: var(--primary);
  color: white;
  border-radius: 0 8px 8px 0;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 16px;
}

/* Page */
.page { padding: 24px 20px 60px; }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }

.product {
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  padding: 24px;
  border-radius: 12px;
}

.gallery__stage { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.gallery__stage img { width: 100%; height: 520px; object-fit: cover; display: block; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.gallery__thumbs img { width: 100%; height: 88px; object-fit: cover; border: 2px solid transparent; border-radius: 8px; cursor: pointer; }
.gallery__thumbs img:hover { border-color: var(--primary); }

.product__info .category { color: var(--muted); font-size: 14px; }
.product__info .title { margin: 8px 0 6px; line-height: 1.25; }
.rating { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.rating .stars { color: #f59e0b; }
.rating__count { color: var(--primary); text-decoration: none; }
.bullets { padding-left: 18px; line-height: 1.7; }

.pricebox { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.pricebox .price { font-size: 28px; font-weight: 700; color: #dc2626; }
.pricebox .compare { text-decoration: line-through; color: var(--muted); }
.pricebox .badge { background: #fde68a; color: #92400e; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 12px; }

.purchase { display: grid; grid-template-columns: 120px auto; gap: 12px; align-items: center; }
.purchase input[type=number] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.btn { 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
  padding: 14px 24px; 
  border-radius: 12px; 
  border: none; 
  cursor: pointer; 
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  text-decoration: none;
  justify-content: center;
  min-width: 140px;
}
.btn--primary { 
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
  position: relative;
  overflow: hidden;
}
.btn--primary:hover { 
  background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
}
.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}
.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.btn--primary:hover::before {
  left: 100%;
}
.shipping { color: var(--success); font-weight: 500; }

.product__video { margin-top: 20px; }
.product__video video { width: 100%; border-radius: 12px; border: 1px solid var(--border); }

/* Deals carousel */
.deals { margin-top: 36px; }
.deals h2 { margin: 0 0 12px; }
.carousel { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 44px; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: 25%; gap: 16px; overflow: hidden; scroll-behavior: smooth; }
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.carousel__nav.prev { left: 8px; }
.carousel__nav.next { right: 8px; }

.card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; display: grid; }
.card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.card__meta { color: var(--muted); font-size: 12px; padding: 8px 12px 0; }
.card__title { padding: 2px 12px; font-size: 16px; line-height: 1.35; }
.card__price { padding: 0 12px 12px; display: flex; gap: 10px; align-items: baseline; }
.card__price .now { color: #dc2626; font-weight: 700; }
.card__price .was { color: var(--muted); text-decoration: line-through; }

.carousel__dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 0; }
.carousel__dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: #d1d5db; }
.carousel__dots button.active { background: var(--primary); }

/* Tabs */
.tabs { margin-top: 32px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.tabs__list { display: flex; gap: 24px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.tab { background: transparent; border: 0; padding: 10px 4px; cursor: pointer; font-weight: 500; color: var(--muted); }
.tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.tabs__panes { padding: 20px; }
.tabpane { display: none; }
.tabpane.active { display: block; }
.tabpane .banner { width: 100%; border-radius: 12px; margin-top: 18px; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { border-bottom: 1px solid var(--border); text-align: left; padding: 12px; }

/* Footer */
.footer { margin-top: 48px; background: #0b1220; color: #d1d5db; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px 20px; }
.footer a { color: #9ca3af; text-decoration: none; }
.copy { text-align: center; border-top: 1px solid rgba(255,255,255,.1); padding: 10px; font-size: 13px; color: #94a3b8; }

/* Checkout Page */
.checkout-container {
  max-width: 800px;
  margin: 0 auto;
}

.checkout-form h1 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
}

.order-summary {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.order-summary h2 {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--text);
}

.product-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.product-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.product-details h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--text);
}

.product-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.quantity {
  color: var(--muted);
  font-size: 14px;
}

.price {
  font-weight: 700;
  color: #dc2626;
  font-size: 18px;
}

.order-totals {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 16px;
}

.total-line.total {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.free {
  color: var(--success);
  font-weight: 600;
}

.checkout-form-fields {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.form-section {
  margin-bottom: 32px;
}

.form-section h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

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

.form-row:last-child {
  margin-bottom: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn--large {
  padding: 16px 32px;
  font-size: 18px;
  min-width: 200px;
}

.btn--secondary {
  background: #6b7280;
  color: #fff;
  border: 1px solid #6b7280;
}

.btn--secondary:hover {
  background: #4b5563;
  border-color: #4b5563;
}

/* Responsive */
@media (max-width: 1024px) {
  .product { grid-template-columns: 1fr; }
  .carousel__track { grid-auto-columns: 50%; }
}

@media (max-width: 640px) {
  .topbar__inner { grid-template-columns: 1fr auto; }
  .search { display: none; }
  .carousel { padding: 12px 44px; }
  .carousel__track { grid-auto-columns: 85%; }
  .gallery__stage img { height: 360px; }
}

/* Legal Pages Styles (Terms, Privacy, Shipping) */
.legal-content {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 32px;
}

.last-updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section h2 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 24px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.legal-section h3 {
  margin: 24px 0 12px;
  color: var(--text);
  font-size: 20px;
}

.legal-section p {
  margin: 0 0 16px;
  line-height: 1.6;
  color: var(--text);
}

.legal-section ul,
.legal-section ol {
  margin: 0 0 16px 20px;
  line-height: 1.6;
}

.legal-section li {
  margin-bottom: 8px;
}

.contact-info {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
}

.contact-info p {
  margin: 0 0 8px;
}

.contact-info p:last-child {
  margin-bottom: 0;
}

/* Contact Page Styles */
.contact-container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 40px;
}

.contact-header h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 36px;
}

.contact-header p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.contact-info-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.contact-info-section h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 24px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.contact-method {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.contact-method:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.contact-details h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.contact-details p {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
}

.contact-details .hours {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.contact-details a {
  color: var(--primary);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.contact-form-section h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 24px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.faq-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
}

.faq-section h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 24px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.faq-item h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-item h3 i {
  color: var(--primary);
}

.faq-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.faq-item a {
  color: var(--primary);
  text-decoration: none;
}

.faq-item a:hover {
  text-decoration: underline;
}

/* Tracking Page Styles */
.tracking-container {
  max-width: 1000px;
  margin: 0 auto;
}

.tracking-header {
  text-align: center;
  margin-bottom: 40px;
}

.tracking-header h1 {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 36px;
}

.tracking-header p {
  color: var(--muted);
  font-size: 18px;
  margin: 0;
}

.tracking-form-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
  text-align: center;
}

.tracking-form {
  max-width: 600px;
  margin: 0 auto;
}

.tracking-form .form-row {
  margin-bottom: 24px;
}

.tracking-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
}

.order-summary {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.order-summary h2 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 24px;
}

.order-details {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.order-info p {
  margin: 0 0 8px;
  color: var(--text);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 500;
  font-size: 16px;
}

.status-badge.in-transit {
  background: #f59e0b;
}

.status-badge.delivered {
  background: var(--success);
}

.status-badge.processing {
  background: #8b5cf6;
}

.tracking-timeline {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tracking-timeline h3 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 20px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  width: 48px;
  height: 48px;
  background: var(--border);
  color: var(--muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-item.completed .timeline-icon {
  background: var(--success);
  color: white;
}

.timeline-item.active .timeline-icon {
  background: var(--primary);
  color: white;
}

.timeline-content h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.timeline-content p {
  margin: 0 0 8px;
  color: var(--text);
  line-height: 1.6;
}

.timeline-date {
  color: var(--muted);
  font-size: 14px;
}

.tracking-details {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.tracking-details p {
  margin: 0 0 4px;
  font-size: 14px;
}

.tracking-details p:last-child {
  margin-bottom: 0;
}

.shipping-details {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.shipping-details h3 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 20px;
}

.shipping-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.shipping-address h4,
.carrier-info h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
}

.shipping-address p,
.carrier-info p {
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.6;
}

.order-actions {
  margin-bottom: 40px;
}

.order-actions h3 {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 20px;
}

.action-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.tracking-help {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.tracking-help h2 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: 24px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 12px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.help-item h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-item h3 i {
  color: var(--primary);
}

.help-item p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

/* Responsive adjustments for new pages */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .order-details {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .shipping-info {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-buttons .btn {
    width: 100%;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    gap: 16px;
  }
  
  .timeline-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .legal-content,
  .contact-info-section,
  .contact-form-section,
  .tracking-form-section,
  .tracking-result,
  .tracking-help {
    padding: 20px;
  }
  
  .contact-method {
    flex-direction: column;
    gap: 12px;
  }
  
  .contact-icon {
    align-self: flex-start;
  }
}


