/* ============================================
   TECH VOLT MARKET — MAIN STYLES
   ============================================ */

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

:root {
  --primary: #e63946;
  --primary-dark: #c1121f;
  --dark: #1a1a2e;
  --dark2: #16213e;
  --accent: #0f3460;
  --text: #333;
  --text-light: #666;
  --border: #e0e0e0;
  --bg-light: #f8f9fa;
  --white: #fff;
  --shadow: 0 2px 16px rgba(0,0,0,0.10);
  --radius: 10px;
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--text); background: var(--white); }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.bg-light { background: var(--bg-light); }
.text-center { text-align: center; }
.mt-3 { margin-top: 32px; }
.section-title {
  font-size: 1.7rem; font-weight: 700; margin-bottom: 36px;
  text-align: center; color: var(--dark);
  position: relative;
}
.section-title::after {
  content: ''; display: block; width: 52px; height: 3px;
  background: var(--primary); margin: 10px auto 0;
}

/* ─── TOP BAR ─── */
.top-bar {
  background: var(--dark); color: #adb5bd;
  font-size: 0.80rem; padding: 7px 0;
}
.top-bar .container {
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; align-items: center;
}
.top-bar i { margin-right: 5px; color: var(--primary); }

/* ─── HEADER ─── */
.header {
  background: var(--white); position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.09); border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px;
  padding-top: 14px; padding-bottom: 14px;
}
.logo img { height: 44px; }
.logo-text { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }

.main-nav { display: flex; gap: 24px; margin: 0 auto; }
.main-nav a {
  font-weight: 500; font-size: 0.95rem; color: var(--dark); padding: 4px 0;
  border-bottom: 2px solid transparent; transition: var(--transition);
}
.main-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 0.88rem; color: var(--dark); display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.btn-icon:hover { color: var(--primary); }

.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: white; padding: 8px 16px;
  border-radius: 24px; font-size: 0.88rem; font-weight: 600;
  transition: var(--transition);
}
.cart-btn:hover { background: var(--primary-dark); }
.cart-count {
  background: white; color: var(--primary); border-radius: 50%;
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}

.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 1.3rem; cursor: pointer; color: var(--dark);
}

/* Search bar */
.search-bar {
  display: none; background: var(--dark); padding: 14px 0;
  position: relative;
}
.search-bar.active { display: block; }
.search-bar .container {
  display: flex; gap: 10px;
}
.search-bar input {
  flex: 1; padding: 10px 16px; border: none; border-radius: 6px;
  font-size: 0.95rem; outline: none;
}
.search-bar button {
  background: var(--primary); color: white; border: none;
  padding: 10px 18px; border-radius: 6px; cursor: pointer; font-size: 1.1rem;
}
.search-results {
  position: absolute; top: 100%; left: 20px; right: 20px;
  background: white; border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow); z-index: 100; max-height: 360px; overflow-y: auto;
}
.search-result-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.search-result-item:hover { background: var(--bg-light); }
.search-result-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.search-result-item span { font-size: 0.88rem; font-weight: 500; }
.search-result-item .price { color: var(--primary); font-weight: 700; margin-left: auto; }

/* Mobile menu */
.mobile-menu {
  display: none; flex-direction: column; background: var(--dark); padding: 10px 0;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
  color: white; padding: 12px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 500;
}

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--accent) 60%, #e63946 100%);
  min-height: 420px; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 60px 20px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 400"><circle cx="600" cy="200" r="300" fill="rgba(255,255,255,0.03)"/><circle cx="150" cy="300" r="200" fill="rgba(255,255,255,0.02)"/></svg>');
  background-size: cover;
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 2.6rem; font-weight: 800; color: white; margin-bottom: 14px; line-height: 1.2; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,0.85); margin-bottom: 30px; }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-block; background: var(--primary); color: white;
  padding: 13px 32px; border-radius: 30px; font-weight: 700;
  font-size: 0.95rem; transition: var(--transition); border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary {
  display: inline-block; background: transparent; color: var(--primary);
  padding: 11px 28px; border-radius: 30px; font-weight: 600;
  font-size: 0.92rem; border: 2px solid var(--primary); cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--primary); color: white; }
