@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  --bg-soft: #f6f8ff;
  --bg-warm: #fff8ec;
  --ink-900: #13233b;
  --ink-700: #354a6a;
  --accent: #ffb300;
  --header-dark: #131921;
  --header-mid: #232f3e;
  --header-highlight: #febd69;
  --header-focus: #ff9900;
  --card-shadow: 0 12px 30px rgba(16, 42, 67, 0.12);
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--ink-900);
  background: radial-gradient(circle at top right, #fff3cf 0%, #fff3cf 14%, transparent 44%),
    linear-gradient(165deg, #f6f8ff 0%, #fff7ea 100%);
  min-height: 100vh;
}

button, input, select {
  font: inherit;
}

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

.container {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-header-inner {
  background: #f7f7f7;
  border-bottom: 1px solid rgba(19, 35, 59, 0.08);
  box-shadow: inset 0 -1px 0 rgba(17, 24, 39, 0.06);
}

.top-navigation {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.header-brand {
  border: 0;
  background: transparent;
  color: #111827;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  cursor: pointer;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
}

.header-brand-main {
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1;
}

.header-brand-sub {
  font-size: 0.76rem;
  color: #4b5563;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-controls {
  width: 100%;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.header-search {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 52px;
  width: min(760px, 100%);
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.header-search-scope,
.header-search-input,
.header-search-button {
  border: 0;
  background: transparent;
}

.header-search-scope {
  padding: 0.8rem 0.75rem;
  border-right: 1px solid rgba(17, 24, 39, 0.08);
  color: #1f2937;
  font-weight: 600;
  background: #f8fafc;
}

.header-search-input {
  width: 100%;
  padding: 0.85rem 1rem;
  color: #111827;
  outline: none;
}

.header-search-input::placeholder {
  color: #64748b;
}

.header-search-button {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffd24a, #f7b635);
  color: #111827;
  cursor: pointer;
}

.header-search-button svg {
  width: 18px;
  height: 18px;
}

.header-right-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.header-account {
  justify-self: end;
}

.header-info-menu {
  position: relative;
}

.header-info-button {
  border: 1px solid rgba(17, 24, 39, 0.15);
  background: transparent;
  color: #111827;
  border-radius: 3px;
  padding: 0.45rem 0.6rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.header-info-caret {
  font-size: 0.7rem;
}

.header-info-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(16, 42, 67, 0.18);
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  z-index: 60;
}

.header-info-dropdown[hidden] {
  display: none;
}

.header-info-link {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #111827;
  cursor: pointer;
}

.header-info-link:hover {
  background: #f6f8ff;
}

.header-account-button {
  border: 1px solid transparent;
  background: transparent;
  color: #111827;
  border-radius: 3px;
  padding: 0.35rem 0.5rem;
  min-height: 40px;
  display: inline-grid;
  grid-template-columns: 18px auto;
  column-gap: 0.4rem;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.header-account-button svg {
  grid-row: 1 / span 2;
  font-size: 1rem;
}

.header-account-line-one {
  display: block;
  font-size: 0.72rem;
  line-height: 1.1;
  color: #475569;
}

.header-account-line-two {
  display: block;
  font-size: 0.83rem;
  line-height: 1.1;
  font-weight: 700;
  color: #111827;
}

.header-subnav-wrap {
  background: linear-gradient(180deg, #131921, #1a2334);
}

.secondary-navigation {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  padding: 0.55rem 0;
}

.secondary-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid transparent;
  color: #dfe8f6;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-nav-item.active,
.secondary-nav-item:hover,
.secondary-nav-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  outline: none;
}

.main-content {
  padding: 1.5rem 0 2.5rem;
}

.affiliate-disclosure-banner {
  background: linear-gradient(90deg, #fff3cd, #fff8e1);
  border: 1px solid #f5d98f;
  color: #6b4a00;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.product-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: box-shadow 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.product-image-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-bottom: 1px solid #e9ecef;
  aspect-ratio: 1 / 1;
  height: 245px;
  padding: 0.9rem 1rem;
  overflow: hidden;
}

.product-image-wrap img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 85%;
  max-height: 88%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem 0.95rem 0.85rem;
  flex: 1;
}

.product-brand {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
  font-weight: 700;
  color: #666;
  margin-bottom: 0.1rem;
}

.product-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 2.8em;
  overflow: hidden;
  color: #111827;
  font-weight: 500;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #f59e0b;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.stars {
  display: inline-flex;
  gap: 0.1rem;
}

.stars svg {
  width: 0.9rem;
  height: 0.9rem;
}

.price-row {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.price-now {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.price-mrp {
  text-decoration: line-through;
  color: #888;
  font-size: 0.75rem;
  margin-left: 0.2rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.badge-danger {
  background: rgba(220, 53, 69, 0.1);
  color: var(--danger);
}

.badge-spark {
  background: rgba(25, 135, 84, 0.1);
  color: var(--success);
}

.commission-note {
  color: #0d6efd;
  font-size: 0.78rem;
  font-weight: 700;
}

.availability {
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 700;
}

.prime-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  font-weight: 700;
  width: fit-content;
}

.product-button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd966, #ffb81c);
  color: #111827;
  padding: 0.75rem 0.95rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0.25rem;
}

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.alert-info { background: rgba(13, 110, 253, 0.08); color: #0d6efd; }
.alert-danger { background: rgba(220, 53, 69, 0.08); color: #b02a37; }
.alert-warning { background: rgba(255, 193, 7, 0.12); color: #8a5c00; }

.loading-spinner {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(17, 24, 39, 0.15);
  border-top-color: var(--success);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.legal-page-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(19, 35, 59, 0.08);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 2rem;
}

.legal-page-eyebrow {
  margin: 0 0 0.35rem;
  color: #d26b00;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-page-content {
  color: var(--ink-700);
  line-height: 1.72;
}

.legal-page-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--ink-900);
  font-size: 1.04rem;
  font-weight: 800;
}

.contact-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.contact-card {
  border: 1px solid rgba(19, 35, 59, 0.08);
  background: #f9fafb;
  border-radius: 12px;
  padding: 1rem;
}

.contact-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a5e7d;
}

.site-footer {
  border-top: 1px solid rgba(19, 35, 59, 0.08);
  background: rgba(19, 35, 59, 0.97);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3rem;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 0 1.75rem;
}

.site-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

.footer-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.auth-modal {
  background: white;
  border-radius: 18px;
  width: min(460px, 100%);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  padding: 1.3rem;
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 1rem;
}

.auth-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.close-button {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: #475569;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-form input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.18);
}

.auth-form button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd76a, #ffb300);
  color: #111827;
  padding: 0.8rem 1rem;
  font-weight: 800;
  cursor: pointer;
}

.auth-switch {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.92rem;
  color: #475569;
}

.auth-switch button {
  border: 0;
  background: transparent;
  color: #0d6efd;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-navigation {
    grid-template-columns: 1fr;
    padding: 0.7rem 0;
  }

  .header-account,
  .header-right-actions {
    justify-self: start;
  }

  .header-controls {
    justify-content: stretch;
  }
}

@media (max-width: 620px) {
  .header-search {
    grid-template-columns: 1fr;
  }

  .header-search-scope { border-right: 0; border-bottom: 1px solid rgba(17, 24, 39, 0.08); }
  .product-grid { grid-template-columns: 1fr; }
  .secondary-navigation { overflow-x: auto; flex-wrap: nowrap; }
}
