/* ==========================================================================
   ABU HAYYAN GADGETS STORE — stylesheet
   ========================================================================== */

:root {
  --primary: #12294d;
  --primary-dark: #0b1a33;
  --accent: #f5a623;
  --whatsapp: #25d366;
  --whatsapp-dark: #1ea952;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #1b2430;
  --text-muted: #5b6472;
  --border: #e3e8ef;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(18, 41, 77, 0.08);
  --shadow-hover: 0 8px 24px rgba(18, 41, 77, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; color: var(--primary); }
p { margin: 0 0 12px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}
.btn-whatsapp:hover { background: var(--whatsapp-dark); box-shadow: var(--shadow-hover); }

.btn-outline {
  background: transparent;
  border-color: #ffffff;
  color: #ffffff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-primary:hover { box-shadow: var(--shadow-hover); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.nav-whatsapp { flex-shrink: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .site-nav.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav ul li a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-whatsapp { margin: 14px 0 4px; align-self: flex-start; }
}

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 64px 0 72px;
}
.hero-inner { max-width: 720px; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 16px; }
.hero p { color: #d7deea; font-size: 1.08rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* ---------------- Sections ---------------- */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; font-size: 1.55rem; }
.section-head p { margin: 6px 0 0; color: var(--text-muted); }
.section-link { font-weight: 600; color: var(--primary); border-bottom: 2px solid var(--accent); white-space: nowrap; }

/* ---------------- Category grid ---------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.category-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.category-card .icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--primary);
}
.category-card h3 { font-size: 1rem; margin: 0; color: var(--text); }

/* ---------------- Product grid & cards ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: #f0f3f8;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: #eaf0fb;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.product-card h3 { font-size: 1rem; margin: 4px 0 0; }
.product-card .meta { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.product-card .price { font-weight: 700; color: var(--primary-dark); margin: 4px 0 10px; }
.product-card .price.contact { color: var(--text-muted); font-weight: 600; }
.product-card .btn { width: 100%; justify-content: center; margin-top: auto; }

/* ---------------- Filters (products page) ---------------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}
.filter-btn.active,
.filter-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------------- Product detail page ---------------- */
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: 40px;
  align-items: start;
}
.product-detail .thumb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-detail .thumb img { width: 100%; height: auto; object-fit: cover; }
.product-detail .info h1 { font-size: 1.7rem; margin-bottom: 8px; }
.product-detail .specs {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.product-detail .specs li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
}
.product-detail .specs li strong { display: block; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.product-detail .price { font-size: 1.4rem; font-weight: 800; color: var(--primary-dark); margin: 10px 0 20px; }
.product-detail .price.contact { color: var(--text-muted); }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.breadcrumb a { color: var(--primary); font-weight: 600; }

@media (max-width: 760px) {
  .product-detail { grid-template-columns: 1fr; }
}

/* ---------------- Why choose us ---------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.why-card { text-align: left; }
.why-card .icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 12px; }
.why-card h3 { font-size: 1.05rem; }
.why-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ---------------- FAQ ---------------- */
.faq-list { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
  color: var(--text-muted);
}
.faq-item.open .faq-answer { max-height: 400px; }
.faq-answer p { padding-bottom: 18px; margin: 0; }

/* ---------------- CTA banner ---------------- */
.cta-banner {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 56px 20px;
  border-radius: var(--radius);
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: #d7deea; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-banner .btn { margin-top: 18px; }

/* ---------------- Services & Cars list ---------------- */
.service-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.service-card .icon { width: 44px; height: 44px; margin-bottom: 14px; }
.service-card h3 { font-size: 1.1rem; }
.service-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------------- Contact / About page ---------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 26px 0;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.info-card h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); margin-bottom: 8px; }
.info-card p { margin: 0; font-weight: 600; }

/* ---------------- Guides hub ---------------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.guide-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.guide-card .tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: #eaf0fb;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.guide-card h3 { font-size: 1.05rem; margin: 4px 0 0; }
.guide-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.guide-card .read-more { font-weight: 600; color: var(--primary); font-size: 0.88rem; margin-top: auto; }

/* ---------------- Guide article body ---------------- */
.guide-meta { color: var(--text-muted); font-size: 0.85rem; margin: -6px 0 18px; }
.guide-content { max-width: 760px; }
.guide-content h2 { font-size: 1.35rem; margin-top: 36px; }
.guide-content h3 { font-size: 1.1rem; margin-top: 22px; }
.guide-content p, .guide-content li { font-size: 0.98rem; }
.guide-content ul, .guide-content ol { padding-left: 22px; margin: 0 0 16px; }
.guide-content li { margin-bottom: 8px; }
.guide-content .tip {
  background: #eaf0fb;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.92rem;
}
.guide-content .tip p:last-child { margin-bottom: 0; }
.guide-content table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.9rem; }
.guide-content th, .guide-content td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.guide-content th { color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.03em; }

.steps-list { list-style: none; margin: 0 0 24px; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 18px; }
.steps-list li { position: relative; padding-left: 46px; }
.steps-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.steps-list h3 { margin: 0 0 4px; font-size: 1rem; }
.steps-list p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--primary-dark); color: #cdd6e6; margin-top: 40px; }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding: 48px 20px;
}
.footer-col h3 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 14px; }
.footer-col p { color: #b3bdd0; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: #b3bdd0; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 16px 0; }
.footer-bottom p { margin: 0; font-size: 0.8rem; color: #8a96ac; text-align: center; }
.footer-bottom a { color: #b3bdd0; text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom a:hover { color: #fff; }

/* ---------------- Sticky WhatsApp button + nudge ---------------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.sticky-whatsapp {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  flex-shrink: 0;
}
.sticky-whatsapp:hover { background: var(--whatsapp-dark); }

.whatsapp-nudge {
  position: relative;
  max-width: 220px;
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  padding: 12px 30px 12px 14px;
  font-size: 0.86rem;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.whatsapp-nudge.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.whatsapp-nudge a { display: block; color: var(--text); }
.whatsapp-nudge a:hover { color: var(--whatsapp-dark); }
.whatsapp-nudge a strong { color: var(--whatsapp-dark); }
.whatsapp-nudge::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  transform: rotate(45deg);
  box-shadow: 3px 3px 6px rgba(18,41,77,0.06);
}
.whatsapp-nudge-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.whatsapp-nudge-close:hover { color: var(--text); }

@media (max-width: 480px) {
  .whatsapp-nudge { max-width: 180px; font-size: 0.82rem; }
}

/* ---------------- Misc ---------------- */
.text-center { text-align: center; }
.page-header { padding: 44px 0 8px; }
.page-header h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.page-header p { color: var(--text-muted); max-width: 680px; }
.empty-state { padding: 40px; text-align: center; color: var(--text-muted); }