.btn-outline {
  background: white; color: var(--dark); border: 2px solid var(--border);
  padding: 9px 20px; border-radius: 6px; font-size: 0.88rem;
  cursor: pointer; transition: var(--transition);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ─── CATEGORIES ─── */
.categories-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.category-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 20px;
  text-align: center; transition: var(--transition); display: block;
}
.category-card:hover {
  border-color: var(--primary); box-shadow: 0 4px 20px rgba(230,57,70,0.13);
  transform: translateY(-3px);
}
.cat-icon { font-size: 2.5rem; margin-bottom: 12px; }
.category-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.category-card span { font-size: 0.82rem; color: var(--text-light); }

/* ─── PRODUCT CARDS ─── */
.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.product-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.13); transform: translateY(-3px);
  border-color: var(--primary);
}
.product-img-wrap {
  position: relative; overflow: hidden; background: #f5f5f7;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
}
.product-img-wrap img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-badge {
  position: absolute; top: 10px; left: 10px; background: var(--primary);
  color: white; font-size: 0.72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 12px; text-transform: uppercase;
}
.product-actions-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(26,26,46,0.82); display: flex;
  gap: 8px; padding: 10px; opacity: 0; transition: var(--transition);
}
.product-card:hover .product-actions-overlay { opacity: 1; }
.overlay-btn {
  flex: 1; background: white; color: var(--dark); border: none;
  padding: 7px; border-radius: 5px; font-size: 0.78rem; cursor: pointer;
  transition: var(--transition); font-weight: 600;
}
.overlay-btn:hover { background: var(--primary); color: white; }

.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-cats { font-size: 0.72rem; color: var(--text-light); margin-bottom: 6px; }
.product-title {
  font-size: 0.88rem; font-weight: 600; color: var(--dark);
  margin-bottom: 10px; line-height: 1.4; flex: 1;
}
.product-price { font-size: 1.1rem; font-weight: 800; color: var(--primary); margin-bottom: 14px; }
.product-price-range { font-size: 0.82rem; font-weight: 600; color: var(--text-light); }
.add-to-cart-btn {
  width: 100%; background: var(--dark); color: white; border: none;
  padding: 10px; border-radius: 6px; font-weight: 600; font-size: 0.88rem;
  cursor: pointer; transition: var(--transition);
}
.add-to-cart-btn:hover { background: var(--primary); }

/* ─── BRANDS ─── */
.brands-grid {
  display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
}
.brand-card {
  border: 2px solid var(--border); border-radius: 8px;
  padding: 14px 32px; font-weight: 700; font-size: 1rem;
  color: var(--text-light); transition: var(--transition); cursor: pointer;
  background: white;
}
.brand-card:hover { border-color: var(--primary); color: var(--primary); }

/* ─── FEATURES ─── */
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center;
}
.feature i { font-size: 2.2rem; color: var(--primary); margin-bottom: 14px; }
.feature h3 { font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 0.88rem; color: var(--text-light); }

/* ─── FOOTER ─── */
.footer { background: var(--dark); color: #adb5bd; padding: 52px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 36px;
}
.footer-col h4 { color: white; font-weight: 700; margin-bottom: 16px; font-size: 1rem; }
.footer-col p { font-size: 0.85rem; margin-bottom: 6px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.85rem; transition: var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }
.payment-img { max-width: 200px; border-radius: 6px; filter: brightness(0.9); }
.payment-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.payment-badges span {
  background: rgba(255,255,255,0.1); padding: 6px 12px;
  border-radius: 5px; font-size: 0.82rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 0; text-align: center; font-size: 0.82rem;
}

