/* =========================================================
   TechStore - all of the styling
   Simple, clean and modern. One accent colour: indigo.
   ========================================================= */

/* ---------- Colours and basic settings ---------- */
:root {
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --ink: #0f172a;
  --body: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --page: #ffffff;
  --surface: #f8fafc;
  --green: #059669;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lift: 0 4px 8px rgba(15, 23, 42, .06), 0 16px 40px rgba(15, 23, 42, .1);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--body);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

h1 { font-size: 40px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }

p { margin: 0 0 12px; }

a {
  color: inherit;
  text-decoration: none;
}

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

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

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 40px 0;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 36px;
}

.section-head p {
  color: var(--body);
  margin: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  min-height: 44px;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-dark {
  background: var(--ink);
  color: #fff;
}
.btn-dark:hover { background: #1e293b; }

.btn-light {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn-light:hover { border-color: var(--accent); color: var(--accent); }

.btn-whatsapp {
  background: #16a34a;
  color: #fff;
}
.btn-whatsapp:hover { background: #15803d; }

.btn-large {
  padding: 14px 26px;
  font-size: 16px;
  min-height: 50px;
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 10px;
}

.link-button {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
}
.link-button:hover { color: #dc2626; }

/* ---------- Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu a {
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  transition: color .18s ease;
}

.nav-menu a:hover,
.nav-menu a.is-current {
  color: var(--accent);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .18s ease, color .18s ease;
}

.cart-link:hover { border-color: var(--accent); color: var(--accent); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--surface), #fff);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 76px 0;
}

.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 50px;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 18px;
  max-width: 480px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 32px;
  font-size: 14px;
  color: var(--muted);
}

.hero-visual img {
  width: 100%;
  border-radius: 22px;
}

/* ---------- Category cards ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.category-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.category-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.category-card p {
  flex: 1;
  font-size: 15px;
}

.category-card .btn {
  align-self: flex-start;
  margin-top: 8px;
}

/* ---------- About ---------- */
.about {
  background: var(--surface);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
  color: var(--ink);
}

.stat-card span {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Product grid and cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-grid-page {
  grid-template-columns: repeat(3, 1fr);
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease, transform .2s ease;
}

.product-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.product-card-image {
  display: block;
  background: var(--surface);
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.product-card:hover .product-card-image img { transform: scale(1.04); }

.product-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.product-name {
  font-size: 16px;
  margin: 0 0 6px;
}

.product-name a:hover { color: var(--accent); }

.product-short {
  font-size: 14px;
  color: var(--body);
  margin: 0 0 14px;
  flex: 1;
}

.price-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.price-now {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.price-old {
  font-size: 14px;
  color: var(--muted);
  text-decoration: line-through;
}

.badge-off {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: #ecfdf5;
  padding: 3px 9px;
  border-radius: 999px;
}

.price-row-large .price-now { font-size: 30px; }
.price-row-large .price-old { font-size: 17px; }

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-actions .btn {
  padding: 10px 8px;
  font-size: 13.5px;
  white-space: nowrap;
}

/* ---------- Page heading ---------- */
.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
}

.page-head h1 { margin-bottom: 6px; }
.page-head p { margin: 0; }

.breadcrumb {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb a:hover { color: var(--accent); }

/* ---------- Toolbar (search, filters, sort) ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.search-box {
  flex: 1;
  min-width: 240px;
}

input[type="text"],
input[type="tel"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

select { cursor: pointer; min-width: 190px; }

/* In the toolbar the search box and the sort box sit side by side */
.toolbar select { width: auto; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 9px 16px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--body);
  cursor: pointer;
  transition: all .18s ease;
  min-height: 40px;
}

.filter-btn:hover { border-color: var(--accent); color: var(--accent); }

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

#result-count {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Product details ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.product-detail-image {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.product-detail-image img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-detail-info h1 { font-size: 34px; }

.qty-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.qty-control button {
  width: 42px;
  height: 42px;
  border: 0;
  background: #fff;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background .18s ease;
}

.qty-control button:hover { background: var(--accent-soft); color: var(--accent); }

.qty-control input,
.qty-number {
  width: 48px;
  height: 42px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 0;
}

.qty-control input:focus { box-shadow: none; border-color: var(--line); }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

/* ---------- Cart ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto auto;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.cart-item-image {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.cart-item-info h3 a:hover { color: var(--accent); }

.cart-item-price {
  font-size: 14px;
  color: var(--body);
  margin: 4px 0 0;
}

.cart-item-qty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.cart-item-total {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  min-width: 90px;
  text-align: right;
}

/* ---------- Summary card ---------- */
.summary-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 92px;
}

.summary-card h2 {
  font-size: 20px;
  margin-bottom: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 15px;
}

.summary-savings { color: var(--green); }

.summary-total {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.summary-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.summary-item img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface);
}

.summary-item-info p {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.35;
}

/* ---------- Checkout ---------- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.form-card h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.form-card > p { font-size: 14px; }

/* The small line under each checkout heading needs a little breathing room */
.form-card h2 + .muted-note { margin-bottom: 22px; }

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.form-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}

.payment-option:hover { border-color: var(--accent); }

.payment-option input { margin-top: 3px; accent-color: var(--accent); }

.payment-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.payment-option strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.payment-option span {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- UPI box ---------- */
.upi-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
}

.upi-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}

.qr-holder {
  background: #fff;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  line-height: 0;
}

.qr-holder canvas { border-radius: 4px; }

.upi-details { flex: 1; min-width: 200px; }

.upi-details h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.upi-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding: 5px 0;
}

.upi-line strong { color: var(--ink); }

.upi-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 16px 0 0;
}

.success-box {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 18px;
  margin-top: 18px;
}

.success-box h3 {
  color: #065f46;
  font-size: 17px;
}

.success-box p { font-size: 14px; margin-bottom: 12px; }

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  grid-column: 1 / -1;
}

