/*
Theme Name: SmartMediaShop
Theme URI: https://smart-media-shop.de
Author: SmartMediaShop
Author URI: https://smart-media-shop.de
Description: Thème e-commerce électroménager coloré et dynamique pour SmartMediaShop. Compatible WooCommerce.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smartmediashop
Tags: e-commerce, woocommerce, electromenager, responsive, colorful
*/

/* ========================================
   VARIABLES & RESET
   ======================================== */
:root {
  --primary: #E63946;       /* Rouge dynamique */
  --secondary: #457B9D;     /* Bleu acier */
  --accent: #F4A261;        /* Orange promo */
  --dark: #1D3557;          /* Bleu nuit */
  --light: #F1FAEE;         /* Blanc cassé */
  --white: #ffffff;
  --gray: #6c757d;
  --light-gray: #f8f9fa;
  --border: #dee2e6;
  --success: #2DC653;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.10);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.18);
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: #333;
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--dark); }

img { max-width: 100%; height: auto; display: block; }

/* ========================================
   TYPOGRAPHIE
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 4rem 0; }

/* ========================================
   TOPBAR
   ======================================== */
.topbar {
  background: var(--dark);
  color: var(--light);
  font-size: 0.82rem;
  padding: 0.4rem 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar a { color: var(--accent); }
.topbar a:hover { color: var(--white); }
.topbar-icons { display: flex; gap: 1.5rem; align-items: center; }
.topbar-icons span { display: flex; align-items: center; gap: 0.35rem; }

/* ========================================
   HEADER
   ======================================== */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: white;
}
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--dark); }
.logo-text span { color: var(--primary); }

/* Barre de recherche */
.header-search {
  flex: 1;
  max-width: 520px;
}
.search-form {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-form:focus-within { border-color: var(--primary); }
.search-form select {
  border: none;
  background: var(--light-gray);
  padding: 0 1rem;
  font-size: 0.85rem;
  color: var(--dark);
  border-right: 1px solid var(--border);
  cursor: pointer;
  min-width: 130px;
}
.search-form input {
  flex: 1;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  outline: none;
}
.search-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 1.2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition);
}
.search-form button:hover { background: var(--dark); }

/* Actions header */
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: var(--gray);
  text-decoration: none;
  position: relative;
  transition: color var(--transition);
}
.header-action-btn:hover { color: var(--primary); }
.header-action-btn .icon { font-size: 1.4rem; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: white;
  font-size: 0.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ========================================
   NAVIGATION
   ======================================== */
.site-nav {
  background: var(--dark);
  position: relative;
}
.nav-container {
  display: flex;
  align-items: stretch;
}
.nav-categories-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background var(--transition);
  white-space: nowrap;
}
.nav-categories-btn:hover { background: var(--accent); color: var(--dark); }

.main-menu {
  display: flex;
  list-style: none;
  gap: 0;
  flex: 1;
}
.main-menu > li > a {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-display);
  transition: all var(--transition);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.main-menu > li > a:hover,
.main-menu > li.active > a {
  color: white;
  border-bottom-color: var(--accent);
  background: rgba(255,255,255,0.05);
}
.nav-promo {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-display);
  animation: pulse-text 2s infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ========================================
   HERO BANNER
   ======================================== */
