:root {
  --ink: #17202a;
  --muted: #67717f;
  --line: #e7ebf0;
  --surface: #ffffff;
  --soft: #f4f6f8;
  --dark: #10151c;
  --accent: #d71920;
  --accent-dark: #ad1117;
  --gold: #f2b705;
  --green: #14804a;
  --shadow: 0 18px 45px rgba(15, 25, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 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;
}

.topbar {
  color: #dce4ee;
  background: #111821;
  font-size: 13px;
}

.topbar__inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar nav,
.topbar p {
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar a:hover {
  color: var(--gold);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}

.header-main {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand__mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #2c2f36);
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
  overflow: hidden;
}

.brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.search {
  display: flex;
  min-width: 0;
}

.search input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  outline: 0;
}

.search input:focus {
  border-color: var(--accent);
}

.search button,
.button,
.add-cart,
.filter-buttons button,
.category-toggle,
.cart-button,
.menu-button {
  border: 0;
  cursor: pointer;
}

.search button {
  min-width: 86px;
  color: #fff;
  background: var(--accent);
  border-radius: 0 6px 6px 0;
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.account {
  display: grid;
  color: var(--muted);
  font-size: 13px;
}

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

.cart-button {
  position: relative;
  min-width: 124px;
  min-height: 48px;
  display: grid;
  justify-items: start;
  padding: 8px 12px 8px 42px;
  color: var(--ink);
  background: var(--soft);
  border-radius: 6px;
}

.cart-button__count {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.cart-button span:not(.cart-button__count) {
  color: var(--muted);
  font-size: 12px;
}

.cart-button strong {
  font-size: 13px;
}

.menu-button {
  display: none;
  width: 46px;
  height: 46px;
  padding: 12px;
  background: var(--dark);
  border-radius: 6px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fff;
}

.main-nav-wrap {
  color: #fff;
  background: var(--accent);
}

.nav-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
}

.category-toggle {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #fff;
  background: var(--accent-dark);
  text-align: left;
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 15px 18px;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.13);
}

.hero {
  background: linear-gradient(180deg, #f7f8fa, #fff);
  padding: 28px 0 34px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 260px 1fr 230px;
  gap: 20px;
  align-items: stretch;
}

/* Slider styles for homepage */
.slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  width: 140%;
}
.slider-track {
  display: flex;
  transition: transform 420ms cubic-bezier(.2,.9,.2,1);
  will-change: transform;
}
.slide { min-width: 100%; display: block; padding: 0 0 0 0; }
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(16,21,28,0.7);
  color: #fff;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 30;
}
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots { position: absolute; right: 12px; bottom: 12px; display:flex; gap:8px; z-index:30; }
.slider-dots button { width:10px; height:10px; border-radius:50%; border:0; background:rgba(255,255,255,0.6); cursor:pointer; }
.slider-dots button.is-active { background: var(--accent); }

/* Ensure hero-card image covers slide */
.slide .hero-card { min-height: 420px; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .slider-prev, .slider-next { display: none; }
  .slider-dots { left: 50%; transform: translateX(-50%); right: auto; }
}

.category-panel,
.deal-card,
.product-card,
.featured-tile {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.category-panel {
  overflow: hidden;
}

.category-panel__title {
  padding: 14px 16px;
  color: var(--ink);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.category-panel button,
.category-panel a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #354052;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.category-panel button:hover,
.category-panel button.is-active,
.category-panel a:hover,
.category-panel a.is-active {
  color: var(--accent);
  background: #fff5f5;
}

.category-panel button.is-active,
.category-panel a.is-active {
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

.category-panel small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

/* Dropdown / Drawer for categories (header) */
.category-panel-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(15,25,40,0.08);
  z-index: 40;
  padding: 24px 0;
}
.category-panel-dropdown.is-open {
  display: block;
}
.category-panel-dropdown__inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.category-panel-dropdown__left {
  width: 320px;
}
.category-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}
.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 8px;
  color: #2f3b46;
  background: #fff;
  border: 1px solid transparent;
}
.category-list a:hover {
  background: #fff5f5;
  color: var(--accent);
  border-color: rgba(215,25,32,0.08);
}
.category-list a .cat-icon {
  display: inline-grid;
  width: 40px;
  height: 40px;
  min-width: 40px;
  align-items: center;
  justify-items: center;
  margin-right: 12px;
  color: var(--accent);
}
.category-list a svg { width: 22px; height: 22px; }
.category-list a .cat-text { flex: 1 1 auto; font-weight:700; }
.category-list a small { color: var(--muted); font-weight:800; margin-left:12px; }

