/* ===== TESLA SHOP CSS ===== */

/* Shop Header */
.shop-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: white;
  border-bottom: 1px solid #e8e8e8;
  height: 56px;
}

.shop-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
}

.shop-nav .shop-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.shop-nav .shop-logo span {
  font-size: 13px;
  font-weight: 700;
  color: #171a20;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-left: 1px solid #ccc;
  padding-left: 10px;
  margin-left: 2px;
}

.shop-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.shop-nav-links a {
  color: #171a20;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 20px;
  transition: background 0.2s;
  white-space: nowrap;
}

.shop-nav-links a:hover { background: rgba(0,0,0,0.06); }
.shop-nav-links a.active { background: rgba(0,0,0,0.07); }

.shop-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.shop-search-form {
  display: flex;
  align-items: center;
  background: #f4f4f4;
  border-radius: 20px;
  padding: 7px 16px;
  gap: 8px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.shop-search-form:focus-within {
  background: white;
  border-color: #171a20;
}

.shop-search-form input {
  border: none;
  background: none;
  outline: none;
  font-size: 13px;
  width: 180px;
  color: #171a20;
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #171a20;
  color: white;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
  position: relative;
}

.cart-btn:hover { background: #e82127; }

.cart-count-badge {
  background: #e82127;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  top: -4px;
  right: -4px;
}

/* ─── SHOP HERO ─── */
.shop-hero {
  height: 480px;
  background: linear-gradient(to right, #171a20 0%, #2d2d2d 100%);
  display: flex;
  align-items: center;
  padding: 0 80px;
  margin-top: 56px;
  position: relative;
  overflow: hidden;
}

.shop-hero::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 50%;
  background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
}

.shop-hero-content { z-index: 1; max-width: 560px; }

.shop-hero h1 {
  font-size: 52px;
  font-weight: 300;
  color: white;
  line-height: 1.1;
  margin-bottom: 16px;
}

.shop-hero h1 span { color: #e82127; }

.shop-hero p {
  color: rgba(255,255,255,0.65);
  font-size: 17px;
  margin-bottom: 32px;
  line-height: 1.6;
}

.shop-hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── CATEGORY CARDS ─── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 60px 60px 0;
  max-width: 1400px;
  margin: 0 auto;
}

.category-card {
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  height: 220px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s;
}

.category-card:hover { transform: translateY(-4px); }
.category-card:hover .cat-overlay { background: rgba(0,0,0,0.5); }

.cat-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  transition: background 0.3s;
}

.cat-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s;
}

.category-card:hover .cat-bg { transform: scale(1.05); }

.cat-label {
  position: relative;
  z-index: 1;
  padding: 20px;
  color: white;
  width: 100%;
}

.cat-label h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cat-label p {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}

.cat-arrow {
  font-size: 18px;
  transition: transform 0.2s;
}

.category-card:hover .cat-arrow { transform: translateX(4px); }

