/* ============================================================
   HYPER TOOL SHOP — Modern Industrial Stylesheet
   فروشگاه ابزارآلات و لوازم ساختمانی خبیری
   Steel + Safety Orange • Workshop atmosphere • Soft motion
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap');

:root {
  /* Brand — industrial steel + safety orange */
  --color-primary: #e85d04;
  --color-primary-light: #f48c06;
  --color-primary-dark: #dc2f02;
  --color-ink: #1a2332;
  --color-ink-soft: #2c3a4f;
  --color-secondary: #c1121f;
  --color-accent: #ffb703;
  --color-success: #2a9d8f;
  --color-warning: #e85d04;
  --color-info: #457b9d;

  --color-bg: #eef0f3;
  --color-bg-card: #ffffff;
  --color-bg-header: #ffffff;
  --color-bg-footer: #121820;
  --color-bg-muted: #e4e7ec;
  --color-bg-steel: #1a2332;

  --color-text: #161c24;
  --color-text-muted: #5c6570;
  --color-text-light: #8b949e;

  --color-border: #d8dde4;
  --color-border-dark: #c5cad3;

  --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.05);
  --shadow: 0 4px 14px rgba(26, 35, 50, 0.07);
  --shadow-md: 0 12px 28px rgba(26, 35, 50, 0.1);
  --shadow-lg: 0 20px 40px rgba(26, 35, 50, 0.12);
  --shadow-xl: 0 28px 56px rgba(26, 35, 50, 0.16);
  --shadow-glow: 0 8px 24px rgba(232, 93, 4, 0.28);

  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --radius-lg: 0.9rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --font: 'Vazirmatn', 'Tahoma', sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Bootstrap bridge */
  --bs-primary: #e85d04;
  --bs-primary-rgb: 232, 93, 4;
  --bs-link-color: #e85d04;
  --bs-link-hover-color: #dc2f02;
  --bs-body-font-family: var(--font);
  --bs-body-color: var(--color-text);
  --bs-body-bg: var(--color-bg);
  --bs-border-radius: var(--radius-md);
  --bs-warning: #e85d04;
  --bs-danger: #c1121f;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 100% -20%, rgba(232, 93, 4, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(26, 35, 50, 0.04), transparent);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, .h1 { font-size: 2.15rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
h2, .h2 { font-size: 1.55rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
h3, .h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
h4, .h4 { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
h5, .h5 { font-size: 1rem; font-weight: 600; line-height: 1.5; }
h6, .h6 { font-size: 0.9rem; font-weight: 600; line-height: 1.5; }

a { color: var(--color-primary); transition: color 0.2s var(--ease-out); }
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; }

/* ===== Utilities ===== */
.text-humanized-sm { font-size: 0.875rem; }
.text-humanized-lg { font-size: 1.0625rem; }
.text-humanized-xl { font-size: 1.1875rem; }
.xsmall { font-size: 0.75rem; }
.bg-primary-dark { background-color: var(--color-ink) !important; }
.bg-steel { background-color: var(--color-bg-steel) !important; }
.text-ink { color: var(--color-ink) !important; }
.section-padding { padding: 2.75rem 0; }
.section-padding-lg { padding: 4.5rem 0; }
.section-padding-sm { padding: 1.25rem 0; }
.min-vh-60 { min-height: 60vh; }
.min-vh-75 { min-height: 75vh; }
.h-40px { height: 40px; width: auto; }

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 1.35em;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* Reveal motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRtl {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.reveal { animation: fadeUp 0.7s var(--ease-out) both; }
.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Cards ===== */
.card-borderless {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.card-borderless:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-card);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
  border-color: rgba(232, 93, 4, 0.35);
}
.product-card a.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-card .product-title { color: var(--color-text); }
a.product-link:hover .product-title,
.product-card:hover .product-title { color: var(--color-primary); }
.product-card .product-img {
  width: 100%;
  height: 168px;
  object-fit: contain;
  padding: 1.1rem;
  background:
    linear-gradient(145deg, #f7f8fa 0%, #eef0f3 100%);
  transition: transform 0.45s var(--ease-out);
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-card .product-info {
  padding: 1rem 1.1rem 1.15rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.product-card .product-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  line-height: 1.45;
}
.product-card .product-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  flex-grow: 1;
}
.product-card .product-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-ink);
  margin-bottom: 0.2rem;
}
.product-card .product-old-price,
.product-card .price-old {
  font-size: 0.82rem;
  text-decoration: line-through;
  color: var(--color-text-muted);
}
.product-card .product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}
.product-badge-sale .badge {
  background: var(--color-secondary) !important;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.55rem;
}