/* ─── CART NOTIFICATION ─── */
.cart-notification {
  position: fixed; bottom: 28px; right: 28px; z-index: 9999;
  background: #28a745; color: white; padding: 14px 24px;
  border-radius: 8px; font-weight: 600; font-size: 0.92rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transform: translateY(100px); opacity: 0; transition: 0.32s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.cart-notification.show { transform: translateY(0); opacity: 1; }

/* ─── SHOP PAGE ─── */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.sidebar { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.sidebar h3 { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--dark); border-bottom: 2px solid var(--border); padding-bottom: 10px; }
.sidebar .filter-group { margin-bottom: 24px; }
.sidebar label { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-size: 0.88rem; cursor: pointer; }
.sidebar label:hover { color: var(--primary); }
.price-range input { width: 100%; margin-top: 8px; }

.shop-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.shop-header h2 { font-size: 1.3rem; font-weight: 700; }
.sort-select {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.88rem; background: white; cursor: pointer;
}
.products-count { font-size: 0.85rem; color: var(--text-light); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination button {
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 6px;
  background: white; cursor: pointer; font-weight: 600; transition: var(--transition);
}
.pagination button.active, .pagination button:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ─── PRODUCT DETAIL ─── */
.product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.product-gallery { }
.product-gallery .main-img {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; background: #f5f5f7; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.product-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbnails { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbnails img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 6px;
  border: 2px solid var(--border); cursor: pointer; transition: var(--transition);
}
.thumbnails img:hover, .thumbnails img.active { border-color: var(--primary); }

.product-info { }
.product-info .product-cats { font-size: 0.82rem; margin-bottom: 8px; }
.product-info h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 14px; color: var(--dark); line-height: 1.3; }
.product-info .price { font-size: 1.9rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; }
.product-info .iva { font-size: 0.82rem; color: var(--text-light); margin-top: 2px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.qty-input { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.qty-input button { background: var(--bg-light); border: none; width: 36px; height: 42px; font-size: 1.1rem; cursor: pointer; }
.qty-input input { width: 52px; height: 42px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 1rem; font-weight: 600; }
.add-to-cart-big { flex: 1; background: var(--primary); color: white; border: none; padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.add-to-cart-big:hover { background: var(--primary-dark); }
.product-meta { font-size: 0.85rem; color: var(--text-light); margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.product-meta span { display: block; margin-bottom: 6px; }
.product-description { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.product-description h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.product-description p { font-size: 0.9rem; line-height: 1.7; color: var(--text-light); }

/* ─── CART PAGE ─── */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { background: var(--bg-light); padding: 14px 16px; text-align: left; font-size: 0.85rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-item-img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-brand { font-size: 0.78rem; color: var(--text-light); }
.remove-btn { background: none; border: none; color: #dc3545; font-size: 1.1rem; cursor: pointer; }
.cart-summary { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.cart-summary h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.9rem; }
.summary-row.total { font-size: 1.15rem; font-weight: 800; margin-top: 12px; padding-top: 14px; border-top: 2px solid var(--border); }
.checkout-btn { width: 100%; background: var(--primary); color: white; border: none; padding: 15px; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: 18px; transition: var(--transition); }
.checkout-btn:hover { background: var(--primary-dark); }
.coupon-row { display: flex; gap: 8px; margin-top: 16px; }
.coupon-row input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.88rem; }
.coupon-row button { background: var(--dark); color: white; border: none; padding: 9px 14px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.empty-cart { text-align: center; padding: 60px 20px; }
.empty-cart i { font-size: 4rem; color: var(--border); margin-bottom: 18px; }
.empty-cart h3 { font-size: 1.3rem; margin-bottom: 10px; }
.empty-cart p { color: var(--text-light); margin-bottom: 22px; }

/* ─── CHECKOUT PAGE ─── */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 32px; align-items: start; }
.checkout-form { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.checkout-form h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; color: var(--dark); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 0.9rem; outline: none; transition: var(--transition); font-family: inherit;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,57,70,0.09); }
.payment-methods { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.payment-method { border: 2px solid var(--border); border-radius: 8px; padding: 14px 16px; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 12px; }
.payment-method.selected { border-color: var(--primary); background: rgba(230,57,70,0.04); }
.payment-method input[type=radio] { accent-color: var(--primary); }
.payment-method-label { font-weight: 600; font-size: 0.9rem; }
.payment-method-icons { margin-left: auto; font-size: 0.8rem; color: var(--text-light); }

/* Order summary in checkout */
.order-summary { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.order-item { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.order-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; }
.order-item-info h4 { font-size: 0.85rem; font-weight: 600; }
.order-item-info .qty { font-size: 0.78rem; color: var(--text-light); }
.order-item .item-total { margin-left: auto; font-weight: 700; font-size: 0.9rem; white-space: nowrap; }

/* ─── BREADCRUMB ─── */
.breadcrumb { padding: 14px 0; font-size: 0.83rem; color: var(--text-light); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 7px; }

/* ─── PAGE HERO (inner pages) ─── */
.page-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--accent) 100%); padding: 38px 0; text-align: center; }
.page-hero h1 { color: white; font-size: 1.9rem; font-weight: 800; }
.page-hero p { color: rgba(255,255,255,0.75); margin-top: 8px; font-size: 0.95rem; }

/* ─── CONTACT ─── */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.contact-item i { width: 40px; height: 40px; background: rgba(230,57,70,0.08); color: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 1rem; flex-shrink: 0; }
.contact-item p { font-size: 0.88rem; color: var(--text-light); }
.contact-item strong { display: block; font-weight: 700; color: var(--dark); margin-bottom: 2px; font-size: 0.9rem; }

/* ─── ACCOUNT ─── */
.account-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.account-tab { padding: 12px 24px; font-weight: 600; font-size: 0.92rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: var(--transition); color: var(--text-light); background: none; border-top: none; border-left: none; border-right: none; }
.account-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── STARS ─── */
.stars { color: #ffc107; font-size: 0.9rem; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .shop-layout { grid-template-columns: 220px 1fr; }
}

@media (max-width: 768px) {
  .main-nav, .header-actions { display: none; }
  .mobile-menu-btn { display: block; }
  .hero h1 { font-size: 1.8rem; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .categories-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ============================================================
   CART DRAWER (slide-out)
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: .3s; z-index: 1400;
}
.cart-overlay.show { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 90vw; background: #fff;
  z-index: 1500; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,.18);
}
.cart-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--border);
  background: var(--dark); color: #fff;
}
.drawer-header h3 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.drawer-close {
  background: rgba(255,255,255,.12); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  font-size: 1rem; transition: .2s;
}
.drawer-close:hover { background: rgba(255,255,255,.25); }

.drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }

.drawer-empty { text-align: center; padding: 60px 24px; }
.drawer-empty i { font-size: 2.6rem; color: var(--border); display: block; margin-bottom: 16px; }
.drawer-empty p { color: var(--text-light); margin-bottom: 20px; }

.drawer-item {
  display: flex; gap: 12px; padding: 14px 22px;
  border-bottom: 1px solid var(--border); align-items: flex-start; position: relative;
}
.drawer-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.drawer-item-info { flex: 1; min-width: 0; }
.drawer-item-name { font-size: .85rem; font-weight: 600; line-height: 1.3; margin-bottom: 2px; }
.drawer-item-brand { font-size: .74rem; color: var(--text-light); margin-bottom: 8px; }
.drawer-item-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-item-price { font-weight: 700; font-size: .9rem; color: var(--primary); }
.drawer-item-remove {
  background: none; border: none; color: #bbb; cursor: pointer;
  font-size: .9rem; padding: 4px; transition: .15s; flex-shrink: 0;
}
.drawer-item-remove:hover { color: #dc3545; }

.qty-mini { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.qty-mini button {
  width: 26px; height: 28px; border: none; background: #f8f9fa;
  cursor: pointer; font-size: .95rem; transition: .15s; color: var(--dark);
}
.qty-mini button:hover { background: var(--primary); color: #fff; }
.qty-mini span { min-width: 30px; text-align: center; font-size: .82rem; font-weight: 600; }

.drawer-footer { border-top: 1px solid var(--border); padding: 18px 22px; background: #fafafa; }
.free-ship-bar { margin-bottom: 14px; font-size: .8rem; color: var(--text-light); }
.free-ship-bar.success { color: #28a745; font-weight: 600; text-align: center; }
.free-ship-text { margin-bottom: 6px; }
.free-ship-track { height: 6px; background: var(--border); border-radius: 4px; overflow: hidden; }
.free-ship-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #ff6b6b); transition: width .4s; }
.drawer-summary { margin-bottom: 14px; }
.drawer-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .88rem; }
.drawer-row.total { font-size: 1.05rem; font-weight: 800; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.drawer-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 8px; padding: 13px; }

/* ============================================================
   CART NOTIFICATION TOAST
   ============================================================ */
.cart-notification {
  position: fixed; bottom: 24px; right: 24px; background: #28a745; color: #fff;
  padding: 13px 20px; border-radius: 10px; font-size: .88rem; font-weight: 600;
  transform: translateX(140%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  z-index: 1600; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.22); max-width: 320px;
}
.cart-notification.show { transform: translateX(0); }

/* Cart button count badge visibility */
.cart-btn { position: relative; cursor: pointer; }

@media (max-width: 480px) {
  .cart-drawer { width: 100vw; max-width: 100vw; }
  .cart-notification { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
