/* SXM Shop - Design aligné sur site vitrine (dark/néon) */
:root {
  --bg-primary: #050a0f;
  --bg-secondary: #0a1118;
  --glass: rgba(109,231,255,0.03);
  --glass-border: rgba(109,231,255,0.12);
  --glass-hover: rgba(109,231,255,0.08);
  --cyan-bright: #6DE7FF;
  --cyan-vivid: #24DBFF;
  --cyan-pale: #B6F3FF;
  --gradient-electric: linear-gradient(135deg, #6DE7FF 0%, #24DBFF 50%, #B6F3FF 100%);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.4);
  --neon-glow: 0 0 20px rgba(109,231,255,0.5), 0 0 40px rgba(109,231,255,0.3);
  --shadow-electric: 0 0 30px rgba(109,231,255,0.15);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
a { color: var(--cyan-bright); text-decoration: none; transition: all 0.3s; }
a:hover { color: var(--cyan-pale); }

.bg-grid { position: fixed; inset: 0; background-image: linear-gradient(rgba(109,231,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(109,231,255,0.03) 1px, transparent 1px); background-size: 50px 50px; pointer-events: none; z-index: 0; }

.shop-header { position: sticky; top: 0; z-index: 1000; background: rgba(5,10,15,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--glass-border); padding: 16px 0; }
.shop-nav { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 60px); display: flex; justify-content: space-between; align-items: center; }
.shop-nav .logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--text-primary); }
.shop-nav .logo:hover { color: var(--cyan-bright); }
.shop-nav ul { list-style: none; display: flex; gap: 8px; }
.shop-nav li a { padding: 10px 20px; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; border-radius: 100px; }
.shop-nav li a:hover, .shop-nav li a.active { color: var(--text-primary); background: var(--glass); }

.breadcrumb { max-width: 1400px; margin: 0 auto; padding: 1rem clamp(20px, 5vw, 60px); font-size: 0.875rem; color: var(--text-muted); position: relative; z-index: 2; }
.breadcrumb a { color: var(--text-secondary); }

.shop-page, .category-page, .product-page { max-width: 1400px; margin: 0 auto; padding: 2rem clamp(20px, 5vw, 60px) 4rem; position: relative; z-index: 2; }
.shop-page h1, .category-page h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; background: var(--gradient-electric); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.shop-intro, .category-intro { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 2rem; max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; }

