:root {
  --prime-red: #ED1C24;
  --prime-crimson: #CB000C;
  --prime-deep: #AA0000;
  --prime-dark: #171717;
  --prime-charcoal: #262626;
  --prime-muted: #6f6f6f;
  --prime-border: #e8e8e8;
  --prime-surface: #f7f7f7;
  --prime-white: #ffffff;
  --prime-shadow: 0 14px 36px rgba(20, 20, 20, 0.08);
  --prime-radius: 14px;
}

html { scroll-behavior: smooth; }
body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--prime-dark);
  background: #fff;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--prime-red); }
img { max-width: 100%; }

.topbar {
  background: linear-gradient(90deg, var(--prime-deep), var(--prime-crimson));
  color: #fff;
  font-size: .83rem;
  letter-spacing: .01em;
}
.topbar a { color: #fff; opacity: .92; }
.topbar a:hover { opacity: 1; }
.topbar .divider { opacity: .35; margin: 0 .55rem; }

.main-header {
  background: #fff;
  border-bottom: 1px solid var(--prime-border);
}
.brand-logo { width: 170px; height: auto; }
.header-search .form-control {
  border: 1px solid #dadada;
  min-height: 48px;
  border-radius: 9px 0 0 9px;
  box-shadow: none;
}
.header-search .btn {
  border-radius: 0 9px 9px 0;
  min-width: 54px;
}
.header-action {
  width: 44px;
  height: 44px;
  border: 1px solid #dfdfdf;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  transition: .2s ease;
  position: relative;
}
.header-action:hover { border-color: var(--prime-red); color: var(--prime-red); transform: translateY(-1px); }
.cart-count {
  position: absolute;
  right: -7px;
  top: -8px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--prime-red);
  font-size: .68rem;
  font-weight: 700;
  border: 2px solid #fff;
}

