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

:root {
  --primary: #ff6a00;
  --primary-dark: #e05500;
  --primary-glow: rgba(255, 106, 0, 0.35);
  --dark: #0a0a0a;
  --dark-2: #111;
  --dark-3: #1a1a1a;
  --dark-4: #222;
  --gray: #888;
  --light: #ccc;
  --white: #f5f5f5;
  --green: #2ea043;
  --red: #e74c3c;
  --font: 'Inter', -apple-system, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--dark); color: var(--light); -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* Header */
.store-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.store-header__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.store-header__logo { display: flex; align-items: center; gap: 14px; }
.store-header__logo img { height: 42px; border-radius: 50%; }
.store-header__logo-text { font-size: 0.8rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 1.5px; }
.store-header__nav { display: flex; align-items: center; gap: 6px; }
.store-header__nav a {
  padding: 8px 16px; font-size: 0.85rem; font-weight: 500; color: var(--gray);
  border-radius: var(--radius-sm); transition: all var(--transition);
}
.store-header__nav a:hover, .store-header__nav a.active { color: var(--white); background: rgba(255,255,255,0.05); }
.store-header__nav a.active { color: var(--primary); background: rgba(255,106,0,0.1); }

/* Country switcher */
.country-switch { display: flex; gap: 4px; }
.country-switch a {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  background: var(--dark-3); border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600;
  color: var(--gray); transition: all var(--transition);
}
.country-switch a:hover { border-color: var(--primary); color: var(--white); }
.country-switch a.active { border-color: var(--primary); color: var(--primary); background: rgba(255,106,0,0.08); }
.country-switch svg { width: 18px; height: 13px; border-radius: 2px; }