.categories-section { margin-bottom: 3rem; padding: 2rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; }
.categories-section h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--cyan-pale); }
.categories-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.category-link { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 100px; color: var(--text-secondary); font-weight: 500; transition: all 0.3s; }
.category-link:hover { background: var(--glass-hover); border-color: var(--cyan-bright); color: var(--text-primary); transform: translateY(-2px); box-shadow: 0 0 20px rgba(109,231,255,0.2); }
.category-link .count { background: rgba(109,231,255,0.2); padding: 2px 8px; border-radius: 20px; font-size: 0.8rem; color: var(--cyan-bright); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.product-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; overflow: hidden; transition: all 0.4s; display: block; color: var(--text-primary); text-decoration: none; }
.product-card:hover { transform: translateY(-8px); border-color: rgba(109,231,255,0.4); box-shadow: var(--shadow-electric); }
.product-card-image { width: 100%; height: 200px; object-fit: cover; background: var(--bg-secondary); border-bottom: 1px solid var(--glass-border); }
.product-card-content { padding: 1.25rem; }
.product-card-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-primary); line-height: 1.4; }
.product-card-price { font-size: 1.5rem; font-weight: 700; background: var(--gradient-electric); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; } }
.product-image { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 24px; overflow: hidden; padding: 1rem; }
.product-image img { width: 100%; border-radius: 16px; }
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.5rem; line-height: 1.3; }
.product-price { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.product-price .price { font-size: 2.5rem; font-weight: 700; background: var(--gradient-electric); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.product-price .stock { background: rgba(16,185,129,0.2); color: #10b981; padding: 6px 16px; border-radius: 100px; font-size: 0.875rem; font-weight: 500; border: 1px solid rgba(16,185,129,0.3); }
.product-short-desc { color: var(--text-secondary); margin-bottom: 2rem; font-size: 1.05rem; line-height: 1.7; }
.btn-buy { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 36px; background: var(--gradient-electric); color: #050a0f; font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 600; border-radius: 14px; border: none; cursor: pointer; transition: all 0.4s; box-shadow: var(--neon-glow); }
.btn-buy:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 0 30px rgba(109,231,255,0.6), 0 0 60px rgba(109,231,255,0.4); color: #050a0f; }
.btn-buy.disabled { opacity: 0.5; pointer-events: none; }
.shipping-info { margin-top: 2rem; padding: 1.5rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; }
.shipping-info p { margin: 0.5rem 0; color: var(--text-secondary); font-size: 0.95rem; }

.product-description, .related-article, .category-links { margin-top: 2rem; padding: 2rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; }
.product-description h2, .related-article h2, .category-links h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--cyan-pale); }
.product-description p, .related-article p, .category-links p { color: var(--text-secondary); line-height: 1.8; }
.back-to-category { margin-top: 2rem; color: var(--text-muted); }
.stats-line { color: var(--text-muted); margin-bottom: 2rem; font-size: 0.95rem; }

.shop-footer { background: var(--bg-secondary); border-top: 1px solid var(--glass-border); padding: 3rem 2rem; text-align: center; position: relative; z-index: 2; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.shop-footer p { color: var(--text-muted); font-size: 0.85rem; }

.loading { text-align: center; padding: 4rem; color: var(--text-muted); }
.error { text-align: center; padding: 4rem; }
.error h1 { color: var(--cyan-bright); margin-bottom: 1rem; }

@media (max-width: 768px) { .shop-nav ul { gap: 4px; } .shop-nav li a { padding: 8px 12px; font-size: 0.8rem; } .categories-grid { flex-direction: column; } .category-link { width: 100%; justify-content: space-between; } }

/* Phase 4 - Sections merchandising et navigation catégories */

/* Hero section */
.shop-hero { text-align: center; padding: 3rem 0 2rem; margin-bottom: 2rem; }
.shop-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
.shop-stats { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; color: var(--text-muted); font-size: 0.95rem; }
.shop-stats strong { color: var(--cyan-bright); font-size: 1.1rem; }

/* Categories grid (cards) */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.category-card { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; text-align: center; transition: all 0.3s; }
.category-card:hover { background: var(--glass-hover); border-color: var(--cyan-bright); transform: translateY(-4px); box-shadow: var(--shadow-electric); }
.category-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.category-name { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.category-count { font-size: 0.8rem; color: var(--text-muted); }

/* Shop sections */
.shop-section { margin-bottom: 3rem; }
.shop-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }

/* Empty state */
.empty-state { text-align: center; padding: 4rem 2rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; }
.empty-state p { color: var(--text-secondary); font-size: 1.1rem; margin: 0.5rem 0; }

/* Category dropdown navigation */
.nav-categories { position: relative; }
.cat-dropdown { position: relative; }
.cat-btn { background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-secondary); padding: 10px 20px; border-radius: 100px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.3s; font-family: inherit; }
.cat-btn:hover { background: var(--glass-hover); color: var(--text-primary); border-color: var(--cyan-bright); }
.cat-menu { position: absolute; top: 100%; left: 0; margin-top: 8px; background: rgba(10,17,24,0.98); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 1rem; min-width: 280px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s; z-index: 1000; box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.cat-dropdown:hover .cat-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.cat-group { margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--glass-border); }
.cat-group:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.cat-parent { display: block; font-weight: 600; color: var(--text-primary); padding: 6px 0; font-size: 0.95rem; }
.cat-parent:hover { color: var(--cyan-bright); }
.cat-children { margin-left: 1rem; margin-top: 0.5rem; }
.cat-children a { display: block; color: var(--text-secondary); padding: 4px 0; font-size: 0.85rem; }
.cat-children a:hover { color: var(--cyan-bright); }

/* Responsive adjustments */
/* Mobile hamburger toggle */
.menu-toggle { display: none; background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-primary); padding: 8px 12px; border-radius: 8px; font-size: 1.2rem; cursor: pointer; }

@media (max-width: 768px) {
  .shop-hero { padding: 2rem 0 1rem; }
  .shop-page { overflow-x: hidden; }
  .btn-add-cart { padding: 12px 24px; font-size: 0.95rem; }
  .shop-stats { flex-direction: column; gap: 0.5rem; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
  .nav-categories { display: none; }
  .menu-toggle { display: block; }
  .shop-nav ul { display: none; flex-direction: column; position: absolute; top: 100%; right: 20px; background: rgba(10,17,24,0.98); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 16px; padding: 1rem; min-width: 200px; box-shadow: 0 20px 40px rgba(0,0,0,0.4); z-index: 1001; }
  .shop-nav ul.open { display: flex; }
  .shop-nav li a { padding: 12px 20px; font-size: 0.95rem; display: block; }
  .cart-link { position: static !important; }
  .cart-badge { position: relative !important; top: auto !important; right: auto !important; margin-left: 4px; vertical-align: middle; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .shop-nav .logo { font-size: 1rem; }
  .btn-add-cart { padding: 12px 20px; font-size: 0.9rem; max-width: 220px; }
  .product-info { overflow: hidden; }
  .product-info .btn-add-cart { max-width: 100%; width: auto; }
  .cart-summary .btn-add-cart { min-width: 180px; max-width: 260px; }
  .product-grid { gap: 1.5rem; }
}

/* Subcategories section */
.subcategories { margin-bottom: 2rem; }
.subcategories h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--cyan-pale); }

/* Cart badge & link */
.cart-link { position: relative; color: var(--text-primary); font-size: 1.2rem; padding: 8px 12px; text-decoration: none; }
.cart-link:hover { color: var(--cyan-bright); }
.cart-badge { position: absolute; top: 0; right: 0; background: #ef4444; color: #fff; font-size: 0.65rem; font-weight: 700; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }

/* Cart page */
.cart-page { max-width: 900px; margin: 0 auto; }
.cart-item { display: flex; gap: 1.5rem; align-items: center; padding: 1.5rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; margin-bottom: 1rem; }
.cart-item-img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--bg-secondary); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1rem; margin-bottom: 0.5rem; }
.cart-item-title a { color: var(--text-primary); }
.cart-item-price { color: var(--cyan-bright); font-weight: 700; font-size: 1.1rem; }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; }
.cart-item-qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text-primary); font-size: 1rem; cursor: pointer; }
.cart-item-qty button:hover { border-color: var(--cyan-bright); }
.cart-item-qty span { min-width: 24px; text-align: center; font-weight: 600; }
.cart-item-remove { color: #ef4444; cursor: pointer; font-size: 0.85rem; margin-top: 0.5rem; }
.cart-item-remove:hover { text-decoration: underline; }
.cart-summary { padding: 2rem; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; margin-top: 2rem; text-align: center; }
.cart-total { font-size: 1.8rem; font-weight: 700; background: var(--gradient-electric); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.5rem; }
.cart-empty { text-align: center; padding: 4rem 2rem; color: var(--text-secondary); }
.cart-empty a { color: var(--cyan-bright); }
.btn-add-cart { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 32px; background: var(--gradient-electric); color: #050a0f; font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 600; border-radius: 12px; border: none; cursor: pointer; transition: all 0.4s; box-shadow: var(--neon-glow); text-decoration: none; box-sizing: border-box; }
.btn-add-cart:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 30px rgba(109,231,255,0.6), 0 0 60px rgba(109,231,255,0.4); color: #050a0f; }
.btn-added { background: #10b981 !important; box-shadow: 0 0 20px rgba(16,185,129,0.5) !important; }
.product-info .btn-add-cart { margin-top: 0.5rem; }
.cart-summary .btn-add-cart { width: auto; min-width: 240px; }
@media (max-width: 768px) { .cart-item { gap: 1rem; padding: 1rem; } .cart-item-img { width: 50px; height: 50px; } }
