:root {
  --nav: #131921;
  --nav2: #232f3e;
  --accent: #ff9900;
  --accent-2: #febd69;
  --page: #eaeded;
  --panel: #ffffff;
  --ink: #0f1111;
  --muted: #5a5d5d;
  --line: #dde3e3;
  --shadow: 0 12px 30px rgba(18, 38, 63, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  background: linear-gradient(180deg, #f7f8f8, var(--page));
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.top-row {
  background: var(--nav);
  color: #fff;
  display: grid;
  grid-template-columns: 120px 180px 1fr 150px 120px 110px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem;
}

.logo {
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--accent-2);
}

.delivery,
.account,
.returns {
  font-size: 0.78rem;
  line-height: 1.05;
}

.delivery strong,
.account strong,
.returns strong {
  display: block;
  font-size: 0.86rem;
}

.search-wrap {
  display: grid;
  grid-template-columns: 130px 1fr 56px;
  height: 40px;
}

.search-wrap select,
.search-wrap input,
.search-wrap button {
  border: 0;
}

.search-wrap select {
  border-radius: 8px 0 0 8px;
  padding: 0 0.55rem;
}

.search-wrap input {
  padding: 0 0.85rem;
}

.search-wrap button {
  border-radius: 0 8px 8px 0;
  background: var(--accent-2);
  cursor: pointer;
}

.cart-btn {
  background: transparent;
  color: #fff;
  border: 1px solid #3a4757;
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-row {
  background: var(--nav2);
  padding: 0.45rem 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.nav-item:hover {
  border-color: #8f9cac;
}

main {
  max-width: 1460px;
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-copy,
.deal-timer,
.mini-panel,
.category-card,
.product,
.deal-card,
.panel-card,
.promo-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 1.2rem;
  background: linear-gradient(135deg, #1d2d50, #34537f);
  color: #fff;
}

.hero-copy h1,
.section-head h2,
.panel-card h2,
.deal-card h3,
.promo-card h3,
.category-card h3,
.product h3 {
  margin-top: 0;
}

.hero-copy p {
  color: #deebff;
  max-width: 56ch;
}

.hero-copy button,
#checkoutBtn,
#modalAddBtn,
.add-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.hero-copy button,
#checkoutBtn,
#modalAddBtn,
.add-btn {
  background: #ffd814;
  padding: 0.68rem 1rem;
  font-weight: 700;
}

.hero-stack {
  display: grid;
  gap: 1rem;
}

.deal-timer,
.mini-panel,
.panel-card {
  padding: 1rem;
}

.deal-timer p {
  margin: 0.4rem 0 0.8rem;
  font-size: 2rem;
  font-weight: 800;
  color: #c7511f;
}

.progress-shell {
  width: 100%;
  height: 10px;
  background: #eef2f2;
  border-radius: 999px;
  overflow: hidden;
}

.progress-shell span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff9900, #ff6b00);
}

.mini-panel ul {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.promo-card {
  padding: 1rem;
}

.promo-list {
  display: grid;
  gap: 0.55rem;
}

.promo-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.section-head p,
.meta,
.saved-meta,
.deal-meta,
.modal-meta,
.cart-item p,
.panel-card p {
  color: var(--muted);
}

.deal-section {
  margin-bottom: 1rem;
}

.deal-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.deal-card {
  padding: 0.9rem;
}

.deal-visual,
.thumb,
.modal-visual {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.deal-visual {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  margin-bottom: 0.7rem;
}

.deal-badge,
.product-badge,
.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #b12704;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.category-card {
  padding: 0.95rem;
  cursor: pointer;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.tag-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  border: 1px solid #ccd1d1;
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.tag.active {
  background: #232f3e;
  color: #fff;
  border-color: #232f3e;
}

#sortSelect {
  height: 38px;
  border-radius: 8px;
  border: 1px solid #ccd1d1;
  padding: 0 0.5rem;
}

.catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 0.95rem;
}

.product {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.thumb {
  aspect-ratio: 1 / 1;
  font-size: 1.05rem;
}

.product-body {
  padding: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.price-line {
  display: flex;
  align-items: end;
  gap: 0.45rem;
}

.price {
  font-size: 1.28rem;
  font-weight: 800;
}

.old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.buy-row,
.product-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.ghost-btn,
.secondary-btn {
  background: #eef3f3;
  color: #1f2937;
  padding: 0.55rem 0.85rem;
}

.insight-panel {
  display: grid;
  gap: 1rem;
}

.saved-items {
  display: grid;
  gap: 0.7rem;
}

.saved-card {
  border: 1px solid #e2e6e6;
  border-radius: 12px;
  padding: 0.8rem;
}

.saved-meta {
  margin: 0.3rem 0 0.6rem;
  font-size: 0.88rem;
}

.product-modal {
  width: min(980px, 94vw);
  border: 1px solid #d9dfdf;
  border-radius: 18px;
  padding: 1rem;
}

.product-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.close-product,
#closeCart,
.qty-row button {
  border: 0;
  cursor: pointer;
}

.close-product,
#closeCart {
  float: right;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eef3f3;
}

.product-modal-body {
  clear: both;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: 1rem;
}

.modal-visual {
  min-height: 360px;
  border-radius: 16px;
}

.modal-copy h2 {
  margin: 0.2rem 0;
}

.modal-price {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.8rem 0;
}

.modal-features {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.6;
}

.rating-bars {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.rating-row {
  display: grid;
  grid-template-columns: 72px 1fr 48px;
  gap: 0.65rem;
  align-items: center;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #eef2f2;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ff9900, #ff6b00);
}

.modal-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: min(390px, 96vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid #d4d8d8;
  box-shadow: -14px 0 26px rgba(9, 30, 66, 0.14);
  display: grid;
  grid-template-rows: auto 1fr auto;
  transition: right 0.25s ease;
  z-index: 40;
}

.cart-drawer.open {
  right: 0;
}

.cart-header,
.cart-footer {
  padding: 0.85rem;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e8e8;
}

.cart-footer {
  border-top: 1px solid #e5e8e8;
}

.cart-items {
  overflow: auto;
  padding: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.cart-item {
  border: 1px solid #e1e4e4;
  border-radius: 12px;
  padding: 0.75rem;
}

.qty-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.55rem;
}

.qty-row button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #eef3f3;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1180px) {
  .promo-grid,
  .catalog-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .top-row {
    grid-template-columns: 1fr;
  }

  .hero,
  .product-modal-body {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .promo-grid,
  .deal-strip,
  .category-strip,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .search-wrap {
    grid-template-columns: 100px 1fr 52px;
  }
}
