:root {
  --primary: #fdc040;
  --secondary: #233a95;
  --accent: #3bb77e;
  --bg: #f7f8fd;
  --text: #2b2b2b;
  --muted: #6f7789;
  --white: #ffffff;
  --border: #e5e8f2;
  --shadow: 0 8px 24px rgba(35, 58, 149, 0.08);
  --radius: 14px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 4rem 0;
}

.section-title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  margin: 0 0 1.2rem;
}

.section-subtitle {
  color: var(--muted);
  margin: 0 0 2rem;
}

.btn {
  border: none;
  background: var(--secondary);
  color: var(--white);
  font-weight: 600;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-primary {
  background: var(--primary);
  color: #141414;
}

.btn-accent {
  background: var(--accent);
}

.btn-outline {
  border: 1px solid var(--secondary);
  color: var(--secondary);
  background: transparent;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.chip-discount {
  background: rgba(253, 192, 64, 0.2);
  color: #8f5d00;
}

.chip-new {
  background: rgba(59, 183, 126, 0.17);
  color: #146644;
}

.top-bar {
  background: var(--secondary);
  color: var(--white);
  font-size: 0.92rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}

.top-bar .highlight {
  color: var(--primary);
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 16px rgba(21, 38, 106, 0.08);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.logo-badge {
  width: 42px;
  height: 42px;
}

.logo-text {
  font-family: "Poppins", sans-serif;
  line-height: 1.1;
}

.logo-title {
  font-weight: 700;
  color: var(--secondary);
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.2px;
}

.search-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.78rem 1rem 0.78rem 2.5rem;
  font-size: 0.95rem;
  background: #fbfcff;
}

.search-wrap i {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  transform: translateY(-50%);
  color: #8c94ad;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: #fff;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -4px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  padding: 0 4px;
}

.main-nav {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.3rem;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-weight: 600;
}

.menu a {
  padding: 0.95rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.menu a.active,
.menu a:hover {
  color: var(--secondary);
}

.mega-wrap {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  width: min(920px, calc(100vw - 2rem));
  background: #fff;
  border-radius: 0 0 16px 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mega-wrap:hover .mega-menu {
  display: grid;
}

.mega-col h4 {
  margin: 0 0 0.5rem;
  font-family: "Poppins", sans-serif;
  color: var(--secondary);
}

.mega-col li {
  margin-bottom: 0.45rem;
  color: #4c5266;
}

.hero {
  padding: 1.4rem 0 0;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 420px;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 32, 87, 0.68), rgba(16, 32, 87, 0.25));
  display: flex;
  align-items: center;
}

.hero-content {
  width: min(680px, 100% - 2rem);
  margin-left: clamp(1rem, 3vw, 3rem);
  color: #fff;
}

.hero-content h1 {
  margin: 0 0 0.75rem;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.7rem, 1rem + 2vw, 3rem);
  line-height: 1.2;
}

.hero-content p {
  margin: 0 0 1.2rem;
  opacity: 0.95;
}

.hero-dots {
  position: absolute;
  display: flex;
  gap: 0.5rem;
  left: 2rem;
  bottom: 1rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.6);
}

.hero-dot.active {
  background: var(--primary);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  background: #fff;
  border-radius: 18px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.8rem;
}

.category-card h3 {
  margin: 0;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
}

.products-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
}

.product-media {
  position: relative;
}

.product-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-badges {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  display: flex;
  gap: 0.45rem;
}

.product-info {
  padding: 1rem;
}

