:root{
  --primary:#0d6efd;
  --success:#198754;
  --dark:#1f2937;
  --light:#f8f9fa;
  --white:#ffffff;
  --muted:#6c757d;
}

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

html,body{
  height:100%;
}

body{
  display:flex;
  flex-direction:column;
  font-family:"Segoe UI", Roboto, sans-serif;
  background:var(--light);
  color:var(--dark);
}

main{
  flex:1;
}

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

/* HEADER */
header{
  background:var(--primary);
  color:#fff;
  text-align:center;
  padding:8px;
  font-size:.9rem;
}

/* NAVBAR */
.navbar{
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.navbar-brand{
  font-weight:700;
  color:var(--primary)!important;
  font-size:1.3rem;
}

/* SEARCH */
.search-bar{
  max-width:700px;
  margin:1.5rem auto;
  padding:0 12px;
}

.search-bar input,
.search-bar button{
  border-radius:12px;
}

.search-bar input{
  height:48px;
  font-size:16px;
}

.search-bar button{
  height:48px;
  padding:0 18px;
  font-size:16px;
  white-space:nowrap;
  flex:0 0 auto;
}

/* CATEGORY */
.category-icons{
  margin:2rem 0;
  text-align:center;
  position:relative;
  z-index:5;
}

.row-cats{
  display:flex;
  justify-content:center;
  gap:24px;
  flex-wrap:wrap;
}

.icon-box{
  background:#fff;
  border-radius:16px;
  width:260px;
  min-height:160px;
  padding:16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  box-shadow:0 4px 10px rgba(0,0,0,.05);
  transition:transform .25s ease, box-shadow .25s ease;
  color:var(--dark);
  text-decoration:none;
  cursor:pointer;
  flex:0 0 260px;
}

.icon-box:hover{
  transform:translateY(-4px);
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}

.icon-box i,
.icon-box svg,
.icon-box img{
  display:block;
  margin:0 auto 12px;
}

.icon-box i{
  font-size:2rem;
  color:var(--primary);
}

.icon-box h6{
  font-weight:700;
  margin:0;
}

/* PRODUCT CARD */
.product-card{
  height:100%;
  display:flex;
  flex-direction:column;
  border:none;
  border-radius:15px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  transition:transform .25s ease, box-shadow .25s ease;
  will-change:transform;
}

.product-card:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 28px rgba(0,0,0,.12);
}

.product-card img{
  width:100%;
  height:220px;
  object-fit:cover;
  background:#f1f1f1;
}

.product-brand{
  font-size:.75rem;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
}

.product-title{
  font-size:1rem;
  font-weight:600;
}

.product-price{
  font-size:1.25rem;
  font-weight:800;
  color:var(--success);
}

.btn-fixed{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:48px;
  padding:0 18px;
  font-size:16px;
  font-weight:600;
  border-radius:12px;
  white-space:nowrap;
  flex:0 0 auto;
}

.btn-cart{
  margin-top:auto;
  background:var(--primary);
  color:#fff;
  border:none;
}

/* FOOTER */
footer{
  background:var(--primary);
  color:#fff;
  text-align:center;
  padding:1.5rem 1rem;
  position:relative;
  z-index:2;
}

footer .container{
  max-width:1100px;
  margin:0 auto;
}

footer a,
footer a:visited{
  color:#fff !important;
  text-decoration:none;
}

footer a:hover{
  color:#fff !important;
  text-decoration:underline;
}

/* CART */
#cartPanel .offcanvas-body{
  overflow-x:hidden;
}

#cartPanel .cart-thumb{
  width:56px!important;
  height:56px!important;
  min-width:56px;
  min-height:56px;
  object-fit:cover;
  border-radius:10px;
  display:block;
  background:#eee;
}

#cartPanel img{
  max-width:100%;
  height:auto;
}

/* LOGOS */
.brand-logo{
  max-height:60px;
  width:auto;
  object-fit:contain;
}

.car-logo{
  height:26px;
  width:auto;
  max-width:100%;
  display:block;
  filter:grayscale(15%);
  opacity:.95;
}

/* TITLES */
.section-title{
  font-size:clamp(24px, 3vw, 36px);
}

/* MODEL HOVER */
.model-hover{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  z-index:10;
}

.model-hover .model-link{
  text-decoration:none;
  color:inherit;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  width:100%;
  height:100%;
}

.ghost-menu{
  position:absolute;
  top:calc(100% + 12px);
  left:50%;
  transform:translateX(-50%);
  width:640px;
  max-width:min(92vw, 760px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,0.90);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border:1px solid rgba(31,41,55,0.10);
  box-shadow:0 12px 40px rgba(0,0,0,0.14);
  z-index:9999;
  transition:160ms ease;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:10px;
  max-height:260px;
  overflow:auto;
}

.model-hover:hover .ghost-menu{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.ghost-item{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  border-radius:12px;
  text-decoration:none;
  background:rgba(31,41,55,0.03);
  border:1px solid rgba(31,41,55,0.06);
  transition:140ms ease;
}

.ghost-item:hover{
  background:rgba(13,110,253,0.10);
  border-color:rgba(13,110,253,0.18);
  transform:translateY(-1px);
}

.ghost-item:hover .car-logo{
  filter:grayscale(0%);
  opacity:1;
}

/* RESPONSIVE */
@media (max-width: 768px){
  .icon-box{
    width:100%;
    max-width:320px;
    flex:0 0 100%;
  }

  .product-card img{
    height:200px;
  }
}

@media (max-width: 991.98px){
  .ghost-menu{
    width:min(92vw, 640px);
  }
}