.hero-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  padding: 1rem 0;
}
.hero-main {
  background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 60%, #2a9d8f 100%);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 380px;
  position: relative;
  overflow: hidden;
}
.hero-main::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 180%;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; max-width: 55%; }
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  font-size: 0.75rem;
  font-weight: 800;
  font-family: var(--font-display);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-content h1 {
  color: white;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.hero-content p { color: rgba(255,255,255,0.8); font-size: 1rem; margin-bottom: 1.5rem; }
.hero-price-block {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.price-old { color: rgba(255,255,255,0.5); text-decoration: line-through; font-size: 1rem; }
.price-new { color: var(--accent); font-size: 2rem; font-weight: 800; font-family: var(--font-display); }
.hero-image {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.hero-image .product-img-placeholder {
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.hero-side { display: flex; flex-direction: column; gap: 1rem; }
.hero-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.hero-card-1 { background: linear-gradient(135deg, #e63946, #c1121f); }
.hero-card-2 { background: linear-gradient(135deg, #f4a261, #e76f51); }
.hero-card h3 { color: white; font-size: 1rem; margin-bottom: 0.5rem; }
.hero-card .card-emoji { font-size: 2.5rem; position: absolute; bottom: 0.5rem; right: 1rem; opacity: 0.3; }
.hero-card .card-link {
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: underline;
}

/* ========================================
   BANDE AVANTAGES
   ======================================== */
.benefits-bar {
  background: var(--primary);
  padding: 0.75rem 0;
}
.benefits-bar .container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.benefit-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-display);
}
.benefit-item span { font-size: 1.1rem; }

/* ========================================
   CATÉGORIES
   ======================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}
.category-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}
.category-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: var(--primary);
}
.category-card:hover .cat-icon { transform: scale(1.15); }
.cat-icon { font-size: 2.2rem; margin-bottom: 0.5rem; transition: transform var(--transition); display: block; }
.cat-name { font-size: 0.82rem; font-weight: 700; font-family: var(--font-display); color: var(--dark); }

/* ========================================
   FLASH PROMO
   ======================================== */
.flash-section {
  background: linear-gradient(135deg, var(--dark), #2a4a6b);
  padding: 3rem 0;
  color: white;
}
.flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.flash-header h2 { color: white; }
.countdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 0.5rem 1rem;
}
.countdown-unit {
  text-align: center;
  min-width: 48px;
  background: var(--primary);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
}
.countdown-unit .num { font-size: 1.4rem; font-weight: 800; font-family: var(--font-display); display: block; }
.countdown-unit .lbl { font-size: 0.6rem; opacity: 0.8; text-transform: uppercase; }
.countdown-sep { font-size: 1.2rem; font-weight: 700; color: var(--accent); }

/* ========================================
   GRILLE PRODUITS
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
  border-color: var(--primary);
}
.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  z-index: 1;
  font-family: var(--font-display);
}
.product-badge.new { background: var(--success); }
.product-badge.promo { background: var(--accent); color: var(--dark); }

.product-wishlist {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  z-index: 1;
}
.product-wishlist:hover { background: var(--primary); border-color: var(--primary); }

.product-image {
  height: 180px;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }

.product-info { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-brand {
  font-size: 0.72rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.product-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  flex: 1;
}
.product-rating { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.6rem; }
.stars { color: #FFC107; font-size: 0.8rem; }
.rating-count { font-size: 0.72rem; color: var(--gray); }
.product-price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.75rem; }
.price-current { font-size: 1.2rem; font-weight: 800; color: var(--primary); font-family: var(--font-display); }
.price-was { font-size: 0.82rem; color: var(--gray); text-decoration: line-through; }
.price-saving {
  font-size: 0.72rem;
  background: #FFF3CD;
  color: #856404;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
}

.btn-add-cart {
  width: 100%;
  background: var(--dark);
  color: white;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-add-cart:hover { background: var(--primary); transform: scale(1.02); }

/* ========================================
   BANNIÈRE PROMO LARGE
   ======================================== */
.promo-banners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.promo-banner {
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 140px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform var(--transition);
}
.promo-banner:hover { transform: scale(1.02); }
.promo-banner-1 { background: linear-gradient(135deg, #2DC653, #1a7a31); }
.promo-banner-2 { background: linear-gradient(135deg, #9B5DE5, #5a189a); }
.promo-banner-3 { background: linear-gradient(135deg, #F4A261, #E76F51); }
.promo-banner-content h3 { color: white; font-size: 1rem; margin-bottom: 0.3rem; }
.promo-banner-content p { color: rgba(255,255,255,0.8); font-size: 0.8rem; margin-bottom: 0.75rem; }
.promo-pct {
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(255,255,255,0.2);
  position: absolute;
  right: 0.5rem;
  bottom: -0.5rem;
  font-family: var(--font-display);
  line-height: 1;
}

/* ========================================
   BOUTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--dark); color: white; transform: translateY(-2px); box-shadow: 0 4px 15px rgba(230,57,70,0.4); }
.btn-outline { background: transparent; border-color: white; color: white; }
.btn-outline:hover { background: white; color: var(--dark); }
.btn-dark { background: var(--dark); color: white; }
.btn-dark:hover { background: var(--primary); color: white; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }

/* ========================================
   MARQUES
   ======================================== */
.brands-section { background: var(--light-gray); }
.brands-track {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.brand-logo {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--gray);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.brand-logo:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.05); }

/* ========================================
   NEWSLETTER
   ======================================== */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary), #c1121f);
  padding: 3rem 0;
  text-align: center;
  color: white;
}
.newsletter-section h2 { color: white; margin-bottom: 0.5rem; }
.newsletter-section p { opacity: 0.9; margin-bottom: 1.5rem; }
.newsletter-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.newsletter-form input {
  flex: 1;
  border: none;
  padding: 0.85rem 1.25rem;
  font-size: 0.9rem;
  outline: none;
}
.newsletter-form button {
  background: var(--dark);
  color: white;
  border: none;
  padding: 0 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  font-size: 0.88rem;
  transition: background var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--accent); color: var(--dark); }

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 {
  color: white;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}
.footer-col p { font-size: 0.85rem; line-height: 1.7; margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.85rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.social-links { display: flex; gap: 0.6rem; margin-top: 1rem; }
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  text-decoration: none;
}
.social-link:hover { background: var(--primary); transform: translateY(-2px); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}
.payment-icons { display: flex; gap: 0.5rem; align-items: center; }
.payment-icon {
  background: white;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--dark);
}

/* ========================================
   WOOCOMMERCE OVERRIDES
   ======================================== */
.woocommerce .products .product .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--dark) !important;
  color: white !important;
  border-radius: 6px !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  padding: 0.65rem 1.2rem !important;
  font-size: 0.85rem !important;
  transition: background var(--transition) !important;
}
.woocommerce .products .product .button:hover,
.woocommerce button.button:hover {
  background: var(--primary) !important;
}
.woocommerce span.onsale {
  background: var(--primary) !important;
  border-radius: 4px !important;
  min-height: auto !important;
  min-width: auto !important;
  padding: 0.25rem 0.6rem !important;
  font-weight: 800 !important;
}
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before { color: #FFC107; }
.woocommerce-Price-amount { color: var(--primary) !important; font-weight: 800 !important; }
.woocommerce nav.woocommerce-pagination ul li a:focus,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .promo-banners { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-main { flex-wrap: wrap; }
  .header-search { order: 3; max-width: 100%; width: 100%; }
  .topbar .container { justify-content: center; }
  .main-menu { display: none; }
  .hero-main { padding: 2rem 1.5rem; min-height: 280px; }
  .hero-image { display: none; }
  .hero-content { max-width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-side { flex-direction: column; }
  .benefits-bar .container { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .promo-banners { grid-template-columns: 1fr; }
}

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