.product-name {
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.price-current {
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.1rem;
}

.price-old {
  color: #a2a8bc;
  text-decoration: line-through;
  font-size: 0.9rem;
}

.rating {
  color: #f4a300;
  font-size: 0.88rem;
}

.deals-wrap {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.deal-banner img {
  border-radius: 14px;
  height: 100%;
  object-fit: cover;
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.count-box {
  background: #f1f4fb;
  min-width: 76px;
  border-radius: 12px;
  text-align: center;
  padding: 0.65rem 0.5rem;
}

.count-box strong {
  font-size: 1.2rem;
  color: var(--secondary);
  display: block;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.promo-card {
  border-radius: 18px;
  overflow: hidden;
  min-height: 220px;
  position: relative;
}

.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-overlay {
  position: absolute;
  inset: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: linear-gradient(180deg, rgba(18, 24, 40, 0.08), rgba(18, 24, 40, 0.6));
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.testimonial-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1rem;
}

.testimonial-user img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.newsletter {
  background: linear-gradient(135deg, #1f3589, #2f4fb4);
  border-radius: 20px;
  color: #fff;
  padding: 2.2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1rem;
  align-items: center;
}

.newsletter-form {
  display: flex;
  gap: 0.7rem;
}

.newsletter-form input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
}

.site-footer {
  margin-top: 4rem;
  background: #111a42;
  color: #e8ebf5;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1.4rem;
  padding: 3rem 0 2rem;
}

.footer-title {
  font-family: "Poppins", sans-serif;
  margin: 0 0 0.8rem;
  color: #fff;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.social-icons {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.6rem;
}

.social-icons a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1rem 0;
  color: #c4cbdf;
  font-size: 0.9rem;
}

.page-banner {
  background: linear-gradient(90deg, rgba(35, 58, 149, 0.86), rgba(35, 58, 149, 0.58)),
    url("https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1800&q=80")
      center/cover;
  color: #fff;
  padding: 3rem 0;
}

.page-banner h1 {
  margin: 0;
  font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.6rem);
  font-family: "Poppins", sans-serif;
}

.breadcrumbs {
  margin-top: 0.35rem;
  font-size: 0.92rem;
}

.shop-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.2rem;
  margin-top: 2rem;
}

.filter-card {
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.filter-card h3 {
  margin: 0 0 0.7rem;
  font-family: "Poppins", sans-serif;
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.shop-toolbar {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

select,
input,
textarea {
  font: inherit;
}

.pagination {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pagination button {
  border: 1px solid var(--border);
  background: #fff;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  cursor: pointer;
}

.pagination button.active {
  border-color: var(--secondary);
  background: var(--secondary);
  color: #fff;
}

.product-layout {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1.2fr;
}

.gallery {
  display: grid;
  gap: 0.7rem;
}

.gallery-main {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.thumb-row button {
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: none;
  padding: 0;
}

.thumb-row button.active {
  border-color: var(--secondary);
}

.thumb-row img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.product-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.tabs {
  margin-top: 2rem;
}

.tab-buttons {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.tab-buttons button {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab-buttons button.active {
  background: var(--secondary);
  color: #fff;
}

.tab-content {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-top: 0.9rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.cart-item img {
  width: 70px;
  height: 70px;
  border-radius: 10px;
  object-fit: cover;
}

.qty-control {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.qty-control button {
  width: 30px;
  border: 0;
  background: #f6f8ff;
}

.qty-control input {
  width: 40px;
  border: 0;
  text-align: center;
}

.summary-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.summary-line.total {
  border-top: 1px solid var(--border);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  font-size: 1.12rem;
  font-weight: 700;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1rem;
  margin-top: 2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.8rem;
  background: #fff;
}

.form-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.alert {
  margin-top: 0.8rem;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
  display: none;
}

.alert.error {
  background: #ffe9e9;
  color: #8f2020;
}

.alert.success {
  background: #e5faef;
  color: #1f7a54;
}

.legal-page {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-top: 2rem;
}

.legal-page h2 {
  font-family: "Poppins", sans-serif;
  color: var(--secondary);
  margin-top: 1.8rem;
}

.legal-page h3 {
  font-family: "Poppins", sans-serif;
  color: #2f4178;
}

.muted {
  color: var(--muted);
}

[data-animate] {
  opacity: 0;
  transform: translateY(12px);
  transition: 0.5s ease;
}

[data-animate].show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .testimonial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-layout {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 860px) {
  .header-main {
    grid-template-columns: auto auto;
  }

  .search-wrap {
    grid-column: span 2;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1rem 1rem;
    gap: 0;
    z-index: 30;
  }

  .menu.open {
    display: flex;
  }

  .menu a {
    padding: 0.9rem 0;
    width: 100%;
  }

  .mega-wrap:hover .mega-menu {
    display: none;
  }

  .hero-slider {
    min-height: 360px;
  }

  .deals-wrap,
  .newsletter,
  .shop-layout,
  .product-layout,
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .products-grid,
  .category-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .gallery-main img {
    height: 340px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }
}
