/* ===== Screen Reader Only (SEO) ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f8fafc;
  color: #1e293b;
  line-height: 1.5;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.site-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-content { max-width: 1200px; margin: 0 auto; display: block; }
.site-logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.site-logo span { color: #93c5fd; }
.header-cta { font-size: 12px; font-weight: 600; color: #93c5fd; letter-spacing: 0; }
.site-tagline { font-size: 11px; opacity: 0.8; margin-top: 1px; }

/* ===== Category Tabs ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 10px;
  max-width: 1200px;
  margin: 0 auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.category-tab:active { transform: scale(0.96); }
.category-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.category-tab .tab-count {
  display: inline-block;
  background: rgba(0,0,0,0.08);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 4px;
}
.category-tab.active .tab-count {
  background: rgba(255,255,255,0.25);
}

/* ===== Main ===== */
.main-content { max-width: 1200px; margin: 0 auto; padding: 0 10px 10px; }

/* ===== Product Grid — 2 columns mobile ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.product-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  cursor: pointer;
  transition: transform 0.15s;
}
.product-card:active { transform: scale(0.97); }

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }

.product-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.product-card-body { padding: 8px 10px 10px; }

.product-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-nickname {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.product-card-rate {
  font-size: 16px;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 2px;
}
.product-card-rate .rate-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
}

.product-card-sample {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.product-card-colors {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.color-dot-small {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  flex-shrink: 0;
}

.product-card-weight {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.active { display: flex; }

.modal-container {
  background: #fff;
  width: 100%;
  max-width: 600px;
  max-height: 93vh;
  border-radius: 14px 14px 0 0;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  font-size: 20px;
  color: #475569;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Swipe Carousel ===== */
.swipe-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1;
  background: #f1f5f9;
}

.swipe-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.swipe-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.swipe-slide img,
.swipe-slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swipe-slide-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.video-play-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Swipe Arrow Buttons (desktop) */
.swipe-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.swipe-arrow:hover { background: rgba(0,0,0,0.7); }
.swipe-arrow-left { left: 10px; }
.swipe-arrow-right { right: 10px; }
@media (min-width: 600px) {
  .swipe-arrow { display: flex; align-items: center; justify-content: center; }
}

.swipe-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.swipe-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.swipe-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ===== Detail Info ===== */
.detail-info { padding: 14px 16px 8px; }

.detail-name {
  font-size: 19px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
  margin-bottom: 2px;
}

.detail-nickname {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.detail-rate {
  font-size: 24px;
  font-weight: 900;
  color: #16a34a;
  margin-bottom: 2px;
}

.detail-sample-price {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 10px;
}
.detail-sample-price strong {
  color: #475569;
}

.detail-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 16px;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* ===== Detail Meta (weight, gsm) ===== */
.detail-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.detail-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

/* ===== Price Table ===== */
.price-table-wrap {
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 280px;
}
.price-table th {
  background: #f1f5f9;
  padding: 8px 10px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
}
.price-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.price-table .price-cell {
  font-weight: 700;
  color: #16a34a;
}

/* Color swatches (detail) */
.color-swatches {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.color-swatch {
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.color-name {
  font-size: 13px;
  color: #475569;
}

/* Size badges */
.size-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.size-badge {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 8px;
  min-width: 44px;
  text-align: center;
}

/* ===== Size Chart Button ===== */
.size-chart-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  margin-bottom: 16px;
}
.size-chart-toggle:active { background: #e2e8f0; }

/* ===== Size Chart Popup ===== */
.sc-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: flex-end;
  justify-content: center;
}
.sc-popup-overlay.active {
  display: flex;
}
.sc-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #1e293b;
  color: #fff;
  border-radius: 16px 16px 0 0;
}
.sc-popup-title {
  font-size: 16px;
  font-weight: 700;
}
.sc-popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.sc-popup-body {
  background: #fff;
  padding: 16px;
  border-radius: 0 0 16px 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.sc-chart-name {
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  color: #1e293b;
}
.sc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: center;
}
.sc-table th {
  background: #1e293b;
  color: #fff;
  padding: 8px 10px;
  font-weight: 600;
  white-space: nowrap;
}
.sc-table td {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}
.sc-table .sc-label {
  font-weight: 700;
  text-align: left;
  background: #f8fafc;
  color: #334155;
}
.sc-table tbody tr:nth-child(even) td:not(.sc-label) {
  background: #f8fafc;
}
.sc-note {
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 12px;
}

/* ===== Action Buttons ===== */
.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 6px;
}

/* Order Now button */
.order-now-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.order-now-btn:active { background: #1d4ed8; }
.order-now-btn svg { width: 20px; height: 20px; }

/* Share Product */
.share-product-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.share-product-btn:active { background: #e2e8f0; }
.share-product-btn svg { width: 20px; height: 20px; }

/* Toast */
.toast-msg {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* WhatsApp Enquiry */
.whatsapp-enquiry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.whatsapp-enquiry-btn:active { background: #1da851; }
.whatsapp-enquiry-btn svg { width: 22px; height: 22px; }

/* ===== Suggestions ===== */
.modal-suggestions { padding: 0 16px 20px; }

.suggestions-heading {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin: 16px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.suggestion-scroll-wrapper {
  position: relative;
}

.suggestion-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.suggestion-scroll::-webkit-scrollbar { display: none; }

/* Desktop-only scroll arrows */
.suggestion-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-size: 22px;
  line-height: 1;
  color: #334155;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s;
}
.suggestion-arrow:hover {
  background: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}
.suggestion-arrow-left { left: -6px; }
.suggestion-arrow-right { right: -6px; }

.suggestion-card {
  min-width: 120px;
  max-width: 120px;
  scroll-snap-align: start;
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
  cursor: pointer;
}
.suggestion-card:active { transform: scale(0.96); }

.suggestion-card-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}
.suggestion-card-image img { width: 100%; height: 100%; object-fit: cover; }

.suggestion-card-body { padding: 6px 8px 8px; }
.suggestion-card-name {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.suggestion-card-rate {
  font-size: 13px;
  font-weight: 800;
  color: #16a34a;
  margin-bottom: 3px;
}

/* ===== WhatsApp FAB ===== */
.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  z-index: 200;
  border: none;
  cursor: pointer;
}
.whatsapp-fab:active { transform: scale(0.92); }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 20px 16px;
  color: #94a3b8;
  font-size: 12px;
  margin-top: 16px;
}
.site-footer a { color: #2563eb; font-weight: 600; }

/* ===== Tablet ===== */
@media (min-width: 768px) {
  .main-content { padding: 0 16px 16px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .modal-container { border-radius: 16px; margin-bottom: 20px; max-height: 85vh; }
  .modal-overlay { align-items: center; }
  .suggestion-card { min-width: 140px; max-width: 140px; }
  .category-tabs { padding: 14px 16px; }
  .suggestion-arrow { display: flex; }
}

/* ===== Desktop ===== */
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .product-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
}
