:root {
  --orange: #ff9900;
  --orange-dark: #e68600;
  --blue: #38b6e8;
  --blue-dark: #1e9ad6;
  --blue-light: #e8f7fc;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-soft: #fff8f0;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: min(1240px, 92%);
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background: var(--blue-light);
  font-size: 0.85rem;
  border-bottom: 1px solid #d4eef8;
}

.top-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.top-bar__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.top-bar__links a:hover {
  color: var(--orange);
}

/* Main header */
.main-header {
  padding: 1rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.main-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.logo img,
.logo svg {
  height: 44px;
  width: auto;
}

.search-block {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.search-block select {
  border: none;
  border-right: 2px solid var(--border);
  padding: 0.65rem 0.75rem;
  background: #f9fafb;
  font-size: 0.9rem;
  max-width: 140px;
}

.search-block input {
  flex: 1;
  border: none;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  min-width: 0;
}

.search-block button {
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 0 1.25rem;
  cursor: pointer;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-actions a,
.cart-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  gap: 0.15rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

.header-actions .icon {
  font-size: 1.35rem;
}

.cart-total {
  color: var(--orange);
  font-weight: 700;
}

/* Nav bar */
.nav-bar {
  background: var(--orange);
}

.nav-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  font-weight: 600;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.08);
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.nav-menu a {
  color: var(--white);
  padding: 0.85rem 1rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255, 255, 255, 0.15);
}

.nav-special {
  background: var(--text);
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.35rem 0;
}

.nav-special:hover {
  background: #2d2d44;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  color: white;
  padding: 0.5rem 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  min-height: 380px;
  background: var(--bg-soft);
}

.hero__content {
  padding: 3rem 4%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__tag {
  color: var(--orange);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0.5rem 0 1rem;
  line-height: 1.15;
}

.hero p {
  color: var(--text-muted);
  max-width: 420px;
}

.hero__image {
  position: relative;
  min-height: 280px;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Brands strip */
.brands-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  overflow: hidden;
}

.brands-track {
  display: flex;
  gap: 3rem;
  animation: scroll-brands 35s linear infinite;
  width: max-content;
}

.brands-track span {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 1.1rem;
  white-space: nowrap;
}

@keyframes scroll-brands {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Section defaults */
.section {
  padding: 3rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
}

.section-title p {
  color: var(--text-muted);
  margin: 0;
}

/* Circular categories */
.cat-circles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.cat-circle {
  text-align: center;
  width: 110px;
}

.cat-circle__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: var(--blue-light);
  border: 3px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.2s, border-color 0.2s;
}

.cat-circle:hover .cat-circle__icon {
  transform: scale(1.05);
  border-color: var(--orange);
}

.cat-circle span {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Deal countdown */
.deal-section {
  background: var(--bg-soft);
}

.deal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.countdown {
  display: flex;
  gap: 0.5rem;
}

.countdown__box {
  background: var(--orange);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  text-align: center;
  min-width: 58px;
}

.countdown__box strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.2;
}

.countdown__box small {
  font-size: 0.65rem;
  text-transform: uppercase;
}

/* Product card */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow);
}

.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--orange);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 1;
}

.product-card__img {
  aspect-ratio: 1;
  overflow: hidden;
  background: #f9fafb;
}

.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__body {
  padding: 1rem;
}

.stars {
  color: var(--orange);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.product-card h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  line-height: 1.35;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.price .current {
  color: var(--orange);
  font-weight: 700;
  font-size: 1.1rem;
}

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

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  text-align: center;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--orange-dark);
}

.btn--outline {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
}

.btn--blue {
  background: var(--blue);
}

.btn--blue:hover {
  background: var(--blue-dark);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
}

