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

:root {
  --bg: #0f172a;
  --bg2: #1e293b;
  --bg3: #334155;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #64748b;
  --primary: #e11d48;
  --primary-hover: #be123c;
  --border: #1e293b;
  --radius: 8px;
}

html { font-size: 16px; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }

a { color: var(--primary); }
a:hover { opacity: .85; }
p { color: var(--text2); }
h4 { color: var(--text); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* Announcement bar */
.announcement-bar {
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 8px 16px;
}
.announcement-bar a { color: #fff; }

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  font-size: 15px;
}
.logo-text { font-weight: 700; font-size: 17px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.cart-btn {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  color: var(--text);
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s;
}
.cart-btn:hover { background: var(--bg3); opacity: 1; }

/* Filters */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.filter-group label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.filter-group select,
.filter-group input {
  background: var(--bg2);
  border: 1px solid var(--bg3);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--primary); }

.results-count { font-size: 13px; color: var(--text3); margin-bottom: 16px; }

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

/* Product card */
.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, transform .15s;
  cursor: pointer;
}
.product-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.product-card-img {
  aspect-ratio: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
}
.badge-bestseller { background: var(--primary); }
.badge-new { background: #059669; }
.badge-sale { background: #d97706; }
.badge-outofstock { background: var(--text3); }

.product-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.product-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.product-card-price .old-price {
  font-size: 13px;
  font-weight: 400;
  color: var(--text3);
  text-decoration: line-through;
  margin-left: 6px;
}
.product-card-body .btn-add {
  margin-top: auto;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.product-card-body .btn-add:hover { background: var(--primary-hover); }
.product-card-body .btn-add:disabled { background: var(--bg3); cursor: not-allowed; }
.product-card-body .btn-add.added { background: #059669; }

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail-img {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-detail-img img { width: 100%; height: 100%; object-fit: contain; }
.product-detail-info { display: flex; flex-direction: column; gap: 16px; }
.product-detail-info h1 { font-size: 26px; font-weight: 700; line-height: 1.3; }
.product-detail-price { font-size: 28px; font-weight: 700; }
.in-stock { color: #10b981; font-size: 14px; font-weight: 500; }
.product-detail-desc { color: var(--text2); font-size: 15px; line-height: 1.7; }
.product-detail-features { list-style: none; }
.product-detail-features li {
  color: var(--text2);
  font-size: 14px;
  padding: 4px 0 4px 20px;
  position: relative;
}
.product-detail-features li::before {
  content: '•';
  color: var(--primary);
  position: absolute;
  left: 0;
}
.qty-row { display: flex; align-items: center; gap: 12px; }
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--bg3);
  border-radius: 6px;
  overflow: hidden;
}
.qty-control button {
  background: var(--bg2);
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 18px;
  font-family: inherit;
}
.qty-control button:hover { background: var(--bg3); }
.qty-control input {
  background: transparent;
  border: none;
  border-left: 1px solid var(--bg3);
  border-right: 1px solid var(--bg3);
  color: var(--text);
  width: 48px;
  text-align: center;
  font-size: 14px;
  outline: none;
  padding: 6px 0;
  font-family: inherit;
}
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background .15s;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-hover); opacity: 1; }
.btn-primary:disabled { background: var(--bg3); cursor: not-allowed; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--bg3);
  color: var(--text2);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

.view-original { font-size: 13px; color: var(--text3); text-decoration: none; }
.view-original:hover { color: var(--text2); opacity: 1; }

.specs-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.specs-table tr:nth-child(even) td { background: var(--bg2); }
.specs-table td { padding: 8px 12px; font-size: 13px; color: var(--text2); border: 1px solid var(--border); }
.specs-table td:first-child { font-weight: 600; color: var(--text); width: 40%; }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--text3); margin-bottom: 24px; }
.breadcrumb a { color: var(--text3); text-decoration: none; }
.breadcrumb a:hover { color: var(--text2); opacity: 1; }
.breadcrumb span { margin: 0 6px; }

/* Card */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-header {
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 0;
  color: var(--text);
}

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 6px;
  padding: 6px;
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; margin-bottom: 4px; display: block; }
.cart-item-name:hover { color: var(--primary); opacity: 1; }
.cart-item-price { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
.cart-item-actions { display: flex; align-items: center; gap: 12px; }
.cart-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--bg3);
  border-radius: 6px;
  overflow: hidden;
}
.cart-item-qty button {
  background: transparent;
  border: none;
  color: var(--text);
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
}
.cart-item-qty button:hover { background: var(--bg3); }
.cart-item-qty input {
  background: transparent;
  border: none;
  border-left: 1px solid var(--bg3);
  border-right: 1px solid var(--bg3);
  color: var(--text);
  width: 40px;
  text-align: center;
  font-size: 13px;
  outline: none;
  padding: 4px 0;
  font-family: inherit;
}
.cart-item-subtotal { font-weight: 700; color: var(--text); font-size: 14px; }
.cart-item-remove { font-size: 12px; color: var(--text3); cursor: pointer; background: none; border: none; font-family: inherit; }
.cart-item-remove:hover { color: var(--primary); }

.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; }
.summary-row dt { color: var(--text2); }
.summary-row dd { color: var(--text); font-weight: 500; }
.summary-row.bold dt, .summary-row.bold dd { font-weight: 700; font-size: 16px; color: var(--text); }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field.full-width { grid-column: 1 / -1; }
.form-field label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.form-field input,
.form-field textarea {
  background: var(--bg);
  border: 1px solid var(--bg3);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--primary); }
.form-field textarea { resize: vertical; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid var(--bg3);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 1000;
  font-size: 14px;
}
.cookie-banner p { color: var(--text2); margin: 0; flex: 1; min-width: 200px; }
.cookie-btns { display: flex; gap: 10px; }
.cookie-btns button {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.cookie-btns button:first-child { background: var(--primary); color: #fff; border: none; }
.cookie-btns button.btn-secondary { background: transparent; border: 1px solid var(--bg3); color: var(--text2); }

/* Footer */
.site-footer { background: #080e1a; border-top: 1px solid var(--border); padding: 40px 0 0; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.footer-col p { font-size: 13px; color: #64748b; line-height: 1.8; margin: 0; }
.footer-col a { color: #64748b; text-decoration: none; }
.footer-col a:hover { color: var(--text2); opacity: 1; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #059669;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn .2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
@keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: none; opacity: 1; } }

/* No results */
.no-results { text-align: center; padding: 64px 0; color: var(--text3); }

@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card-body { padding: 10px; }
  .product-card-name { font-size: 12px; }
  .product-card-price { font-size: 14px; }
}
