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

:root {
  --navy: #0B1F3A;
  --navy-2: #13294B;
  --accent: #C8372D;
  --green: #1A7F4B;
  --amber: #B06A00;
  --red: #C0392B;
  --bg: #EAEDED;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--navy); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1500px; margin: 0 auto; padding: 0 24px; }

/* header */
header.site-header { background: var(--navy); color: #fff; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 14px 24px; flex-wrap: wrap; }
.logo { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.logo .g-yellow { color: #FFD814; }
.logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.logo .sub { font-size: 12px; font-weight: 500; color: #B7C2D0; }

.search-form { flex: 1 1 380px; min-width: 220px; display: flex; height: 42px; border-radius: 6px; overflow: hidden; }
.search-form input { flex: 1; border: none; padding: 0 14px; font-size: 14px; outline: none; min-width: 0; }
.search-form button { background: var(--accent); border: none; width: 52px; display: flex; align-items: center; justify-content: center; }
.search-form button:hover { filter: brightness(1.1); }

.top-nav { display: flex; align-items: center; gap: 18px; font-size: 12px; margin-left: auto; }
.cart-link, .account-link { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; position: relative; background: none; border: none; color: #fff; cursor: pointer; }
.cart-count { background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; border-radius: 10px; padding: 1px 6px; position: absolute; top: -8px; right: -14px; display:none; }

.category-strip { background: var(--navy-2); overflow-x: auto; }
.category-strip .inner { display: flex; gap: 22px; padding: 10px 24px; white-space: nowrap; font-size: 13px; font-weight: 500; }
.category-strip a:hover { text-decoration: underline; }

/* hero */
.hero { background: linear-gradient(120deg, #0B1F3A 0%, #15335E 55%, #6E2027 130%); color: #fff; padding: 56px 24px; }
.hero .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 32px; }
.hero h1 { font-size: 42px; margin: 0 0 12px; font-weight: 800; line-height: 1.1; }
.hero p.lead { font-size: 18px; margin: 0 0 6px; color: #DCE3EC; max-width: 460px; }
.hero p.note { font-size: 13px; margin: 0 0 24px; color: #9FB0C6; font-weight: 600; letter-spacing: 0.3px; }
.hero .bar { width: 54px; height: 5px; background: var(--accent); margin-bottom: 18px; border-radius: 3px; }
.cta-btn { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; padding: 14px 30px; border-radius: 6px; font-size: 15px; border: none; }
.cta-btn:hover { filter: brightness(1.08); }

/* section headers */
.section { padding: 32px 24px 8px; }
.section .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section .head h2 { font-size: 20px; margin: 0; }
.section .head a { font-size: 13px; font-weight: 600; color: var(--accent); }

/* vehicle finder */
.vehicle-finder { background: #fff; border: 1px solid #E3E6E6; border-radius: 8px; padding: 20px 24px; }
.vehicle-finder h2 { font-size: 18px; margin: 0 0 2px; }
.vehicle-finder .sub { font-size: 13px; color: #6B7684; margin: 0 0 14px; }
.vehicle-finder-row { display: flex; flex-wrap: wrap; gap: 10px; }
.vehicle-finder-row select { flex: 1 1 200px; min-width: 160px; padding: 10px 12px; font-size: 14px; border: 1px solid #DDD; border-radius: 6px; background: #fff; }
.vehicle-finder-row select:disabled { background: #F5F6F7; color: #999; }
.vehicle-finder-row .cta-btn { flex: 0 0 auto; padding: 10px 24px; }
.vehicle-finder-row .cta-btn:disabled { background: #D9D9D9; cursor: not-allowed; }

/* category grid */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.cat-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; flex-direction: column; gap: 10px; }
.cat-card .thumb { background: #F5F6F7; border-radius: 6px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.cat-card .name { font-weight: 700; font-size: 14px; }
.cat-card .count { font-size: 12px; color: #6B7684; }

/* product rows / grids */
.scrollrow { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.prod-card { flex: 0 0 230px; background: #fff; border: 1px solid #E3E6E6; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.prod-grid .prod-card { flex: unset; }
.prod-card .thumb { background: #F5F6F7; border-radius: 6px; height: 150px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.prod-card .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.prod-card .title { font-size: 13px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.prod-card .price { font-size: 19px; font-weight: 800; }
.prod-card .stock { font-size: 12px; font-weight: 600; }
.stock.in { color: var(--green); }
.stock.low { color: var(--amber); }
.stock.last { color: var(--red); }
.prod-card .add-btn { margin-top: auto; text-align: center; border: 1.5px solid var(--accent); background: #fff; color: var(--accent); font-weight: 700; font-size: 13px; padding: 8px; border-radius: 6px; }
.prod-card .add-btn:hover { background: var(--accent); color: #fff; }
.prod-card a.view { font-size: 13px; font-weight: 500; color: var(--navy); }

/* category/listing page */
.listing-wrap { display: flex; gap: 24px; flex-wrap: wrap; padding: 24px; max-width: 1500px; margin: 0 auto; }
.breadcrumb { font-size: 12px; color: #6B7684; padding: 16px 24px 0; max-width: 1500px; margin: 0 auto; }
.breadcrumb .current { color: var(--navy); font-weight: 600; }
.filters { flex: 0 0 220px; background: #fff; border: 1px solid #E3E6E6; border-radius: 6px; padding: 16px; align-self: flex-start; }
.filters h3 { font-weight: 700; font-size: 14px; margin: 0 0 10px; }
.filters .group-label { font-weight: 600; font-size: 12px; color: #6B7684; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.filters label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #2B3A4A; padding: 5px 0; }
.listing-main { flex: 1 1 600px; min-width: 280px; }
.listing-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.listing-top select { font-size: 13px; border: 1px solid #DDD; border-radius: 4px; padding: 6px 10px; }

/* product detail */
.pdp-wrap { display: flex; gap: 40px; flex-wrap: wrap; padding: 32px 24px; max-width: 1200px; margin: 0 auto; }
.pdp-images { flex: 1 1 400px; }
.pdp-images .main-img { background: #F5F6F7; border-radius: 8px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pdp-images .main-img img { max-width: 90%; max-height: 90%; object-fit: contain; }
.pdp-info { flex: 1 1 360px; }
.pdp-info h1 { font-size: 24px; margin: 0 0 8px; }
.pdp-info .sku { font-size: 12px; color: #6B7684; margin-bottom: 16px; }
.pdp-info .price { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.pdp-info .desc { font-size: 14px; line-height: 1.6; color: #2B3A4A; margin: 16px 0; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-row input { width: 60px; padding: 8px; border: 1px solid #DDD; border-radius: 6px; text-align: center; }
.buy-btn { background: var(--accent); color: #fff; border: none; padding: 14px 28px; border-radius: 6px; font-weight: 700; font-size: 15px; }
.buy-btn:hover { filter: brightness(1.08); }
.buy-btn[disabled] { background: #B9C0C8; cursor: not-allowed; }

/* footer */
footer.site-footer { background: var(--navy); color: #DCE3EC; margin-top: 40px; }
.footer-grid { max-width: 1500px; margin: 0 auto; padding: 40px 24px 20px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 28px; }
.footer-grid h4 { font-weight: 700; font-size: 13px; color: #fff; margin-bottom: 10px; }
.footer-grid .col a { display: block; font-size: 13px; color: #9FB0C6; padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 16px 24px; text-align: center; font-size: 12px; color: #7E8FA6; }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: #fff; padding: 14px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: 0 4px 16px rgba(0,0,0,0.25); display: flex; align-items: center; gap: 14px; transform: translateY(20px); opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50; }
.toast.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.toast a { color: var(--accent); font-weight: 800; }

.loading-row { padding: 24px; text-align: center; color: #6B7684; font-size: 14px; }

@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero h1 { font-size: 32px; }
}
