/* ============================================
   KARIBO.FR — Global CSS v3.2.0
   Design premium — slate/red/rounded
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  background-color: #f1f5f9 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #1e293b;
}

#wrapper {
  background: #f1f5f9 !important;
  padding-top: 0 !important;
}

a { color: #1e293b; transition: color 0.2s ease; }
a:hover { color: #dc2626 !important; text-decoration: none !important; }

/* ---------- Container ---------- */
@media (min-width: 1200px) {
  .container { max-width: 1280px !important; width: 100% !important; }
}

/* ======================================================
   LOGO — Badge K + Karibo Auto (CSS only)
   ====================================================== */

/* Container du logo */
#_desktop_logo {
  display: flex !important;
  align-items: center !important;
  min-width: 220px !important;
  padding: 4px 0 !important;
}

/* Le lien parent — on en fait un flex container pour le logo */
#_desktop_logo a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  padding: 6px 8px !important;
  border-radius: 14px !important;
  transition: all 0.2s ease !important;
}

#_desktop_logo a:hover {
  background: rgba(241, 245, 249, 0.8) !important;
  color: inherit !important;
}

/* Masquer l'image logo existante */
#_desktop_logo .logo.img-fluid {
  display: none !important;
}

/* Badge "K" — carré rouge arrondi */
#_desktop_logo a::before {
  content: "K";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: #dc2626;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 900;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  flex-shrink: 0;
}

/* Texte "Karibo Auto" + sous-titre */
#_desktop_logo a::after {
  content: "Karibo Auto\APièces auto · France";
  white-space: pre-line;
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.3px;
  color: #0f172a;
}

/* Mobile logo */
#_mobile_logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#_mobile_logo a {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
}

#_mobile_logo .logo.img-fluid {
  display: none !important;
}

#_mobile_logo a::before {
  content: "K";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: #dc2626;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 900;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.25);
  flex-shrink: 0;
}

#_mobile_logo a::after {
  content: "Karibo";
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.3px;
}

/* ---------- Header ---------- */
#header .header-top {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 0 !important;
}

#header .header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px !important;
}

#header .header-nav {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Top links */
#header .header-top a,
#header .header-nav a {
  color: #334155 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

#header .header-top a:hover,
#header .header-nav a:hover {
  color: #dc2626 !important;
}

/* Don't override logo link colors */
#_desktop_logo a:hover::after,
#_mobile_logo a:hover::after {
  color: #0f172a !important;
}

/* ---------- Search Bar (header) ---------- */
#search_widget {
  min-width: 380px !important;
  max-width: 480px !important;
}

#search_widget form input[type="text"] {
  width: 100% !important;
  padding: 12px 48px 12px 18px !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  background: #f8fafc !important;
  color: #1e293b !important;
  transition: all 0.2s ease;
}

#search_widget form input[type="text"]:focus {
  border-color: #dc2626 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08) !important;
  outline: none !important;
}

#search_widget form button[type="submit"] {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: #dc2626 !important;
  border: none !important;
  border-radius: 8px !important;
  color: #fff !important;
  padding: 8px 12px !important;
  cursor: pointer;
  transition: background 0.2s ease;
}

#search_widget form button[type="submit"]:hover {
  background: #b91c1c !important;
}

/* ---------- Navigation Menu ---------- */
#_desktop_top_menu .top-menu > li > a {
  font-weight: 600 !important;
  font-size: 13px !important;
  color: #334155 !important;
  padding: 12px 12px !important;
  transition: color 0.2s ease;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
}

#_desktop_top_menu .top-menu > li > a:hover {
  color: #dc2626 !important;
}

#_desktop_top_menu .top-menu .sub-menu {
  border-top: 3px solid #dc2626 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
  border-radius: 0 0 12px 12px !important;
}

/* ---------- Product Cards (listing pages) ---------- */
.products .product-miniature {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  overflow: hidden;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  margin-bottom: 24px !important;
}

.products .product-miniature:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,0.1) !important;
  border-color: #dc2626 !important;
}

.products .product-miniature .thumbnail-container {
  overflow: hidden;
  background: #f8fafc;
}

