@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #ef4444;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --footer-bg: #eef4ff;
  --shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  --radius: 10px;
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
}

.btn-light {
  background: #fff;
  color: var(--primary);
}

.text-muted {
  color: var(--text-muted);
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.top-bar {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.top-bar a {
  color: var(--primary);
  font-weight: 500;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--primary);
}

.logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
}

.search-form {
  display: flex;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.search-form input {
  flex: 1;
  border: none;
  padding: 0.85rem 1.1rem;
  font-family: inherit;
  outline: none;
}

.search-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0 1.25rem;
  cursor: pointer;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  background: #fff;
}

.icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.main-nav {
  background: var(--primary);
}

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.main-nav a {
  color: #fff;
  padding: 0.9rem 1.1rem;
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-toggle {
  display: none;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

.hero {
  background: linear-gradient(120deg, #1e3a8a 0%, #2563eb 55%, #60a5fa 100%);
  color: #fff;
  padding: 3rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 0 1.5rem;
  max-width: 520px;
  opacity: 0.95;
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.promo-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.promo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  background: var(--bg-soft);
}

.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.55));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

.promo-stack {
  display: grid;
  gap: 1rem;
}

.product-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tab-btn {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.product-card .thumb {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-soft);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-body h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
}

.badge.new {
  background: #111827;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
}

.card-actions .btn {
  flex: 1;
  padding: 0.65rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

.banner-mid {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 280px;
}

.banner-mid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-mid .content {
  padding: 2rem;
}

.deal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
}

.deal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.countdown {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.countdown span {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  min-width: 64px;
  text-align: center;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.testimonial {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.quote-icon {
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.brands-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.brand-pill {
  border: 1px dashed var(--border);
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--text-muted);
  background: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.blog-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card .content {
  padding: 1rem 1rem 1rem 0;
}

.page-hero {
  background: linear-gradient(120deg, #1e3a8a, #2563eb);
  color: #fff;
  padding: 3rem 0;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
}

.breadcrumb {
  font-size: 0.9rem;
  opacity: 0.9;
}

.content-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.prose h2,
.prose h3 {
  margin-top: 2rem;
}

.prose p,
.prose li {
  color: #374151;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form-row label {
  font-weight: 600;
  font-size: 0.92rem;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row.has-error input,
.form-row.has-error textarea,
.form-row.has-error select {
  border-color: var(--accent);
}

.error-text {
  color: var(--accent);
  font-size: 0.82rem;
  min-height: 1.1rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.checkbox-row label {
  font-weight: 400;
  line-height: 1.45;
}

.form-success {
  display: none;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
}

.form-success.show {
  display: block;
}

.site-footer {
  background: var(--footer-bg);
  margin-top: 3rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.78rem;
}

.footer-col h4 {
  margin: 0 0 1rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-newsletter {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.footer-newsletter input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pay-icons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pay-icons span {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-control button {
  border: none;
  background: var(--bg-soft);
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.qty-control span {
  min-width: 32px;
  text-align: center;
}

.empty-cart {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .hero-grid,
  .promo-grid,
  .banner-mid,
  .deal-grid,
  .product-grid,
  .footer-main,
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-card {
    grid-template-columns: 1fr;
  }

  .blog-card .content {
    padding: 0 1rem 1rem;
  }
}

@media (max-width: 768px) {
  .header-main {
    grid-template-columns: 1fr auto;
  }

  .search-form {
    grid-column: 1 / -1;
    order: 3;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .main-nav ul {
    display: none;
    flex-direction: column;
    padding-bottom: 0.5rem;
  }

  .main-nav.open ul {
    display: flex;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
