/*
Theme Name: BAMKA Car Accessories
Theme URI: https://bca.ma
Author: BAMKA Car Accessories
Description: Boutique en ligne d'accessoires auto a Meknes. Theme WooCommerce bilingue (Francais / Arabe) avec paiement a la livraison. / متجر إكسسوارات السيارات بمكناس - الدفع عند الاستلام.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: bamka
Tags: e-commerce, woocommerce, custom-colors, custom-logo, rtl-language-support, translation-ready
*/

:root {
  --navy: #0e2148;
  --navy-800: #16305f;
  --gold: #c39a4a;
  --gold-light: #e0bd74;
  --ink: #12182a;
  --muted: #5d6880;
  --line: #e6e8ef;
  --bg: #ffffff;
  --bg-soft: #f6f7fa;
  --radius: 10px;
  --shadow: 0 10px 30px -18px rgba(14, 33, 72, .55);
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Cairo", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
.container { width: min(1200px, 92%); margin-inline: auto; }
.ar { font-size: .9em; color: var(--muted); direction: rtl; unicode-bidi: isolate; }

/* Buttons */
.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  border-radius: var(--radius);
  padding: .7rem 1.4rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); }

/* Topbar */
.topbar { background: var(--navy); color: #dfe4ef; font-size: .85rem; }
.topbar .container { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; padding: .5rem 0; }
.topbar a { color: var(--gold-light); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 1rem; justify-content: space-between; padding: .8rem 0; }
.site-brand img { max-height: 62px; width: auto; }
.site-brand .brand-text { font-family: var(--font-head); font-size: 1.4rem; color: var(--navy); font-weight: 700; }
.main-nav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; padding: .4rem 0; border-bottom: 2px solid transparent; }
.main-nav .current-menu-item > a { border-bottom-color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link { position: relative; font-weight: 600; }
.cart-count { background: var(--gold); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; margin-inline-start: .25rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .45rem .7rem; font-size: 1.1rem; }

/* Hero */
.hero { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-800) 60%, #24406f 100%); color: #fff; padding: 4.5rem 0; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.hero p { color: #d7dcea; max-width: 46ch; }
.hero .ar { color: var(--gold-light); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero .btn-ghost { color: #fff; border-color: #fff; }
.hero .btn-ghost:hover { background: #fff; color: var(--navy); }

/* Feature strip */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2.2rem 0; }
.feature { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.feature strong { display: block; color: var(--navy); }

/* Sections */
.section { padding: 3rem 0; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.section-head .rule { width: 70px; height: 3px; background: var(--gold); margin: .8rem auto 0; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.cat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; background: #fff; box-shadow: var(--shadow); }
.cat-card h3 { margin-bottom: .2rem; }

/* Products */
.woocommerce ul.products li.product { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; text-align: center; background: #fff; }
.woocommerce ul.products li.product .price { color: var(--navy); font-weight: 700; }
.woocommerce span.onsale { background: var(--gold); border-radius: 999px; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info { border-top-color: var(--gold); }
.woocommerce div.product .product_title { font-family: var(--font-head); }

/* COD banner */
.cod-banner { background: var(--bg-soft); border-block: 1px solid var(--line); padding: 2rem 0; text-align: center; }
.cod-banner h2 { margin-bottom: .2rem; }

/* Content pages */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 2.4rem 0; }
.content-area { padding: 2.5rem 0; }
.entry-content { max-width: 74ch; }
.entry-content ul { padding-inline-start: 1.2rem; }

/* Contact / info cards */
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; background: #fff; }

/* Footer */
.site-footer { background: var(--navy); color: #c8d0e0; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; padding: 3rem 0; }
.site-footer h4 { color: #fff; font-family: var(--font-head); }
.site-footer a { color: #c8d0e0; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1rem 0; font-size: .85rem; text-align: center; }

/* RTL helper */
html[dir="rtl"] body { font-family: var(--font-body); }

@media (max-width: 900px) {
  .features, .cat-grid, .info-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .features, .cat-grid, .info-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .4rem; padding-bottom: .8rem; }
  .header-inner { flex-wrap: wrap; }
}