/* Promo banners */
.promo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.promo-card {
  border-radius: var(--radius);
  padding: 1.75rem;
  color: var(--white);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo-card:nth-child(1) {
  background: linear-gradient(135deg, var(--orange), #ff6b00);
}

.promo-card:nth-child(2) {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
}

.promo-card:nth-child(3) {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.promo-card h3 {
  margin: 0 0 0.5rem;
}

/* Category tabs section */
.cat-tabs-section {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.cat-sidebar a {
  display: block;
  padding: 0.65rem 1rem;
  border-left: 3px solid transparent;
  color: var(--text-muted);
  font-weight: 500;
}

.cat-sidebar a:hover,
.cat-sidebar a.active {
  color: var(--orange);
  border-left-color: var(--orange);
  background: var(--bg-soft);
}

/* Feature bar */
.feature-bar {
  background: #f3f4f6;
  padding: 1.5rem 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  text-align: center;
}

.feature-item .icon {
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.feature-item h4 {
  margin: 0;
  font-size: 0.95rem;
}

.feature-item p {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Newsletter */
.newsletter {
  background: var(--blue);
  color: var(--white);
  padding: 2.5rem 0;
}

.newsletter__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.newsletter h2 {
  margin: 0 0 0.35rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  max-width: 480px;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  min-width: 0;
}

/* Footer */
.site-footer {
  background: #f9fafb;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2rem;
  padding: 3rem 0 2rem;
}

.footer-grid h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid li {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid a:hover {
  color: var(--orange);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.payment-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.payment-icons span {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-bottom__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom__cats a {
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}

.footer-legal a {
  color: var(--orange);
  font-weight: 500;
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: var(--white);
  z-index: 201;
  transform: translateX(100%);
  transition: 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer__head {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

.cart-item__info {
  flex: 1;
  font-size: 0.9rem;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.cart-item__qty button {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  border-radius: 4px;
}

.cart-drawer__foot {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--blue-light), var(--bg-soft));
  padding: 2.5rem 0;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* Content pages */
.content-page {
  padding: 2.5rem 0 4rem;
}

.content-page .prose {
  max-width: 800px;
  margin: 0 auto;
}

.content-page .prose-wide {
  max-width: 1000px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 2rem;
  color: var(--text);
}

.prose h3 {
  margin-top: 1.5rem;
}

.prose p,
.prose li {
  color: #374151;
}

.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

/* Forms */
.form-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: #dc2626;
}

.field-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error .field-error {
  display: block;
}

.form-group.checkbox-field {
  margin-bottom: 1.25rem;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  align-items: start;
}

.checkbox-group input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  margin: 0.2rem 0 0;
  padding: 0;
  accent-color: var(--orange);
  cursor: pointer;
  align-self: start;
}

.checkbox-group label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-field > .field-error {
  display: none;
  margin-top: 0.35rem;
  padding-left: calc(1.25rem + 0.75rem);
}

.checkbox-field.has-error > .field-error {
  display: block;
}

.form-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: none;
}

.form-success.visible {
  display: block;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.blog-card:hover {
  box-shadow: var(--shadow);
}

.blog-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card__body {
  padding: 1.25rem;
}

.blog-card__date {
  font-size: 0.8rem;
  color: var(--orange);
  font-weight: 600;
}

/* Shop filters */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

.filter-panel {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.filter-panel h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.filter-panel label {
  display: grid;
  grid-template-columns: 1.125rem minmax(0, 1fr);
  column-gap: 0.5rem;
  align-items: start;
  margin-bottom: 0.65rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.filter-panel input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  margin: 0.15rem 0 0;
  padding: 0;
  accent-color: var(--orange);
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background: var(--blue-light);
  border-radius: var(--radius);
}

.stat-box strong {
  display: block;
  font-size: 1.75rem;
  color: var(--orange);
}

/* Responsive */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .cat-tabs-section,
  .shop-layout {
    grid-template-columns: 1fr;
  }

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

  .hero__image {
    min-height: 240px;
    order: -1;
  }
}

@media (max-width: 768px) {
  .main-header__inner {
    grid-template-columns: 1fr auto;
  }

  .search-block {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 0.5rem;
  }

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

  .promo-row {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }
}