.badge-primary-custom {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}
.badge-discount { background: var(--color-secondary); color: #fff; }
.badge-new { background: var(--color-success); color: #fff; }
.badge-popular { background: var(--color-accent); color: var(--color-ink); }

/* ===== Buttons ===== */
.btn {
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.62rem 1.3rem;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.25);
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-secondary {
  background: var(--color-secondary);
  border: none;
  color: #fff;
}
.btn-secondary:hover {
  background: #9b0d18;
  color: #fff;
}
.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
}
.btn-outline-primary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.btn-outline-secondary {
  border: 1.5px solid var(--color-border-dark);
  color: var(--color-ink);
  background: transparent;
}
.btn-outline-secondary:hover {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: #fff;
}
.btn-sm-custom { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg-custom { padding: 0.85rem 1.9rem; font-size: 1rem; }

/* ===== Forms ===== */
.form-control,
.form-select {
  border-radius: var(--radius-md);
  border-color: var(--color-border);
  padding: 0.65rem 1rem;
  font-family: var(--font);
}
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 0.2rem rgba(232, 93, 4, 0.18);
}
.input-group-text {
  background: var(--color-bg);
  border-color: var(--color-border);
}

/* ===== Header / Navbar ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.site-header .top-bar,
.bg-primary-dark {
  background: var(--color-ink) !important;
  font-size: 0.8rem;
}

.main-bar { position: relative; z-index: 2; }

.navbar {
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--color-border);
}
.navbar-brand,
.site-header .navbar-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--color-ink) !important;
}
.navbar .navbar-brand i,
.brand-mark i {
  color: var(--color-primary);
}
.navbar .nav-link {
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.55rem 0.85rem;
  color: var(--color-ink-soft) !important;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background 0.2s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--color-primary) !important;
  background: rgba(232, 93, 4, 0.08);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--color-ink), var(--color-ink-soft));
  color: var(--color-primary);
  font-size: 1.25rem;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.search-container .form-control {
  border-radius: var(--radius-full);
  padding-inline-end: 2.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
.search-container .btn {
  border-radius: var(--radius-full) !important;
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Mega Nav Bar ===== */
.mega-nav {
  display: block;
  background: var(--color-ink);
  position: relative;
  z-index: 3;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: visible;
}
@media (max-width: 767.98px) {
  .mega-nav,
  .mega-nav.mega-nav-desktop {
    display: none !important;
  }
}
.mega-nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.mega-nav-list::-webkit-scrollbar { display: none; }

.mega-nav-item {
  position: static;
  flex-shrink: 0;
}
.mega-nav-item.has-mega { position: static; }

.mega-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.mega-nav-link i:first-child { opacity: 0.9; }
.mega-caret {
  font-size: 0.65rem;
  opacity: 0.65;
  transition: transform 0.25s var(--ease-out);
}
.mega-nav-item.has-mega:hover .mega-caret { transform: rotate(180deg); }
.mega-nav-link:hover,
.mega-nav-item.has-mega:hover > .mega-nav-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-bottom-color: var(--color-primary);
}
.mega-nav-hot {
  color: var(--color-accent) !important;
}
.mega-nav-hot:hover {
  color: #fff !important;
  background: var(--color-primary) !important;
  border-bottom-color: var(--color-accent) !important;
}