.empty-state h3 { margin-bottom: 6px; }
.empty-state p { margin-bottom: 18px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 90;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 28px;
}

.site-footer h4 {
  color: #fff;
  font-size: 15px;
  margin: 0 0 14px;
}

.site-footer p { font-size: 14px; margin: 0 0 8px; }

.site-footer .logo { color: #fff; margin-bottom: 12px; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* =========================================================
   RESPONSIVE - tablet
   ========================================================= */
@media (max-width: 980px) {
  h1 { font-size: 34px; }
  .hero h1 { font-size: 38px; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 52px 0;
  }

  .product-grid,
  .product-grid-page { grid-template-columns: repeat(2, 1fr); }

  .category-grid { grid-template-columns: 1fr; }

  .about-inner { grid-template-columns: 1fr; gap: 28px; }

  .product-detail { grid-template-columns: 1fr; gap: 32px; }

  .cart-layout,
  .checkout-layout { grid-template-columns: 1fr; }

  .summary-card { position: static; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   RESPONSIVE - mobile
   ========================================================= */
@media (max-width: 700px) {
  .section { padding: 48px 0; }

  .nav-toggle { display: block; }

  .nav {
    height: 64px;
    flex-wrap: wrap;
  }

  .nav-menu {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: 1px solid var(--line);
    padding: 6px 0 12px;
  }

  .nav-menu.is-open { display: flex; }

  .nav-menu a {
    width: 100%;
    padding: 13px 2px;
    font-size: 16px;
  }

  .hero h1 { font-size: 31px; }
  .hero-sub { font-size: 16px; }
  .hero-actions .btn { flex: 1; }

  .product-grid,
  .product-grid-page {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card-actions { grid-template-columns: 1fr; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar select { width: 100%; }

  .cart-item {
    grid-template-columns: 72px 1fr;
    gap: 14px;
  }

  .cart-item-image { width: 72px; height: 72px; }

  .cart-item-qty {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    grid-column: 1 / -1;
  }

  .cart-item-total {
    grid-column: 2 / -1;
    text-align: left;
    margin-top: -6px;
  }

  .payment-options { grid-template-columns: 1fr; }

  .upi-top { flex-direction: column; align-items: stretch; }
  .qr-holder { display: flex; justify-content: center; }

  .detail-actions .btn { flex: 1; }

  .form-card,
  .summary-card { padding: 20px; }

  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
}