.navbar-prime {
  background: var(--prime-dark);
  padding: 0;
}
.navbar-prime .navbar-nav .nav-link {
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  padding: 1rem 1.15rem;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.navbar-prime .navbar-nav .nav-link:hover,
.navbar-prime .navbar-nav .nav-link.active { background: var(--prime-red); color: #fff; }
.category-menu-btn {
  border: 0;
  color: #fff;
  background: var(--prime-red);
  padding: 1rem 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  min-width: 220px;
}
.navbar-toggler { border-color: rgba(255,255,255,.35); }
.navbar-toggler:focus { box-shadow: none; }

.hero-wrap { background: #f3f3f3; }
.hero-carousel { overflow: hidden; border-radius: 0 0 18px 18px; box-shadow: var(--prime-shadow); }
.hero-carousel .carousel-item img { width: 100%; min-height: 300px; object-fit: cover; }
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next { width: 8%; }
.hero-carousel .carousel-indicators [data-bs-target] { width: 9px; height: 9px; border-radius: 50%; }

.trust-card {
  border: 1px solid var(--prime-border);
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: .9rem;
  height: 100%;
  transition: .2s ease;
}
.trust-card:hover { border-color: rgba(237,28,36,.45); box-shadow: 0 10px 24px rgba(0,0,0,.06); }
.trust-icon {
  width: 48px; height: 48px; flex: 0 0 48px;
  border-radius: 50%;
  background: rgba(237,28,36,.10);
  color: var(--prime-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.trust-card h6 { margin: 0; font-weight: 700; font-size: .91rem; }
.trust-card p { margin: 0; color: var(--prime-muted); font-size: .78rem; }

.section-space { padding: 4.25rem 0; }
.section-space-sm { padding: 2.75rem 0; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.section-title h2, .section-title h3 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.section-title h2::before, .section-title h3::before {
  content: "";
  width: 9px; height: 9px;
  border: 3px solid var(--prime-red);
  border-radius: 50%;
  display: inline-block;
  margin-right: .65rem;
  vertical-align: .13em;
}
.section-link { color: var(--prime-red); font-weight: 700; font-size: .85rem; }

.category-card {
  background: #fff;
  border: 1px solid var(--prime-border);
  border-radius: 13px;
  padding: 1.25rem .9rem;
  text-align: center;
  transition: .24s ease;
  height: 100%;
}
.category-card:hover { transform: translateY(-5px); box-shadow: var(--prime-shadow); border-color: rgba(237,28,36,.35); }
.category-card .icon-wrap {
  width: 72px; height: 72px;
  margin: 0 auto .85rem;
  background: #f4f4f4;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--prime-red);
}
.category-card h6 { font-weight: 700; margin: 0 0 .15rem; }
.category-card span { font-size: .78rem; color: var(--prime-muted); }

.product-card {
  background: #fff;
  border: 1px solid var(--prime-border);
  border-radius: 13px;
  overflow: hidden;
  height: 100%;
  position: relative;
  transition: .24s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--prime-shadow); border-color: rgba(237,28,36,.3); }
.product-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: .27rem .55rem;
  border-radius: 6px;
  background: var(--prime-red);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .03em;
}
.product-card .product-image {
  background: #fafafa;
  aspect-ratio: 1.34 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}
.product-card .product-image img { width: 100%; height: 100%; object-fit: contain; transition: .25s ease; }
.product-card:hover .product-image img { transform: scale(1.04); }
.product-card .card-body { padding: 1rem; }
.product-category { font-size: .72rem; color: var(--prime-red); font-weight: 700; text-transform: uppercase; letter-spacing: .055em; }
.product-card h5 { font-size: .96rem; line-height: 1.35; font-weight: 700; min-height: 2.6em; margin: .35rem 0 .55rem; }
.rating { color: #f4a900; font-size: .76rem; letter-spacing: 1px; }
.rating span { color: var(--prime-muted); letter-spacing: 0; margin-left: .25rem; }
.price { font-size: 1.07rem; font-weight: 800; color: var(--prime-deep); }
.old-price { color: #9d9d9d; font-size: .8rem; text-decoration: line-through; margin-left: .35rem; }
.btn-add {
  border: 0;
  width: 38px; height: 38px;
  border-radius: 9px;
  color: #fff;
  background: var(--prime-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}
.btn-add:hover { background: var(--prime-deep); transform: translateY(-1px); color: #fff; }

.btn-prime {
  color: #fff;
  background: linear-gradient(135deg, var(--prime-red), var(--prime-crimson));
  border: 1px solid var(--prime-red);
  font-weight: 700;
  border-radius: 9px;
  padding: .7rem 1.15rem;
}
.btn-prime:hover { color: #fff; background: var(--prime-deep); border-color: var(--prime-deep); }
.btn-outline-prime { color: var(--prime-red); border: 1px solid var(--prime-red); font-weight: 700; border-radius: 9px; }
.btn-outline-prime:hover { color: #fff; background: var(--prime-red); }

.promo-banner { overflow: hidden; border-radius: 15px; box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.promo-banner img { width: 100%; display: block; }

.sidebar-panel {
  border: 1px solid var(--prime-border);
  border-radius: 13px;
  overflow: hidden;
  background: #fff;
  margin-bottom: 1.25rem;
}
.sidebar-panel .panel-title {
  background: var(--prime-dark);
  color: #fff;
  padding: .8rem 1rem;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .045em;
  font-weight: 800;
  margin: 0;
}
.sidebar-panel .panel-body { padding: 1rem; }
.sidebar-product { display: flex; gap: .8rem; padding: .75rem 0; border-bottom: 1px solid #eee; }
.sidebar-product:last-child { border-bottom: 0; }
.sidebar-product img { width: 62px; height: 62px; object-fit: contain; background: #f7f7f7; border-radius: 8px; }
.sidebar-product h6 { font-size: .78rem; line-height: 1.35; margin: 0 0 .25rem; }
.sidebar-product .price { font-size: .82rem; }
.sale-panel {
  min-height: 315px;
  background: linear-gradient(180deg, #f6f6f6, #e8e8e8);
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  position: relative;
  padding: 1.25rem;
  text-align: center;
  overflow: hidden;
}
.sale-panel::before {
  content: "";
  width: 180px; height: 260px;
  background: linear-gradient(145deg, #161616, #555);
  border-radius: 85px 85px 25px 25px;
  position: absolute;
  top: 34px;
  opacity: .92;
}
.sale-panel::after {
  content: "35% OFF";
  position: absolute;
  right: 18px; top: 25px;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--prime-red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .82rem;
}
.sale-panel .sale-copy { position: relative; z-index: 2; background: rgba(255,255,255,.92); padding: .75rem 1rem; border-radius: 9px; width: 100%; }

.blog-card { border: 1px solid var(--prime-border); border-radius: 13px; overflow: hidden; background: #fff; height: 100%; transition: .24s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--prime-shadow); }
.blog-card img { width: 100%; aspect-ratio: 1.58/1; object-fit: cover; }
.blog-card .card-body { padding: 1.1rem; }
.blog-card .meta { color: var(--prime-red); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; font-size: .7rem; }
.blog-card h5 { font-size: 1rem; font-weight: 800; line-height: 1.45; margin: .4rem 0 .45rem; }
.blog-card p { color: var(--prime-muted); font-size: .84rem; margin-bottom: .5rem; }

.brand-strip {
  border-top: 1px solid var(--prime-border);
  border-bottom: 1px solid var(--prime-border);
  background: #fff;
}
.brand-item {
  font-weight: 800;
  color: #777;
  letter-spacing: .12em;
  text-align: center;
  padding: 1.25rem .5rem;
  filter: grayscale(1);
}
.brand-item:hover { color: var(--prime-red); filter: none; }

.page-hero {
  background: linear-gradient(135deg, var(--prime-deep), var(--prime-red));
  color: #fff;
  padding: 3.25rem 0;
  position: relative;
  overflow: hidden;
}
.page-hero::before, .page-hero::after { content:""; position:absolute; border-radius:50%; background:#fff; opacity:.06; }
.page-hero::before { width:220px; height:220px; right:8%; top:-80px; }
.page-hero::after { width:160px; height:160px; right:24%; bottom:-100px; }
.page-hero h1 { font-weight: 800; letter-spacing: -.03em; }
.breadcrumb { margin: 0; }
.breadcrumb-item, .breadcrumb-item a { color: rgba(255,255,255,.86); }
.breadcrumb-item.active { color: #fff; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

.filter-card, .content-card {
  border: 1px solid var(--prime-border);
  border-radius: var(--prime-radius);
  background: #fff;
  padding: 1.25rem;
}
.filter-title { font-size: .86rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .85rem; }
.form-check-input:checked { background-color: var(--prime-red); border-color: var(--prime-red); }
.form-control:focus, .form-select:focus { border-color: rgba(237,28,36,.55); box-shadow: 0 0 0 .25rem rgba(237,28,36,.1); }

.product-detail-image { background: #f8f8f8; border: 1px solid var(--prime-border); border-radius: 16px; padding: 2rem; }
.product-detail-image img { width: 100%; max-height: 510px; object-fit: contain; }
.product-detail-title { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.detail-price { font-size: 1.7rem; font-weight: 900; color: var(--prime-deep); }
.spec-list { padding: 0; list-style: none; }
.spec-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px dashed #ddd; }
.spec-list li span:first-child { color: var(--prime-muted); }
.qty-group { max-width: 130px; }
.qty-group .btn { border-color: #ddd; }

.dealer-card, .contact-card {
  border: 1px solid var(--prime-border);
  border-radius: 14px;
  padding: 1.3rem;
  background: #fff;
  height: 100%;
  transition: .2s ease;
}
.dealer-card:hover, .contact-card:hover { box-shadow: var(--prime-shadow); border-color: rgba(237,28,36,.3); }
.dealer-card .dealer-icon, .contact-card .contact-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(237,28,36,.1); color: var(--prime-red);
  display:flex; align-items:center; justify-content:center; font-size:1.2rem; margin-bottom: .9rem;
}

.cart-table .product-thumb { width: 72px; height: 72px; background: #f7f7f7; border-radius: 9px; object-fit: contain; }
.cart-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--prime-muted); }
.cart-summary { border: 1px solid var(--prime-border); border-radius: 14px; padding: 1.35rem; background: #fff; }
.summary-line { display: flex; justify-content: space-between; padding: .55rem 0; }
.summary-total { border-top: 1px solid #ddd; margin-top: .5rem; padding-top: 1rem; font-size: 1.15rem; font-weight: 800; }

.checkout-step { display: flex; align-items: center; gap: .65rem; color: var(--prime-muted); }
.checkout-step .num { width: 32px; height: 32px; border-radius: 50%; background: #ececec; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.checkout-step.active { color: var(--prime-red); }
.checkout-step.active .num { background: var(--prime-red); color: #fff; }

.article-content h2, .article-content h3 { font-weight: 800; margin-top: 1.6rem; }
.article-content p { color: #4f4f4f; }
.article-content blockquote { border-left: 4px solid var(--prime-red); background: #f8f8f8; padding: 1rem 1.25rem; border-radius: 0 10px 10px 0; font-weight: 600; }

.footer-services { background: #2d2d2d; color: #fff; }
.footer-service { display:flex; align-items:center; gap:.8rem; padding: 1.25rem 0; }
.footer-service i { color: var(--prime-red); font-size: 1.25rem; }
.footer-service h6 { margin: 0; font-weight: 700; font-size: .83rem; }
.footer-service p { margin: 0; color: #bcbcbc; font-size: .72rem; }
.main-footer { background: #1d1d1d; color: #aaa; }
.footer-logo { width: 150px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.footer-title { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .045em; font-size: .82rem; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a { color: #aaa; font-size: .82rem; }
.footer-links a:hover { color: #fff; }
.social-link { width: 35px; height: 35px; border-radius: 50%; background: #333; color: #fff; display:inline-flex; align-items:center; justify-content:center; margin-right:.35rem; }
.social-link:hover { background: var(--prime-red); color: #fff; }
.footer-bottom { border-top: 1px solid #333; font-size: .76rem; }
.payment-badge { display: inline-block; padding: .25rem .45rem; background: #fff; color: #222; border-radius: 4px; font-size: .65rem; font-weight: 800; margin-left: .25rem; }

.toast-container { z-index: 1090; }
.prime-toast { background: #1f1f1f; color: #fff; border: 0; }
.prime-toast .toast-header { background: var(--prime-red); color: #fff; border: 0; }

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--prime-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(237,28,36,.28);
  display: none;
  z-index: 1040;
}
.back-to-top:hover { background: var(--prime-deep); }

.empty-state { text-align:center; padding: 3rem 1rem; border: 1px dashed #ccc; border-radius: 14px; background: #fafafa; }
.empty-state i { font-size: 2.4rem; color: var(--prime-red); margin-bottom: 1rem; }

@media (max-width: 991.98px) {
  .brand-logo { width: 145px; }
  .navbar-prime { padding: .4rem 0; }
  .navbar-prime .navbar-nav .nav-link { padding: .75rem 1rem; }
  .category-menu-btn { min-width: auto; padding: .8rem 1rem; }
  .hero-carousel .carousel-item img { min-height: 280px; }
  .section-space { padding: 3.25rem 0; }
}

@media (max-width: 767.98px) {
  .topbar .topbar-links { display: none; }
  .brand-logo { width: 138px; }
  .hero-carousel { border-radius: 0 0 12px 12px; }
  .hero-carousel .carousel-item img { min-height: 220px; }
  .section-title h2, .section-title h3 { font-size: 1.25rem; }
  .page-hero { padding: 2.4rem 0; }
  .product-detail-title { font-size: 1.6rem; }
  .footer-service { padding: .85rem 0; }
  .cart-table { min-width: 700px; }
}

@media (max-width: 575.98px) {
  .header-action { width: 40px; height: 40px; }
  .hero-carousel .carousel-item img { min-height: 180px; }
  .section-space { padding: 2.6rem 0; }
  .product-card h5 { min-height: auto; }
  .trust-card { padding: .8rem; }
}
