/* ========== DEALCART — MATERIAL YOU PREMIUM REDESIGN ========== */
/* Palette: Deep Obsidian + Pastel Sky Blue | 28px radius | Pill buttons | Glassmorphism */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Material You — Obsidian & Sky */
  --obsidian: #0f0f0f;
  --obsidian-light: #1a1a1a;
  --obsidian-elevated: #242424;
  --sky-100: #e0f2fe;
  --sky-200: #bae6fd;
  --sky-300: #a0c4ff;
  --sky-400: #8ecae6;
  --sky-500: #60a5fa;
  --sky-600: #3b82f6;

  /* Surface & Text */
  --bg: #0f0f0f;
  --surface: #161616;
  --surface-elevated: #1e1e1e;
  --card: #1a1a1a;
  --text: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.10);

  /* Accent & Feedback */
  --primary: var(--sky-400);
  --primary-dark: var(--sky-500);
  --accent: var(--sky-300);
  --danger: #ff6b6b;
  --green: #6ee7b7;
  --warning: #fcd34d;

  /* Elevation & Shape */
  --radius: 28px;
  --radius-sm: 20px;
  --radius-xs: 14px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.45);
  --shadow-glow: 0 0 40px rgba(142,202,230,0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Google Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--sky-300); }

img { max-width: 100%; display: block; border-radius: var(--radius-xs); }

/* ===== GLASSMORPHISM HEADER ===== */
.header {
  background: rgba(22, 22, 22, 0.72);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.8px;
  white-space: nowrap;
  text-shadow: 0 0 20px rgba(142,202,230,0.15);
}

.logo span {
  color: var(--sky-300);
  font-weight: 700;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  flex: 1;
  display: flex;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  max-width: 600px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.search-bar:focus-within {
  background: rgba(255,255,255,0.09);
  border-color: var(--sky-400);
  box-shadow: 0 0 0 4px rgba(142,202,230,0.10);
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 20px;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  font-family: inherit;
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar button {
  background: linear-gradient(135deg, var(--sky-400), var(--sky-500));
  border: none;
  padding: 0 24px;
  cursor: pointer;
  font-size: 18px;
  color: var(--obsidian);
  font-weight: 700;
  transition: var(--transition);
}

.search-bar button:hover {
  filter: brightness(1.15);
}

/* ===== HERO BANNER ===== */
.hero {
  background: linear-gradient(160deg, var(--obsidian-light) 0%, #121820 40%, #1a2332 100%);
  padding: 56px 24px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(142,202,230,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 16px;
  opacity: 0.7;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  color: var(--text-secondary);
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-left: 14px;
  border-left: 4px solid var(--sky-400);
  letter-spacing: -0.3px;
}

/* ===== CATEGORY GRID ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  padding: 28px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow), var(--shadow-glow);
  border-color: var(--border-strong);
}

.cat-icon {
  font-size: 44px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.cat-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.2px;
}

.cat-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 600px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow), var(--shadow-glow);
  border-color: rgba(142,202,230,0.15);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-img-wrap img { transform: scale(1.08); }

.discount-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, var(--danger), #ff4757);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255,107,107,0.3);
  z-index: 2;
}

.product-info {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.2px;
}

.stars { color: var(--warning); font-size: 13px; letter-spacing: 1px; }
.rating-count { font-size: 12px; color: var(--text-muted); }

.price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

.mrp {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.off {
  font-size: 13px;
  color: var(--green);
  font-weight: 700;
  background: rgba(110,231,183,0.08);
  padding: 2px 8px;
  border-radius: 999px;
}

.free-del {
  font-size: 12px;
  color: var(--green);
  font-weight: 600;
  margin-top: 2px;
}

/* ===== PILL BUTTONS ===== */
.btn-buy {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-500));
  color: var(--obsidian);
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(142,202,230,0.2);
  letter-spacing: 0.3px;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(142,202,230,0.35);
  filter: brightness(1.1);
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--sky-400), var(--sky-500));
  color: var(--obsidian);
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(142,202,230,0.2);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(142,202,230,0.35);
  filter: brightness(1.1);
}

/* ===== CATEGORY PAGE ===== */
.cat-header {
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  position: sticky;
  top: 72px;
  z-index: 90;
}

.back-btn {
  font-size: 24px;
  cursor: pointer;
  color: var(--sky-400);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  background: rgba(142,202,230,0.08);
}

.back-btn:hover {
  background: rgba(142,202,230,0.15);
  transform: scale(1.05);
}

.cat-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  max-width: 900px;
  margin: 0 auto;
}

.product-main {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.detail-img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  background: linear-gradient(180deg, var(--surface) 0%, var(--card) 100%);
  padding: 32px;
}

.detail-body { padding: 24px; }