.mega-panel {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  width: 100%;
  max-width: none;
  background: #fff;
  box-shadow: var(--shadow-xl);
  border-top: 3px solid var(--color-primary);
  padding: 1.75rem 1.5rem 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
  z-index: 1060;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.mega-nav-item.has-mega.is-open > .mega-panel,
.mega-nav-item.has-mega:hover > .mega-panel,
.mega-panel:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.mega-panel-sm {
  width: min(720px, 94vw);
  max-width: 720px;
  margin-inline-start: auto;
  margin-inline-end: 1rem;
  left: auto;
  right: 1rem;
}

.mega-heading {
  font-weight: 800;
  color: var(--color-ink);
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(232, 93, 4, 0.2);
}
.mega-link {
  display: block;
  padding: 0.4rem 0;
  color: var(--color-text);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.2s ease, padding 0.2s ease;
}
.mega-link:hover {
  color: var(--color-primary);
  padding-inline-start: 0.4rem;
}
.mega-promo {
  background: linear-gradient(160deg, #f7f8fa, #eef0f3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mega-promo img {
  max-height: 120px;
  object-fit: contain;
  margin-inline: auto;
}

/* Legacy mega-menu (keep for any leftover markup) */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-xl);
  border-top: 3px solid var(--color-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.28s var(--ease-out);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  z-index: 1050;
}
.navbar-item:hover .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-menu .mega-column h6,
.mega-menu h6 {
  font-weight: 800;
  color: var(--color-ink);
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.mega-menu .mega-link {
  display: block;
  padding: 0.4rem 0;
  color: var(--color-text);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease, padding 0.2s ease;
}
.mega-menu .mega-link:hover {
  color: var(--color-primary);
  padding-right: 0.45rem;
}

/* ===== Category Sidebar ===== */
.category-sidebar {
  width: 240px;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.category-sidebar .category-item {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--color-text);
}
.category-sidebar .category-item:last-child { border-bottom: none; }
.category-sidebar .category-item:hover {
  background: var(--color-primary);
  color: #fff;
}
.category-sidebar .category-item:hover i { color: #fff; }
.category-sidebar .category-item i {
  margin-left: 0.7rem;
  color: var(--color-primary);
  min-width: 1.2rem;
}

/* ===== Breadcrumb / Pagination / Tabs ===== */
.breadcrumb {
  background: transparent;
  padding: 0;
  font-size: 0.85rem;
}
.breadcrumb a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.breadcrumb-item + li::before { content: "/"; margin-left: 0.4rem; color: var(--color-text-light); }

.pagination .page-link {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  margin: 0 2px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.pagination .page-link:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.pagination .page-item.active .page-link {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 0;
  padding: 0.8rem 1.2rem;
  font-weight: 700;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.tab-pane { animation: fadeIn 0.3s ease; }

/* ===== Skeleton ===== */
.skeleton-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  pointer-events: none;
}
.skeleton {
  background: linear-gradient(90deg, #eef0f3 25%, #e0e3e8 50%, #eef0f3 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.skeleton-img { height: 160px; }
.skeleton-line { height: 12px; border-radius: 6px; margin: 10px; }

/* ===== Accordion ===== */
.accordion-button:not(.collapsed) {
  color: var(--color-ink);
  box-shadow: none;
  font-weight: 700;
  background: rgba(232, 93, 4, 0.06);
}
.accordion-button:focus { box-shadow: none; border-color: var(--color-primary-light); }

/* ===== Footer ===== */
.footer {
  background: var(--color-bg-footer);
  color: var(--color-text-light);
  font-size: 0.9rem;
  padding-top: 3.25rem;
  padding-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent), var(--color-primary));
}
.footer h6 {
  color: #fff;
  font-weight: 800;
  margin-bottom: 1rem;
  font-size: 1rem;
}
.footer a,
.footer .footer-link {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer a:hover,
.footer .footer-link:hover { color: var(--color-primary-light); }
.footer .footer-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 2rem;
  margin-bottom: 1.5rem;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}
.social-icon:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-3px);
}

/* ===== Checkout tracker ===== */
.payment-tracker {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}
.payment-tracker::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}
.payment-step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}
.payment-step .step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
  transition: all 0.3s ease;
}
.payment-step .step-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.payment-step.active .step-circle {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.payment-step.active .step-label { color: var(--color-primary); }
.payment-step.completed .step-circle {
  background: var(--color-success);
  color: #fff;
}
.payment-step.completed .step-label { color: var(--color-success); }

/* ===== Rating / Back to top / Preloader ===== */
.rating-stars { color: var(--color-accent); font-size: 0.9rem; }
.rating-stars .star { color: var(--color-accent); }

.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  right: auto;
  width: 48px;
  height: 48px;
  background: var(--color-ink);
  color: #fff;
  border: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease-out);
  z-index: 1050;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover {
  background: var(--color-primary);
  transform: translateY(-4px);
}

