/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Arial', sans-serif; background: #eaeded; color: #111; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===========================
   HEADER
   =========================== */
.header {
  display: flex;
  align-items: center;
  background: #131921;
  color: #fff;
  padding: 10px 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-logo a {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  border: 2px solid transparent;
  padding: 4px 6px;
  border-radius: 3px;
  transition: border-color .2s;
}
.header-logo a:hover { border-color: #fff; }
.logo-shop { color: #fff; }
.logo-zone { color: #ff9900; }

.header-address {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  cursor: pointer;
  min-width: 110px;
  border: 2px solid transparent;
  border-radius: 3px;
  padding: 4px;
  transition: border-color .2s;
}
.header-address:hover { border-color: #fff; }
.deliver-to { color: #ccc; font-size: 11px; }
.location { font-weight: bold; font-size: 13px; }

.header-search {
  flex: 1;
  display: flex;
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
}
.search-category {
  background: #f3f3f3;
  border: none;
  padding: 0 8px;
  font-size: 12px;
  color: #111;
  cursor: pointer;
  border-right: 1px solid #cdcdcd;
}
.header-search input {
  flex: 1;
  border: none;
  padding: 0 12px;
  font-size: 15px;
  outline: none;
}
.search-btn {
  background: #ff9900;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  font-size: 18px;
  color: #131921;
  transition: background .2s;
}
.search-btn:hover { background: #e88a00; }

.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-item {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 3px;
  padding: 4px 8px;
  transition: border-color .2s;
  position: relative;
  white-space: nowrap;
}
.nav-item:hover { border-color: #fff; }
.nav-line1 { font-size: 11px; color: #ccc; }
.nav-line2 { font-weight: bold; }

/* Account dropdown */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  color: #111;
  width: 200px;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  padding: 16px;
  z-index: 2000;
}
.nav-item:hover .dropdown-menu { display: block; }
.sign-in-btn {
  width: 100%;
  background: #ff9900;
  border: none;
  padding: 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 8px;
}
.dropdown-menu p { font-size: 12px; margin-bottom: 8px; }
.dropdown-menu p a { color: #007185; }
.dropdown-menu hr { margin: 8px 0; }
.dropdown-menu ul li a { display: block; padding: 4px 0; font-size: 13px; }
.dropdown-menu ul li a:hover { color: #c7511f; }

.cart-icon { flex-direction: row; align-items: center; gap: 4px; font-size: 24px; }
.cart-icon .nav-line2 { font-size: 13px; }
.cart-badge {
  background: #ff9900;
  color: #111;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 2px;
  left: 22px;
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  background: #232f3e;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 4px;
  overflow-x: auto;
  white-space: nowrap;
}
.navbar::-webkit-scrollbar { height: 3px; }
.navbar::-webkit-scrollbar-thumb { background: #ff9900; }
.navbar a, .nav-all {
  color: #fff;
  font-size: 13px;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color .2s;
  display: inline-block;
}
.navbar a:hover, .nav-all:hover { border-color: #fff; }
.nav-all { font-weight: bold; }

/* ===========================
   HERO SLIDER
   =========================== */
.hero-slider {
  position: relative;
  height: 340px;
  overflow: hidden;
}
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 40px 80px;
  transition: opacity .5s;
}
.slide.active { display: flex; }
.slide-content { color: #fff; max-width: 500px; }
.slide-content h2 { font-size: 36px; margin-bottom: 12px; }
.slide-content p { font-size: 16px; color: #ccc; margin-bottom: 20px; }
.slide-btn {
  background: #ff9900;
  color: #111;
  border: none;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.slide-btn:hover { background: #e88a00; transform: scale(1.03); }
.slide-image { opacity: .8; }

.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.5);
  border: none;
  color: #fff;
  font-size: 22px;
  padding: 12px 16px;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  transition: background .2s;
}
.slider-prev:hover, .slider-next:hover { background: rgba(0,0,0,.8); }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background .2s;
}
.dot.active { background: #ff9900; }

/* ===========================
   MAIN CONTENT
   =========================== */
.main-content { max-width: 1400px; margin: 0 auto; padding: 0 16px 40px; }

/* Deals banner */
.deals-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.deal-card {
  background: #fff;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: box-shadow .2s;
}
.deal-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.deal-card i { font-size: 28px; color: #ff9900; }
.deal-card strong { display: block; font-size: 14px; }
.deal-card p { font-size: 12px; color: #777; }

/* Section */
.section { margin-bottom: 32px; }
.section-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #111;
}
.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sort-filter { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sort-filter select {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.category-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: box-shadow .2s, transform .2s;
}
.category-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.15); transform: translateY(-3px); }
.category-card i { font-size: 30px; color: #ff9900; display: block; margin-bottom: 8px; }
.category-card span { font-size: 12px; font-weight: bold; color: #333; }

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  transition: box-shadow .2s, transform .2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.15); transform: translateY(-4px); }
.product-img-wrap {
  background: #f7f7f7;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .3s;
  background: #f7f7f7;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-img-wrap i { font-size: 80px; color: #ccc; transition: transform .3s; }
.product-card:hover .product-img-wrap i { transform: scale(1.1); }
.img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #cc0000;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 7px;
  border-radius: 3px;
}
.product-badge.new { background: #007600; }
.product-badge.prime { background: #00a8e0; }
.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-title {
  font-size: 14px;
  font-weight: bold;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-brand { font-size: 12px; color: #007185; margin-bottom: 6px; }
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.stars { color: #ff9900; font-size: 13px; }
.rating-count { font-size: 12px; color: #007185; }
.product-price { margin-bottom: 10px; }
.price-main { font-size: 20px; font-weight: bold; color: #111; }
.price-main .currency { font-size: 13px; vertical-align: super; }
.price-old { font-size: 12px; color: #777; text-decoration: line-through; margin-left: 6px; }
.price-save { font-size: 12px; color: #cc0000; }
.product-shipping { font-size: 12px; color: #007600; margin-bottom: 10px; }
.add-cart-btn {
  margin-top: auto;
  background: #ff9900;
  border: none;
  border-radius: 20px;
  padding: 9px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background .2s;
}
.add-cart-btn:hover { background: #e88a00; }
.wishlist-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #ccc;
  cursor: pointer;
  position: absolute;
  top: 8px;
  right: 8px;
  transition: color .2s;
}
.wishlist-btn:hover, .wishlist-btn.active { color: #cc0000; }

.discount-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: #ff9900;
  color: #111;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 7px;
  border-radius: 3px;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 18px;
}
.no-results i { font-size: 48px; display: block; margin-bottom: 12px; }

/* Trending grid */
.trending-section { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.trending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.trending-item {
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #eee;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.trending-item:hover { border-color: #ff9900; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.trending-item i { font-size: 36px; color: #ff9900; display: block; margin-bottom: 8px; }
.trending-item .t-name { font-size: 13px; font-weight: bold; }
.trending-item .t-price { font-size: 14px; color: #cc0000; font-weight: bold; }

/* ===========================
   CART SIDEBAR
   =========================== */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1500;
}
.cart-overlay.open { display: block; }
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100%;
  background: #fff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.2);
  transition: right .3s ease;
}
.cart-sidebar.open { right: 0; }
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: #232f3e;
  color: #fff;
}
.cart-header h3 { font-size: 18px; }
.cart-header button { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; padding: 60px 20px; color: #999; }
.cart-empty i { font-size: 60px; margin-bottom: 12px; display: block; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.cart-item-icon {
  width: 70px;
  height: 70px;
  background: #f7f7f7;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #999;
  flex-shrink: 0;
  overflow: hidden;
}
.cart-item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 13px; font-weight: bold; margin-bottom: 4px; }
.cart-item-price { font-size: 14px; color: #cc0000; font-weight: bold; margin-bottom: 8px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 26px; height: 26px;
  border: 1px solid #ccc;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s;
}
.qty-btn:hover { background: #ff9900; border-color: #ff9900; }
.qty-num { font-size: 14px; font-weight: bold; min-width: 20px; text-align: center; }
.remove-btn { background: none; border: none; color: #cc0000; cursor: pointer; font-size: 13px; margin-left: auto; }

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  background: #f7f7f7;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  margin-bottom: 12px;
}
.cart-total strong { font-size: 18px; color: #111; }
.checkout-btn {
  width: 100%;
  background: #ff9900;
  border: none;
  border-radius: 4px;
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background .2s;
}
.checkout-btn:hover { background: #e88a00; }

/* ===========================
   TOAST
   =========================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #232f3e;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  border-left: 4px solid #ff9900;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===========================
   FOOTER
   =========================== */
footer { background: #232f3e; color: #ccc; margin-top: 40px; }
.footer-back-top {
  background: #37475a;
  text-align: center;
  padding: 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.footer-back-top:hover { background: #485769; }
.footer-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 36px 60px;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: #ccc; transition: color .2s; }
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #3a4553;
  padding: 20px 60px;
  text-align: center;
}
.footer-logo { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 8px; }
.footer-links a { font-size: 12px; color: #ccc; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom p { font-size: 12px; margin-bottom: 12px; }
.payment-icons { font-size: 28px; display: flex; justify-content: center; gap: 12px; color: #ccc; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1200px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-body { padding: 36px 24px; }
  .deals-banner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .header { flex-wrap: wrap; }
  .header-search { order: 3; width: 100%; }
  .slide { padding: 24px 30px; }
  .slide-content h2 { font-size: 24px; }
  .slide-image { display: none; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-body { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .deals-banner { grid-template-columns: 1fr; }
  .footer-body { grid-template-columns: 1fr; padding: 24px 16px; }
  .cart-sidebar { width: 100%; right: -100%; }
  .hero-slider { height: 250px; }
  .header-address { display: none; }
}