/* Cart button */
.cart-toggle {
  position: relative; background: var(--dark-3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 10px; cursor: pointer; color: var(--light); transition: all var(--transition);
}
.cart-toggle:hover { border-color: var(--primary); color: var(--primary); }
.cart-badge {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 700;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Hero */
.store-hero {
  padding: 100px 24px 40px; text-align: center;
  background: linear-gradient(180deg, rgba(255,106,0,0.06) 0%, transparent 100%);
}
.store-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; color: var(--white); margin-bottom: 8px; }
.store-hero p { color: var(--gray); font-size: 1rem; margin-bottom: 28px; }

/* Search */
.search-bar {
  display: flex; align-items: center; gap: 12px; max-width: 500px; margin: 0 auto 0;
  padding: 12px 20px; background: var(--dark-2); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50px; transition: all var(--transition); color: var(--gray);
}
.search-bar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,106,0,0.1); }
.search-bar input { flex: 1; background: none; border: none; outline: none; font-family: var(--font); font-size: 0.9rem; color: var(--white); }
.search-bar input::placeholder { color: #555; }
.search-bar svg { flex-shrink: 0; }

/* Filters */
.filters {
  max-width: 1280px; margin: 0 auto; padding: 20px 24px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-btn {
  padding: 8px 18px; background: var(--dark-2); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 50px; font-family: var(--font); font-size: 0.82rem; font-weight: 600;
  color: var(--gray); cursor: pointer; transition: all var(--transition);
}
.filter-btn:hover { border-color: rgba(255,106,0,0.3); color: var(--white); }
.filter-btn.active { background: rgba(255,106,0,0.1); border-color: var(--primary); color: var(--primary); }

/* Products grid */
.products {
  max-width: 1280px; margin: 0 auto; padding: 20px 24px 100px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}

/* Product card */
.product-card {
  background: var(--dark-2); border: 1px solid rgba(255,255,255,0.05);
  border-radius: var(--radius); overflow: hidden; transition: all var(--transition);
}
.product-card:hover {
  border-color: rgba(255,106,0,0.2); transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.product-card__img {
  position: relative; height: 200px; background: var(--dark-3);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-card__img img { transform: scale(1.05); }
.product-card__img .no-img { color: rgba(255,106,0,0.15); font-size: 3rem; }
.product-card__stock {
  position: absolute; top: 10px; right: 10px; padding: 4px 10px;
  border-radius: 50px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
}
.product-card__stock.instock { background: rgba(46,160,67,0.15); color: var(--green); }
.product-card__stock.outofstock { background: rgba(231,76,60,0.15); color: var(--red); }

.product-card__body { padding: 18px; }
.product-card__cat { font-size: 0.7rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.product-card__name { font-size: 0.95rem; font-weight: 700; color: var(--white); margin-bottom: 6px; line-height: 1.3; }
.product-card__desc { font-size: 0.8rem; color: var(--gray); line-height: 1.5; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }
.product-card__price { font-size: 1.2rem; font-weight: 800; color: var(--white); }
.product-card__price small { font-size: 0.7rem; font-weight: 500; color: var(--gray); display: block; }

.btn-add {
  padding: 8px 16px; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.8rem;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.btn-add:hover { background: var(--primary-dark); transform: scale(1.05); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-add:disabled { background: #333; color: #666; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-add.added { background: var(--green); }

/* Loading */
.loading { text-align: center; padding: 60px 0; color: var(--gray); }
.loading .spinner {
  width: 40px; height: 40px; border: 3px solid var(--dark-3); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty */
.empty-state { text-align: center; padding: 80px 24px; color: var(--gray); }
.empty-state svg { margin-bottom: 16px; opacity: 0.3; }

/* Cart sidebar */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar {
  position: fixed; top: 0; right: 0; width: 400px; max-width: 90vw; height: 100vh;
  background: var(--dark-2); border-left: 1px solid rgba(255,255,255,0.06);
  z-index: 201; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-sidebar.open { transform: translateX(0); }
.cart-sidebar__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-sidebar__header h3 { font-size: 1rem; font-weight: 700; color: var(--white); }
.cart-sidebar__close { background: none; border: none; color: var(--gray); cursor: pointer; padding: 4px; }
.cart-sidebar__close:hover { color: var(--white); }
.cart-sidebar__items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-sidebar__empty { text-align: center; padding: 60px 0; color: var(--gray); font-size: 0.9rem; }

.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.cart-item__img { width: 56px; height: 56px; background: var(--dark-3); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; }
.cart-item__name { font-size: 0.85rem; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.cart-item__price { font-size: 0.8rem; color: var(--primary); font-weight: 600; }
.cart-item__qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-item__qty button {
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: var(--dark-3); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px;
  color: var(--light); font-size: 0.85rem; cursor: pointer; transition: all var(--transition);
}
.cart-item__qty button:hover { border-color: var(--primary); color: var(--primary); }
.cart-item__qty span { font-size: 0.85rem; font-weight: 600; color: var(--white); min-width: 18px; text-align: center; }
.cart-item__remove { background: none; border: none; color: #555; cursor: pointer; align-self: flex-start; padding: 2px; }
.cart-item__remove:hover { color: var(--red); }

.cart-sidebar__footer {
  padding: 20px; border-top: 1px solid rgba(255,255,255,0.06); background: var(--dark-3);
}
.cart-sidebar__total { display: flex; justify-content: space-between; font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.btn-checkout {
  width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.95rem;
  font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.btn-checkout:hover { background: var(--primary-dark); box-shadow: 0 6px 20px var(--primary-glow); }

/* WhatsApp */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 99; width: 56px; height: 56px;
  border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 4px 16px rgba(37,211,102,0.4); transition: all var(--transition);
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,0.5); }

/* Footer */
.store-footer {
  background: var(--dark-2); border-top: 1px solid rgba(255,255,255,0.04);
  padding: 32px 24px; text-align: center;
}
.store-footer p { font-size: 0.8rem; color: var(--gray); }

/* Responsive */
@media (max-width: 768px) {
  .store-header__nav { display: none; }
  .country-switch { gap: 2px; }
  .country-switch a { padding: 5px 8px; font-size: 0.7rem; }
  .country-switch a span { display: none; }
  .products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .product-card__img { height: 150px; }
  .product-card__body { padding: 12px; }
  .product-card__price { font-size: 1rem; }
  .btn-add { padding: 6px 12px; font-size: 0.75rem; }
  .filters { padding: 12px 16px; }
  .filter-btn { padding: 6px 14px; font-size: 0.75rem; }
}