.products .product-miniature .thumbnail-container img {
  transition: transform 0.3s ease !important;
}

.products .product-miniature:hover .thumbnail-container img {
  transform: scale(1.05) !important;
}

.products .product-miniature .product-title a {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #1e293b !important;
  line-height: 1.4 !important;
}

.products .product-miniature .product-price-and-shipping .price {
  font-size: 20px !important;
  font-weight: 900 !important;
  color: #dc2626 !important;
}

.products .product-miniature .product-flag.discount {
  background: #dc2626 !important;
  color: #fff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
}

.products .product-miniature .product-flag.new {
  background: #059669 !important;
  color: #fff !important;
  border-radius: 8px !important;
}

/* ---------- Buttons ---------- */
.btn-primary,
.add-to-cart,
.btn-primary:not(:disabled):not(.disabled) {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  padding: 12px 28px !important;
  text-transform: none !important;
  font-size: 15px !important;
  letter-spacing: 0 !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.add-to-cart:hover {
  background-color: #b91c1c !important;
  border-color: #b91c1c !important;
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background-color: #1e293b !important;
  border-color: #1e293b !important;
  color: #ffffff !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

.btn-secondary:hover {
  background-color: #0f172a !important;
}

/* ---------- Sidebar ---------- */
#left-column, #right-column {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  border: 1px solid #e2e8f0 !important;
}

.block-categories .category-sub-menu li a {
  padding: 8px 12px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  display: block;
}

.block-categories .category-sub-menu li a:hover {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

/* ---------- Product Page ---------- */
.product-cover img { border-radius: 16px !important; }

.product-prices .current-price .price {
  font-size: 28px !important;
  font-weight: 900 !important;
  color: #dc2626 !important;
}

.product-prices .regular-price {
  text-decoration: line-through;
  color: #94a3b8 !important;
}

.product-quantity .add-to-cart {
  font-size: 16px !important;
  padding: 14px 36px !important;
}

.product-tabs .nav-tabs .nav-link {
  font-weight: 600 !important;
  color: #1e293b !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  padding: 12px 20px !important;
}

.product-tabs .nav-tabs .nav-link.active {
  color: #dc2626 !important;
  border-bottom-color: #dc2626 !important;
}

.product-reference .label,
.product-reference span {
  font-size: 13px !important;
  color: #64748b !important;
  font-family: 'Courier New', monospace !important;
}

/* ---------- Cart ---------- */
.cart-grid-body .card {
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.cart-total .value {
  color: #dc2626 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

/* ---------- Footer ---------- */
#footer {
  background: #0f172a !important;
  color: #ffffff !important;
  padding-top: 48px !important;
  margin-top: 48px !important;
}

#footer a {
  color: #94a3b8 !important;
  transition: color 0.2s ease;
}

#footer a:hover { color: #dc2626 !important; }

#footer h4, #footer .h4 {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 16px !important;
  text-transform: uppercase;
}

#footer .footer-container { border-top: none !important; }

/* ---------- Reassurance ---------- */
#block-reassurance {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 20px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

/* ---------- Pagination ---------- */
.pagination .page-item .page-link {
  border-radius: 10px !important;
  margin: 0 3px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0 !important;
}

.pagination .page-item.active .page-link {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: transparent !important;
  padding: 12px 0 !important;
  font-size: 13px !important;
}

.breadcrumb li a { color: #64748b !important; }
.breadcrumb li:last-child a,
.breadcrumb li:last-child span {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  #search_widget {
    min-width: 100% !important;
    max-width: 100% !important;
  }
  .products .product-miniature { margin-bottom: 16px !important; }
  .product-prices .current-price .price { font-size: 22px !important; }

  #_desktop_logo a::before { width: 42px; height: 42px; min-width: 42px; font-size: 22px; border-radius: 12px; }
  #_desktop_logo a::after { font-size: 20px; }
}

@media (max-width: 576px) {
  .container { padding-left: 10px !important; padding-right: 10px !important; }
}

/* ---------- Animation ---------- */
#content {
  animation: kh-fadeIn 0.3s ease-out;
}

@keyframes kh-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