/* ─── SECTION HEADERS ─── */
.shop-section {
  padding: 60px 60px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.shop-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.shop-section-header h2 {
  font-size: 26px;
  font-weight: 500;
}

.shop-section-header a {
  color: #e82127;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

/* ─── PRODUCT GRID ─── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid #f0f0f0;
  transition: all 0.25s;
  position: relative;
}

.product-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
  transform: translateY(-3px);
  border-color: transparent;
}

.product-img {
  aspect-ratio: 4/3;
  background: #f8f8f8;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover .product-img img { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #171a20;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  z-index: 1;
}

.product-badge.new { background: #16a34a; }
.product-badge.sale { background: #e82127; }

.product-info { padding: 16px; }

.product-info h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #171a20;
  line-height: 1.4;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.product-price .price {
  font-size: 17px;
  font-weight: 700;
  color: #171a20;
}

.product-price .compare-price {
  font-size: 13px;
  color: #8a8a8a;
  text-decoration: line-through;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5c5e62;
}

.stars { color: #f59e0b; letter-spacing: 1px; }

.product-card-quick-add {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #171a20;
  color: white;
  text-align: center;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(100%);
  transition: transform 0.25s;
}

.product-card:hover .product-card-quick-add { transform: translateY(0); }

/* ─── CATEGORY PAGE ─── */
.category-page { margin-top: 56px; }

.category-banner {
  height: 240px;
  background: linear-gradient(to right, #171a20, #2d2d2d);
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.category-banner h1 {
  font-size: 44px;
  font-weight: 300;
  color: white;
}

.category-banner p {
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  font-size: 16px;
}

.category-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 60px 80px;
}

.filter-sidebar {}

.filter-section { margin-bottom: 28px; }

.filter-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8a8a8a;
  margin-bottom: 12px;
}

.filter-options { display: flex; flex-direction: column; gap: 8px; }

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #171a20;
  cursor: pointer;
  padding: 4px 0;
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #e82127;
}

.product-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.product-count-bar span {
  font-size: 14px;
  color: #5c5e62;
}

.sort-select {
  padding: 8px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  outline: none;
}

/* ─── PRODUCT DETAIL ─── */
.product-detail { margin-top: 56px; padding: 60px; max-width: 1200px; margin-left: auto; margin-right: auto; }

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-gallery { position: sticky; top: 80px; }

.main-image {
  aspect-ratio: 1;
  background: #f8f8f8;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
}

.product-detail-info h1 {
  font-size: 32px;
  font-weight: 400;
  color: #171a20;
  margin-bottom: 12px;
  line-height: 1.2;
}

.detail-price {
  font-size: 28px;
  font-weight: 700;
  color: #171a20;
  margin-bottom: 8px;
}

.detail-compare {
  font-size: 16px;
  color: #8a8a8a;
  text-decoration: line-through;
  margin-left: 10px;
  font-weight: 400;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

.detail-description {
  font-size: 15px;
  color: #5c5e62;
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f0f0f0;
}

.variant-section { margin-bottom: 20px; }

.variant-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #171a20;
  margin-bottom: 10px;
}

.variant-options { display: flex; flex-wrap: wrap; gap: 8px; }

.variant-btn {
  padding: 8px 18px;
  border: 1.5px solid #e8e8e8;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
  color: #171a20;
}

.variant-btn:hover { border-color: #171a20; }
.variant-btn.selected { border-color: #171a20; background: #171a20; color: white; }

.add-to-cart-btn {
  width: 100%;
  padding: 16px;
  background: #171a20;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.add-to-cart-btn:hover { background: #e82127; }

.product-features {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #f0f0f0;
}

.product-features h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a8a8a;
}

.product-features ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-features ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #5c5e62;
}

.product-features ul li::before {
  content: '✓';
  color: #22c55e;
  font-weight: 700;
  flex-shrink: 0;
}

/* ─── CART ─── */
.cart-page { margin-top: 56px; padding: 60px; max-width: 1200px; margin-left: auto; margin-right: auto; }

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item-img {
  width: 100px;
  height: 100px;
  background: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }

.cart-item-info h4 { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.cart-item-info p { font-size: 13px; color: #8a8a8a; margin-bottom: 12px; }

.qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover { background: #f4f4f4; border-color: #171a20; }
.qty-number { font-size: 15px; font-weight: 600; min-width: 20px; text-align: center; }

.cart-item-price { font-size: 18px; font-weight: 700; text-align: right; }
.cart-item-remove {
  font-size: 12px;
  color: #8a8a8a;
  text-decoration: none;
  display: block;
  margin-top: 8px;
  text-align: right;
  cursor: pointer;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.cart-item-remove:hover { color: #e82127; }

.cart-summary {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 28px;
  position: sticky;
  top: 80px;
  border: 1px solid #efefef;
}

.cart-summary h3 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #5c5e62;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  padding: 16px 0 20px;
  color: #171a20;
}

.checkout-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: #171a20;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-btn:hover { background: #e82127; }

/* ─── CHECKOUT ─── */
.checkout-page { margin-top: 56px; padding: 60px; max-width: 1100px; margin-left: auto; margin-right: auto; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
}

.checkout-form h2 { font-size: 22px; font-weight: 600; margin-bottom: 24px; }

.checkout-section {
  background: white;
  border: 1px solid #efefef;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
}

.checkout-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8a8a8a;
}

/* ─── ORDER CONFIRMATION ─── */
.order-confirm { margin-top: 56px; min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 60px; }

.confirm-card {
  background: white;
  border-radius: 20px;
  padding: 60px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 40px rgba(0,0,0,0.06);
  border: 1px solid #efefef;
}

.confirm-icon {
  width: 80px;
  height: 80px;
  background: rgba(34,197,94,0.1);
  border: 2px solid rgba(34,197,94,0.3);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 24px;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); padding: 40px 24px 0; }
  .shop-section { padding: 40px 24px 20px; }
  .category-layout { grid-template-columns: 1fr; padding: 24px; }
  .filter-sidebar { display: none; }
  .product-detail { padding: 24px; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 32px; }
  .product-gallery { position: static; }
  .cart-layout { grid-template-columns: 1fr; padding: 24px; }
  .checkout-grid { grid-template-columns: 1fr; }
  .shop-nav-links { display: none; }
  .cart-page { padding: 24px; }
  .checkout-page { padding: 24px; }
}

@media (max-width: 768px) {
  .shop-hero { padding: 0 24px; height: 360px; }
  .shop-hero h1 { font-size: 36px; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px 16px 0; }
  .shop-nav { padding: 0 20px; }
  .shop-search-form input { width: 120px; }
}
