* {
  box-sizing: border-box;
}

:root {
  --bg: #070711;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.12);
  --gold: #f6d365;
  --gold2: #fda085;
  --btnBorder: rgba(255, 255, 255, 0.16);
  --btnGlass: rgba(255, 255, 255, 0.08);
  --btnGlass2: rgba(255, 255, 255, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  background:
    radial-gradient(
      1200px 600px at 20% -10%,
      rgba(246, 211, 101, 0.08),
      transparent 60%
    ),
    radial-gradient(
      1000px 500px at 90% 10%,
      rgba(253, 160, 133, 0.06),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
}

hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 14px 0;
}

::selection {
  background: rgba(246, 211, 101, 0.35);
  color: #0b1020;
}

.container {
  width: min(1200px, 92%);
  margin: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand {
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.hero {
  padding: 44px 0 26px;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.hero p {
  margin: 0 0 16px;
  opacity: 0.82;
  max-width: 60ch;
}

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 18px 0 28px;
}

.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 16px;
}

.filters h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.filters label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 180ms ease;
  color: var(--text);
  font-weight: 600;
}

.filters label:hover {
  background: rgba(255, 255, 255, 0.06);
}

.filters input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #f6d365;
}

.btn-clear {
  margin-top: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 240ms ease;
}

.btn-clear:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.btn-clear:active {
  transform: translateY(0px) scale(0.98);
}

.products-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
  transition:
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-input:focus {
  border-color: rgba(246, 211, 101, 0.45);
  box-shadow: 0 0 0 4px rgba(246, 211, 101, 0.12);
}

.sort-select {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  outline: none;
  cursor: pointer;
  transition:
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.sort-select:focus {
  border-color: rgba(246, 211, 101, 0.45);
  box-shadow: 0 0 0 4px rgba(246, 211, 101, 0.12);
}

.sort-select {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.sort-select option {
  background: #0b1020;
  color: rgba(255, 255, 255, 0.92);
}

.sort-select optgroup {
  background: #0b1020;
  color: rgba(255, 255, 255, 0.92);
}

.sort-select {
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 55%,
    calc(100% - 12px) 55%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition:
    transform 200ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(246, 211, 101, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.card img {
  width: 100%;
  display: block;
  height: 280px;
  object-fit: cover;
}

.card__body {
  padding: 14px;
}

.card__body h4 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.price {
  margin: 0;
  font-weight: 900;
  font-size: 18px;
}

.stock {
  margin: 8px 0 0;
  opacity: 0.85;
  font-size: 14px;
}

.badge-row {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.badge--premium {
  background: linear-gradient(
    135deg,
    rgba(246, 211, 101, 0.95),
    rgba(253, 160, 133, 0.95)
  );
  color: #0b1020;
}

.badge--new {
  background: rgba(0, 0, 0, 0.32);
  color: rgba(255, 255, 255, 0.92);
}

.badge--limited {
  background: rgba(255, 80, 80, 0.18);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 80, 80, 0.32);
}

.cart-btn {
  position: relative;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--btnBorder);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.06)
  );
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.cart-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 211, 101, 0.45);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(246, 211, 101, 0.1);
}

.cart-btn:active {
  transform: translateY(0px) scale(0.98);
}

.cart-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(246, 211, 101, 0.22),
    0 12px 28px rgba(0, 0, 0, 0.3);
}

.cart-btn #cartCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #0b1020;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.add-to-cart {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(246, 211, 101, 0.28);
  background: linear-gradient(
    135deg,
    rgba(246, 211, 101, 0.92),
    rgba(253, 160, 133, 0.92)
  );
  color: #0b1020;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 200ms ease,
    filter 200ms ease;
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28);
}

.add-to-cart:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.34),
    0 0 0 4px rgba(246, 211, 101, 0.14);
}

.add-to-cart:active {
  transform: translateY(-1px) scale(0.99);
}

.add-to-cart:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(246, 211, 101, 0.28),
    0 16px 30px rgba(0, 0, 0, 0.3);
}

.cta {
  margin-top: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(246, 211, 101, 0.35);
  background: linear-gradient(
    135deg,
    rgba(246, 211, 101, 0.95),
    rgba(253, 160, 133, 0.92)
  );
  color: #0b1020;
  font-weight: 900;
  letter-spacing: 0.35px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 240ms ease,
    filter 220ms ease;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.32);
}

.cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow:
    0 22px 45px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(246, 211, 101, 0.16);
}

.cta:active {
  transform: translateY(-1px) scale(0.99);
}

.cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(246, 211, 101, 0.28),
    0 18px 35px rgba(0, 0, 0, 0.32);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 999;
}

.cart-overlay.open {
  display: flex;
}

.cart-panel {
  width: min(420px, 100%);
  height: 100%;
  background: #0b1020;
  color: var(--text);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow: auto;
  margin-top: 12px;
  padding-right: 6px;
}

.cart-items::-webkit-scrollbar {
  width: 8px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.cart-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.cart-item__meta {
  opacity: 0.75;
  margin-top: 4px;
  font-size: 13px;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.qty-btn {
  width: 36px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
}

.qty {
  min-width: 22px;
  text-align: center;
}

.remove-btn {
  margin-left: auto;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 200ms ease;
}

.remove-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
}

.cart-panel__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cart-actions {
  display: flex;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  font-weight: 800;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.12);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
}

.cart-empty {
  opacity: 0.75;
  padding: 18px 8px;
}

.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 220ms ease;
}

.page-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.35);
}

.page-btn.active {
  color: #0b1020;
  background: linear-gradient(
    135deg,
    rgba(246, 211, 101, 0.95),
    rgba(253, 160, 133, 0.92)
  );
  border-color: rgba(246, 211, 101, 0.4);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (min-width: 768px) {
  .layout {
    grid-template-columns: 250px 1fr;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h2 {
    font-size: 42px;
  }
}

@media (max-width: 480px) {
  .cart-btn {
    padding: 9px 12px;
    font-size: 14px;
  }

  .card img {
    height: 240px;
  }
}