.preloader {
  position: fixed;
  inset: 0;
  background: var(--color-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.preloader .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ===== Hero — full-bleed industrial ===== */
.hero-section {
  min-height: min(88vh, 720px);
  background:
    linear-gradient(105deg, rgba(18, 24, 32, 0.94) 0%, rgba(26, 35, 50, 0.78) 48%, rgba(26, 35, 50, 0.45) 100%),
    radial-gradient(circle at 70% 40%, rgba(232, 93, 4, 0.22), transparent 55%),
    linear-gradient(160deg, #1a2332 0%, #2c3a4f 100%);
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 11px,
      rgba(255, 255, 255, 0.015) 11px,
      rgba(255, 255, 255, 0.015) 12px
    );
  pointer-events: none;
  z-index: 0;
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 55%;
  height: 120%;
  top: -10%;
  left: -8%;
  background:
    radial-gradient(ellipse at center, rgba(232, 93, 4, 0.18) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: pulseSoft 7s ease-in-out infinite;
}
.hero-bg-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 2%;
  opacity: 0.45;
  pointer-events: none;
}
.hero-bg-visual img {
  max-height: 92%;
  width: auto;
  max-width: 58%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
  animation: fadeIn 1.1s var(--ease-out) both;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding-block: 3.5rem;
}
.hero-brand {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  color: #fff;
}
.hero-brand span {
  color: var(--color-primary-light);
}
.hero-headline {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 0.65rem;
  line-height: 1.5;
}
.hero-sub {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 1.75rem;
  max-width: 28rem;
}
.hero-section .btn-lg-custom,
.hero-cta {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  padding: 0.9rem 1.85rem;
  box-shadow: var(--shadow-glow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-section .btn-lg-custom:hover,
.hero-cta:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232, 93, 4, 0.4);
}

.hero-slider {
  width: 100%;
  height: 100%;
}
.hero-slider .swiper-slide {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
}
.hero-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.hero-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(18, 24, 32, 0.88) 0%,
    rgba(26, 35, 50, 0.62) 48%,
    rgba(26, 35, 50, 0.28) 100%
  );
}
.hero-slider .swiper-slide > .container-fluid {
  position: relative;
  z-index: 1;
  width: 100%;
}
.hero-section:has(.hero-slide-bg) .hero-bg-visual {
  display: none;
}
.hero-slider .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.4;
  width: 8px;
  height: 8px;
}
.hero-slider .swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--color-primary);
  width: 22px;
  border-radius: 4px;
}
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
  color: #fff;
  --swiper-navigation-size: 22px;
  background: rgba(255, 255, 255, 0.1);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
}
.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
  background: var(--color-primary);
}

/* ===== Trust strip ===== */
.trust-strip {
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 2;
}
.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
}
.trust-item .trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 93, 4, 0.1);
  color: var(--color-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-spring);
}
.trust-item:hover .trust-icon { transform: scale(1.08); }

/* ===== Deals countdown ===== */
.deal-countdown {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
  justify-content: center;
}
.countdown-item {
  background: var(--color-ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  min-width: 48px;
  text-align: center;
}
.countdown-item .value {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-accent);
}
.countdown-item .label {
  font-size: 0.58rem;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ===== Category Grid ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.category-item-main {
  text-align: center;
  padding: 1.35rem 1rem 1.15rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease-out);
  border: 1px solid var(--color-border);
  height: auto;
  min-height: 150px;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.category-item-main:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(232, 93, 4, 0.4);
  color: var(--color-ink);
}
.category-item-main .cat-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 0.85rem;
  background: linear-gradient(145deg, var(--color-ink), var(--color-ink-soft));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  color: var(--color-primary-light);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.3s ease;
  box-shadow: var(--shadow);
}
.category-item-main:hover .cat-icon {
  transform: rotate(-6deg) scale(1.08);
  box-shadow: var(--shadow-glow);
}

/* ===== Blog teaser ===== */
.blog-teaser {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-card);
  height: 100%;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.blog-teaser:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.blog-teaser img {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background: var(--color-bg-muted);
}
.blog-teaser .teaser-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ===== Testimonial ===== */
.testimonial-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  height: 100%;
}
.testimonial-card .user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.testimonial-card .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.testimonial-card .rating { color: var(--color-accent); }

/* ===== Brand logos ===== */
.brand-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}
.brand-logos img {
  height: 32px;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: all 0.3s ease;
}
.brand-logos img:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
}

/* ===== Newsletter ===== */
.newsletter-form { max-width: 520px; }
.newsletter-form .input-group {
  border-radius: var(--radius-full);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.newsletter-form .input-group .form-control {
  border: none;
  padding: 0.75rem 1.2rem;
  background: transparent;
  color: #fff;
}
.newsletter-form .input-group .form-control::placeholder { color: rgba(255, 255, 255, 0.45); }
.newsletter-form .btn {
  border-radius: 0;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border: none;
}

/* ===== FAQ / Order / Compare / Cart ===== */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: var(--color-bg-card);
}