.detail-body h1 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.3px;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.rating-pill {
  background: linear-gradient(135deg, var(--green), #34d399);
  color: var(--obsidian);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(110,231,183,0.2);
}

.detail-price {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -1px;
}

.detail-mrp {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-off {
  font-size: 18px;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 20px;
}

.offers-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 20px;
  background: var(--surface);
}

.offers-box h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.offer-item {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 28px;
  position: relative;
  line-height: 1.5;
}

.offer-item::before {
  content: "🏷️";
  position: absolute;
  left: 0;
  font-size: 16px;
  filter: saturate(0.5);
}

.spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.spec-table tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.spec-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.spec-table tr:last-child td { border-bottom: none; }

.spec-table td:first-child {
  font-weight: 600;
  color: var(--text-muted);
  width: 42%;
  background: rgba(255,255,255,0.02);
}

/* ===== STICKY BUY BAR ===== */
.sticky-buy {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 600px;
  width: calc(100% - 48px);
  background: rgba(30, 30, 30, 0.88);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(142,202,230,0.06);
  display: flex;
  gap: 12px;
  z-index: 50;
  border: 1px solid var(--border-strong);
}

.sticky-buy .btn-buy {
  margin: 0;
  flex: 1;
  padding: 14px;
  font-size: 15px;
}

.sticky-buy .btn-primary {
  margin: 0;
  flex: 1;
  padding: 14px;
  font-size: 15px;
}

/* ===== CHECKOUT ===== */
.checkout-wrap {
  max-width: 560px;
  margin: 32px auto;
  padding: 0 24px 120px;
}

.checkout-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.checkout-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--sky-400);
  background: var(--obsidian-elevated);
  box-shadow: 0 0 0 4px rgba(142,202,230,0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group textarea {
  resize: vertical;
  min-height: 90px;
  border-radius: var(--radius-xs);
}

.optional-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.order-summary {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

.order-summary .product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.order-summary .price {
  font-size: 22px;
  color: var(--sky-300);
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* ===== PAYMENT PAGE ===== */
.payment-wrap {
  max-width: 560px;
  margin: 32px auto;
  padding: 0 24px 120px;
}

.payment-option {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.payment-option:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.payment-option.selected {
  border-color: var(--sky-400);
  background: linear-gradient(135deg, rgba(142,202,230,0.06), rgba(142,202,230,0.02));
  box-shadow: var(--shadow), 0 0 20px rgba(142,202,230,0.08);
}

.radio-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.payment-option.selected .radio-circle {
  border-color: var(--sky-400);
  background: rgba(142,202,230,0.1);
}

.radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sky-400);
  display: none;
  box-shadow: 0 0 8px rgba(142,202,230,0.4);
}

.payment-option.selected .radio-dot { display: block; }

.pay-info { flex: 1; }
.pay-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.pay-info p { font-size: 14px; color: var(--text-muted); line-height: 1.4; }
.pay-info .free-tag { color: var(--green); font-weight: 700; font-size: 14px; }
.pay-info .charge-tag { color: var(--danger); font-weight: 700; font-size: 14px; }

.pay-icon { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

.amount-summary {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
}

.amount-row.total {
  border-top: 1px solid var(--border-strong);
  margin-top: 10px;
  padding-top: 14px;
  font-weight: 800;
  font-size: 18px;
}

.amount-row .label { color: var(--text-muted); }
.amount-row .value { font-weight: 600; color: var(--text); }
.amount-row.total .value { color: var(--sky-300); font-size: 22px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--obsidian);
  color: var(--text-muted);
  text-align: center;
  padding: 40px 24px;
  font-size: 14px;
  margin-top: 48px;
  border-top: 1px solid var(--border);
}

.footer strong { color: var(--text-secondary); font-weight: 600; }

/* ===== TRUST BADGES ===== */
.trust-bar {
  background: var(--card);
  padding: 18px 24px;
  display: flex;
  justify-content: space-around;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto 24px;
}

.trust-item {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.trust-item span:first-child {
  font-size: 26px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--obsidian-elevated);
  border-radius: 999px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .hero { padding: 40px 20px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-card { padding: 20px 10px; border-radius: var(--radius-sm); }
  .section { padding: 0 16px; margin: 24px auto; }
  .header { padding: 0 16px; }
  .header-inner { height: 64px; gap: 12px; }
  .logo { font-size: 20px; }
  .search-bar input { padding: 10px 11px; font-size: 14px; }
  .search-bar button { padding: 00 120px; }
  .product-grid { gap: 12px; }
  .product-card { border-radius: var(--radius-sm); }
  .product-info { padding: 12px 14px 16px; }
  .detail-img { padding: 20px; max-height: 280px; }
  .detail-body { padding: 18px; }
  .detail-price { font-size: 26px; }
  .sticky-buy {
    bottom: 16px;
    width: calc(100% - 32px);
    padding: 12px 14px;
    gap: 10px;
  }
  .checkout-wrap, .payment-wrap { padding: 0 16px 100px; }
  .checkout-card, .payment-option, .amount-summary { padding: 20px 16px; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 22px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .btn-buy, .btn-primary { font-size: 13px; padding: 10px 18px; }
}