:root {
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --hero-blue: #4ec5e8;
  --accent-red: #e31e24;
  --accent-green: #16a34a;
  --text: #333333;
  --text-muted: #777777;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --footer: #1a1a1a;
  --radius: 6px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding-bottom: 72px;
}

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

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

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

.container {
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top bar */
.topbar {
  background: var(--purple);
  color: #fff;
  font-size: 0.85rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

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

.topbar__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  color: #fff;
  font-size: 0.75rem;
}

.topbar__msg {
  margin: 0;
  text-align: center;
  flex: 1;
}

.topbar__links a {
  color: #fff;
  text-decoration: underline;
}

/* Header */
.header-main {
  background: var(--purple);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-main__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.header-main__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: #fff;
}

.brand__mark {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
}

.brand__wordmark {
  font-size: clamp(1rem, 2.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

.brand__accent {
  color: var(--hero-blue);
}

.nav-desktop {
  width: 100%;
  display: flex;
  justify-content: center;
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav__link {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  opacity: 0.9;
}

.nav__link.is-active,
.nav__link:hover {
  color: #fff;
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-tools {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.tool-link {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.pill {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-red);
  color: #fff;
  font-size: 0.75rem;
  margin-left: 4px;
}

.pill--sm {
  min-width: 18px;
  height: 18px;
  font-size: 0.65rem;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 0.25rem;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
}

.mobile-nav {
  background: var(--purple-dark);
  padding: 0.5rem 1rem 1rem;
}

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

.mobile-nav a {
  display: block;
  padding: 0.5rem 0;
  color: #fff;
}

.search-panel {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.search-panel__inner {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.search-panel input {
  flex: 1;
  border: 1px solid #ddd;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.mobile-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #eee;
  display: none;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}

.mobile-bottom-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.5rem;
  font-size: 0.7rem;
  color: var(--text);
  position: relative;
}

.mb-icon {
  font-size: 1.1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  font-size: 0.8rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--purple);
  color: #fff;
}

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

.btn--red {
  background: var(--accent-red);
  color: #fff;
}

.btn--red:hover {
  color: #fff;
  filter: brightness(1.05);
}

.btn--ghost {
  background: transparent;
  border: 1px solid #ccc;
  color: var(--text);
  border-radius: var(--radius);
  text-transform: none;
  letter-spacing: 0;
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
}

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

.btn--added {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
}

/* Hero */
.hero {
  background: var(--hero-blue);
  position: relative;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 420px;
  padding: 2.5rem 0;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--purple-dark);
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--purple-dark);
}

.hero__title span {
  color: var(--accent-red);
}

.hero__text {
  max-width: 52ch;
  margin: 0 0 1.25rem;
}

.hero__media img {
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section--soft {
  background: var(--bg-soft);
}

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

.section__head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section__head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 60ch;
  margin-inline: auto;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.cat-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

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

.cat-card img {
  border-radius: 8px;
  margin-bottom: 0.75rem;
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

.cat-card h3 {
  margin: 0;
  font-size: 0.95rem;
}

.cat-card span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Promo grid */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1rem;
}

.promo-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 220px;
  background: #ddd;
}

.promo-card--tall {
  grid-row: span 2;
  min-height: 100%;
}

.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

.promo-card__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  color: #fff;
}

.promo-card__body h3 {
  margin: 0 0 0.35rem;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.product-card {
  position: relative;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: box-shadow 0.2s;
}

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

.product-card__img img {
  margin-inline: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.product-card__title {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.35rem;
  line-height: 1.35;
}

.product-card__price .price-sale {
  color: var(--accent-red);
  font-weight: 700;
}

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

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  color: #fff;
}

.badge--sale {
  background: var(--accent-red);
}

.badge--new {
  background: var(--accent-green);
}

.product-card__actions {
  margin-top: 0.5rem;
}

/* Spotlight */
.spotlight {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.spotlight__gallery {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.thumbs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
}

.thumbs img.is-active {
  border-color: var(--purple);
}

.spotlight__main img {
  border-radius: 12px;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.stars {
  color: #f59e0b;
  letter-spacing: 2px;
}

/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0;
  cursor: pointer;
  font-weight: 700;
  color: var(--text-muted);
}

.tab-btn.is-active {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.blog-card img {
  aspect-ratio: 16/10;
  object-fit: cover;
  width: 100%;
}

.blog-card__body {
  padding: 1rem 1.1rem 1.25rem;
}

.blog-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.read-more {
  color: var(--accent-red);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Brands */
.brand-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 1.5rem;
  opacity: 0.55;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
}

/* Newsletter duo */
.news-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.panel-box {
  background: rgba(255, 255, 255, 0.92);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #eee;
}

.newsletter-hero {
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.92)),
    url("../assets/images/newsletter-bg.jpg")
      center/cover;
}

/* Forms */
.form-field {
  margin-bottom: 1rem;
}

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

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  border: 1px solid #d6d6d6;
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  font: inherit;
}

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

.form-field--checkbox {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  column-gap: 0.65rem;
  align-items: start;
}

.form-field--checkbox input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--purple);
}

.form-field--checkbox label {
  margin: 0;
  font-weight: 500;
}

.form-field--checkbox .field-error {
  grid-column: 1 / -1;
}

.field-error {
  display: block;
  color: var(--accent-red);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  min-height: 1.1em;
}

.is-invalid {
  border-color: var(--accent-red) !important;
}

.form-success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 1rem;
  border-radius: var(--radius);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #d1d5db;
  margin-top: 3rem;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 1.5rem;
}

.footer-col h3 {
  color: #fff;
  margin-top: 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

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

.footer-social a {
  color: #fff;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
}

.insta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

.insta-grid img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
}

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.pay-icons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Inner pages */
.page-hero {
  background: var(--bg-soft);
  padding: 2.5rem 0;
  border-bottom: 1px solid #eee;
}

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

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

.prose {
  max-width: 78ch;
}

.prose h2 {
  margin-top: 2rem;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

.cart-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.cart-summary {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.25rem;
  position: sticky;
  top: 96px;
}

.checkout-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  padding: 1rem;
  border-radius: var(--radius);
}

.checkout-success h4 {
  margin: 0 0 0.35rem;
  color: #166534;
}

.link-btn {
  background: none;
  border: 0;
  color: var(--accent-red);
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  border: 1px solid #ddd;
  background: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
}

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

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

@media (max-width: 768px) {
  body {
    padding-bottom: 64px;
  }
  .topbar__msg,
  .topbar__links {
    display: none;
  }
  .burger {
    display: flex;
  }
  .header-main__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .burger {
    justify-self: start;
  }
  .header-main__center {
    grid-column: 2;
    flex: initial;
  }
  .header-tools {
    justify-self: end;
  }
  .nav-desktop {
    display: none;
  }
  .mobile-bottom-bar {
    display: grid;
  }
  .hero__inner,
  .spotlight,
  .news-duo,
  .promo-grid,
  .cart-layout,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .promo-card--tall {
    grid-row: auto;
  }
  .product-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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