.category-panel-dropdown__left { background: #fff; padding: 12px; border-radius: 8px; box-shadow: none; }
.category-panel-dropdown__right { background: linear-gradient(180deg, #fff, #fff); border-left: 1px solid var(--line); }
.category-panel-dropdown .category-panel__title { background: var(--accent); color:#fff; padding:12px 16px; border-radius:6px; font-weight:900; margin-bottom:12px; }

/* mobile drawer tweaks */
.mobile-drawer__panel { width: 320px; max-width: 86vw; }
.mobile-drawer .category-panel__title { background: transparent; color: var(--muted); padding: 8px 0; margin-bottom: 8px; }
.mobile-categories .category-list a { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); }
.mobile-nav { padding: 8px 0 16px; }
.mobile-drawer__overlay { background: rgba(0,0,0,0.35); }
.category-panel-dropdown__right {
  flex: 1;
  padding: 12px 24px;
}
.category-panel__close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 80;
}
.mobile-drawer.is-open {
  display: block;
}
.mobile-drawer__panel {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  background: #fff;
  box-shadow: 6px 0 30px rgba(0,0,0,0.12);
  transform: translateX(-16px);
  animation: slideIn 220ms ease forwards;
}
.mobile-drawer__overlay {
  position: absolute;
  inset: 0 0 0 320px;
  background: rgba(0,0,0,0.35);
}
.mobile-drawer__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  padding: 12px 16px;
}
.mobile-drawer__content { padding: 8px 16px; }
.mobile-nav a { display:block; padding:12px 0; border-bottom:1px solid var(--line); }

@keyframes slideIn {
  from { transform: translateX(-320px); }
  to { transform: translateX(0); }
}

@media (max-width: 900px) {
  .category-panel-dropdown { display: none !important; }
  .menu-button { display: inline-block; }
}


.hero-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  display: grid;
  align-items: end;
  border-radius: 8px;
  box-shadow: var(--shadow);
  background: var(--dark);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 21, 28, 0.9), rgba(16, 21, 28, 0.58), rgba(16, 21, 28, 0.12));
}

.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card__content {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  padding: 44px;
  color: #fff;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-card .eyebrow,
.brand-band .eyebrow,
.featured-tile span {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
}

h3 {
  margin-bottom: 10px;
  line-height: 1.25;
}

.hero-card p {
  color: #e7edf5;
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 6px;
  font-weight: 900;
}

.button--primary {
  color: #fff;
  background: var(--accent);
}

.button--primary:hover,
.add-cart:hover,
.search button:hover {
  background: var(--accent-dark);
}

.button--ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.deal-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fffbeb;
}

.deal-card span {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
}

.deal-card h2 {
  margin: 18px 0 10px;
  font-size: 23px;
}

.deal-card p {
  color: var(--muted);
}

.deal-card strong {
  display: inline-block;
  width: fit-content;
  padding: 8px 12px;
  color: var(--accent-dark);
  background: #fff;
  border: 1px dashed var(--accent);
  border-radius: 6px;
}

.section {
  padding: 64px 0;
}

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

.page-hero {
  padding: 72px 0;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 21, 28, 0.94), rgba(16, 21, 28, 0.72)),
    url("https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=1600&q=80") center / cover;
}

.page-hero--shop {
  background:
    linear-gradient(90deg, rgba(16, 21, 28, 0.94), rgba(16, 21, 28, 0.7)),
    url("https://images.unsplash.com/photo-1566933474821-cf80aa4f9481?auto=format&fit=crop&w=1600&q=80") center / cover;
}