.order-timeline {
  position: relative;
  padding-right: 2rem;
}
.order-timeline::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  right: 15px;
  width: 2px;
  background: var(--color-border);
}
.order-step {
  position: relative;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.order-step:last-child { border-bottom: none; }
.order-step .step-icon {
  position: absolute;
  right: -42px;
  top: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}
.order-step.active .step-icon,
.order-step.completed .step-icon {
  background: var(--color-primary);
  color: #fff;
}
.order-step .step-content h6 { font-weight: 700; margin-bottom: 0.3rem; }
.order-step .step-desc { font-size: 0.8rem; color: var(--color-text-muted); }
.order-step .step-time { font-size: 0.75rem; color: var(--color-text-light); }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-table th,
.compare-table td {
  padding: 0.8rem 1rem;
  text-align: center;
  border: 1px solid var(--color-border);
  font-size: 0.85rem;
}
.compare-table th {
  background: var(--color-bg-muted);
  font-weight: 700;
}

.cart-table th {
  background: var(--color-bg-muted);
  font-weight: 700;
  border: 1px solid var(--color-border);
}
.cart-table td {
  border: 1px solid var(--color-border);
  vertical-align: middle;
}
.cart-summary .summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.9rem;
}
.cart-summary .summary-total {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-ink);
  border-top: 2px solid var(--color-border);
}

/* ===== Profile / Auth ===== */
.profile-sidebar {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
}
.profile-sidebar .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 0.3rem;
  transition: all 0.2s ease;
  text-decoration: none;
}
.profile-sidebar .sidebar-link:hover,
.profile-sidebar .sidebar-link.active {
  background: var(--color-primary);
  color: #fff;
}
.profile-sidebar .sidebar-link i { min-width: 1.2rem; }

.auth-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
  max-width: 420px;
  margin: 0 auto;
}
.auth-card h3 { font-weight: 800; color: var(--color-ink); }
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-border);
}
.auth-divider span { padding: 0 1rem; }
.social-login .social-btn {
  width: 100%;
  padding: 0.65rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* ===== Product detail ===== */
.product-gallery { position: sticky; top: 90px; }
.product-main-img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: linear-gradient(145deg, #f7f8fa, #eef0f3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 1rem;
  margin-bottom: 1rem;
}
.product-thumb {
  width: 100%;
  height: 74px;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.4rem;
  background: var(--color-bg);
}
.product-thumb:hover,
.product-thumb.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.2);
}
.product-title-detail {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
}
.product-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}
.product-meta .meta-item i { color: var(--color-primary); }
.product-price-detail .price-current {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--color-ink);
}
.product-price-detail .price-old {
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--color-text-muted);
}
.product-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}
.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg-muted);
  color: var(--color-text-muted);
}

.qty-selector {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.qty-selector button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-bg-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.qty-selector button:hover { background: var(--color-border); }
.qty-selector input {
  width: 50px;
  height: 36px;
  border: none;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 4rem 1rem; }
.error-404 .error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1;
}
.error-404 .error-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

/* ===== Offcanvas ===== */
.offcanvas-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-ink);
  color: #fff;
}
.offcanvas-header .btn-close { filter: invert(1); }
.offcanvas .nav-link {
  color: var(--color-ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
}
.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
  background: rgba(232, 93, 4, 0.1);
  color: var(--color-primary);
}

/* ===== Version picker (root) ===== */
.version-picker {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  max-width: 520px;
  margin: 0 auto;
}
.version-picker .version-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.25s var(--ease-out);
}
.version-picker .version-link:hover {
  border-color: var(--color-primary);
  background: rgba(232, 93, 4, 0.05);
  transform: translateX(-4px);
  box-shadow: var(--shadow);
}
.version-picker .version-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-ink);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  .hero-bg-visual { opacity: 0.22; }
  .hero-bg-visual img { max-width: 90%; }
  .hero-content { max-width: 100%; }
}

@media (max-width: 768px) {
  .h1 { font-size: 1.5rem; }
  .h2 { font-size: 1.3rem; }
  .h3 { font-size: 1.1rem; }
  .section-padding { padding: 2rem 0; }
  .section-padding-lg { padding: 2.75rem 0; }
  .mega-menu { position: static; }
  .mega-panel { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; pointer-events: auto; }
  .category-sidebar { width: 100%; margin-bottom: 1.5rem; }
  .payment-tracker { flex-wrap: wrap; }
  .hero-section,
  .hero-slider .swiper-slide {
    min-height: auto;
    padding-block: 2.5rem;
  }
  .back-to-top { left: 1rem; bottom: 1rem; }
}

@media (max-width: 576px) {
  .h1 { font-size: 1.3rem; }
  .h2 { font-size: 1.2rem; }
  .rating-stars { font-size: 0.8rem; }
  .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