.page-hero h1 {
  max-width: 760px;
}

.page-hero p {
  max-width: 690px;
  color: #e5edf5;
  font-size: 18px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading > a {
  color: var(--accent);
  font-weight: 900;
}

.featured-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.featured-tile {
  min-height: 260px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: end;
  color: #fff;
  background: var(--dark);
}

.featured-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 21, 28, 0.82), rgba(16, 21, 28, 0.22));
}

.featured-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-tile div {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.featured-tile h3 {
  max-width: 420px;
  font-size: 30px;
}

.featured-tile a {
  color: #fff;
  font-weight: 900;
  border-bottom: 2px solid var(--gold);
}

.filter-buttons,
.product-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter-buttons button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.products-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.product-tools span {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

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

.product-card.is-hidden {
  display: none;
}

.product-card__media {
  position: relative;
  aspect-ratio: 1.25;
  background: #edf1f5;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

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

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  padding: 5px 9px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.product-card__body {
  padding: 18px;
}

.product-card__body p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.product-card__body h3 {
  min-height: 48px;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.price del {
  color: #9aa3af;
}

.price strong {
  color: var(--accent);
  font-size: 19px;
}

.stock {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.add-cart {
  width: 100%;
  min-height: 42px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-weight: 900;
}

.product-link {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  font-weight: 900;
}

.product-card__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.loading-text,
.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.category-grid a {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.1), rgba(23, 32, 42, 0.02)),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-grid a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.category-grid strong {
  font-size: 18px;
}

.category-grid span {
  color: var(--muted);
}

.brand-band {
  padding: 72px 0;
  color: #fff;
  background: var(--dark);
}

.brand-band__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.brand-band h2 {
  margin-bottom: 16px;
}

.brand-band p {
  color: #d6dee8;
}

.brand-band img {
  width: 100%;
  aspect-ratio: 1.9;
  object-fit: cover;
  border-radius: 8px;
}

.content-layout,
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
}

.content-layout article,
.info-card,
.contact-form {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(15, 25, 40, 0.06);
}

.content-layout article p {
  color: var(--muted);
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.info-card li + li {
  margin-top: 10px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.footer {
  padding: 44px 0;
  color: #c9d2dc;
  background: #0b1016;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
}

.footer .brand strong {
  color: #fff;
}

.footer .brand small,
.footer p {
  color: #9aa8b8;
}

.footer h3 {
  color: #fff;
  font-size: 16px;
}

.footer a:not(.brand) {
  display: block;
  margin: 8px 0;
  color: #c9d2dc;
}

@media (max-width: 980px) {
  .topbar__inner,
  .header-main,
  .section-heading {
    align-items: flex-start;
  }

  .topbar__inner,
  .section-heading {
    flex-direction: column;
  }

  .header-main {
    grid-template-columns: 1fr auto;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  .account {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .nav-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .category-toggle {
    display: none;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

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

  .main-nav a {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

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

  .catalog-layout,
  .content-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .category-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .topbar nav,
  .topbar p {
    gap: 10px;
  }

  .header-main {
    min-height: 76px;
    gap: 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand__mark {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    font-size: 10px;
  }

  .cart-button {
    min-width: 48px;
    padding-right: 8px;
  }

  .cart-button span:not(.cart-button__count),
  .cart-button strong {
    display: none;
  }

  .hero-card {
    min-height: 500px;
  }

  .hero-card::after {
    background: linear-gradient(180deg, rgba(16, 21, 28, 0.2), rgba(16, 21, 28, 0.94));
  }

  .hero-card__content {
    padding: 26px;
  }

  .hero-card p {
    font-size: 16px;
  }

  .category-panel,
  .featured-row,
  .product-grid,
  .category-grid,
  .brand-band__grid,
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .featured-tile {
    min-height: 320px;
  }

  .featured-tile h3 {
    font-size: 25px;
  }

  .filter-buttons {
    justify-content: flex-start;
  }
}
