/* Manchester Lubricants — static site styles */
.font-english { font-family: 'Inter', sans-serif; }
.font-arabic { font-family: 'Tajawal', sans-serif; }
h1, h2, .brand { font-family: 'Chakra Petch', sans-serif; }

#navbar {
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-bottom 0.3s ease;
  background: transparent; backdrop-filter: blur(0px); border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(2, 6, 23, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(34, 197, 94, 0.2) !important;
}
#navbar.scrolled .nav-text, #navbar.scrolled .lang-btn, #navbar.scrolled .mobile-icon { color: rgba(255, 255, 255, 0.9) !important; }
#navbar.scrolled .nav-text:hover { color: #4ade80 !important; }
#navbar.scrolled .lang-btn { border-color: rgba(255, 255, 255, 0.3) !important; }
#navbar.scrolled .lang-btn:hover { border-color: #4ade80 !important; color: #4ade80 !important; }
#mobileOverlay { transition: opacity 0.3s ease, backdrop-filter 0.3s ease; opacity: 0; pointer-events: none; }
#mobileOverlay.active { opacity: 1; pointer-events: auto; }
[dir="rtl"] #mobileMenu { text-align: right; }

#loadingScreen {
  position: fixed; inset: 0; background: #020617; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease; overflow: hidden;
}
#loadingScreen.hide-loader { opacity: 0; visibility: hidden; pointer-events: none; }
html.skip-loader #loadingScreen { display: none !important; }

.engine-body {
  position: relative; width: 200px; height: 100px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-radius: 16px; border: 2px solid #475569;
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.15), inset 0 0 20px rgba(0,0,0,0.3);
}
.cylinder {
  position: absolute; top: -20px; width: 30px; height: 40px;
  background: #1e293b; border: 2px solid #475569; border-radius: 8px 8px 0 0; overflow: hidden;
}
.cylinder:nth-child(1) { left: 20px; }
.cylinder:nth-child(2) { left: 60px; }
.cylinder:nth-child(3) { left: 100px; }
.cylinder:nth-child(4) { left: 140px; }
.piston-head {
  position: absolute; bottom: 0; width: 100%; height: 15px;
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
  animation: pistonFire 0.8s ease-in-out infinite; border-radius: 2px;
}
.cylinder:nth-child(1) .piston-head { animation-delay: 0s; }
.cylinder:nth-child(2) .piston-head { animation-delay: 0.2s; }
.cylinder:nth-child(3) .piston-head { animation-delay: 0.4s; }
.cylinder:nth-child(4) .piston-head { animation-delay: 0.6s; }
.piston-rod {
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 12px; background: #64748b; animation: rodMove 0.8s ease-in-out infinite;
}
.cylinder:nth-child(1) .piston-rod { animation-delay: 0s; }
.cylinder:nth-child(2) .piston-rod { animation-delay: 0.2s; }
.cylinder:nth-child(3) .piston-rod { animation-delay: 0.4s; }
.cylinder:nth-child(4) .piston-rod { animation-delay: 0.6s; }
.fire-spark {
  position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; background: #22c55e; border-radius: 50%;
  animation: fireGlow 0.8s ease-in-out infinite;
  box-shadow: 0 0 15px #22c55e, 0 0 30px #4ade80;
}
.cylinder:nth-child(1) .fire-spark { animation-delay: 0s; }
.cylinder:nth-child(2) .fire-spark { animation-delay: 0.2s; }
.cylinder:nth-child(3) .fire-spark { animation-delay: 0.4s; }
.cylinder:nth-child(4) .fire-spark { animation-delay: 0.6s; }
.oil-line {
  position: absolute; top: 50%; transform: translateY(-50%); width: 100%; height: 4px;
  background: linear-gradient(90deg, transparent, #22c55e 20%, #22c55e 80%, transparent);
  animation: oilFlow 2s ease-in-out infinite; opacity: 0.4;
}
.exhaust-particle {
  position: absolute; width: 3px; height: 3px; background: rgba(34, 197, 94, 0.5);
  border-radius: 50%; animation: exhaustUp 1.5s ease-out infinite;
}
.loading-text-piston {
  margin-top: 30px; font-family: 'Chakra Petch', sans-serif; font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.3em; color: #22c55e; animation: textGlow 1.5s ease-in-out infinite;
}
.rpm-display {
  margin-top: 8px; font-family: 'Chakra Petch', sans-serif; font-size: 32px; font-weight: 900;
  color: #22c55e; text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}
.rpm-label { font-size: 10px; letter-spacing: 0.5em; color: #4ade80; opacity: 0.7; }
.loading-bar { margin-top: 15px; width: 200px; height: 3px; background: #1e293b; border-radius: 3px; overflow: hidden; }
.loading-bar-fill {
  height: 100%; background: linear-gradient(90deg, #22c55e, #4ade80, #22c55e); border-radius: 3px;
  animation: barFill 2s ease-in-out forwards; box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

@keyframes pistonFire {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  30% { transform: translateY(-15px); opacity: 1; }
  60% { transform: translateY(0); opacity: 0.6; }
}
@keyframes rodMove {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  30% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(0); }
}
@keyframes fireGlow {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(0.5); }
  30% { opacity: 1; transform: translateX(-50%) scale(1.3); }
  60% { opacity: 0.3; transform: translateX(-50%) scale(0.5); }
}
@keyframes oilFlow { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
@keyframes exhaustUp { 0% { transform: translateY(0); opacity: 0.8; } 100% { transform: translateY(-60px) translateX(10px); opacity: 0; } }
@keyframes textGlow {
  0%, 100% { opacity: 0.5; text-shadow: 0 0 10px rgba(34, 197, 94, 0.3); }
  50% { opacity: 1; text-shadow: 0 0 25px rgba(34, 197, 94, 0.7); }
}
@keyframes barFill { 0% { width: 0%; } 100% { width: 100%; } }

.perspective-container { perspective: 1000px; }
.grid-3d-plane {
  position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background-image: linear-gradient(rgba(34, 197, 94, 1) 1px, transparent 5px),
                    linear-gradient(90deg, rgba(34, 197, 94, 1) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(500px) rotateX(60deg) translateY(0);
  animation: plane-move 10s linear infinite; opacity: 0.25;
}
.particle {
  position: absolute; width: 4px; height: 4px; background: #22c55e;
  border-radius: 50%; animation: floatParticle 10s linear infinite; opacity: 0.6;
}
.p-1 { top: 20%; left: 20%; }
.p-2 { top: 70%; left: 80%; }
.p-3 { top: 40%; left: 60%; }
@keyframes floatParticle {
  0% { transform: translateY(0); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: translateY(-100px) translateX(20px); opacity: 0; }
}
@keyframes plane-move {
  0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
  100% { transform: perspective(500px) rotateX(60deg) translateY(80px); }
}
.animate-pulse-slow { animation: pulse-slow 4s ease-in-out infinite; }
@keyframes pulse-slow { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.animate-spin-slow { animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.floating-bottle { animation: floatBottle 4s ease-in-out infinite; }
@keyframes floatBottle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.animate-float-slow { animation: floatSlow 5s ease-in-out infinite; }
.animate-float-slower { animation: floatSlow 7s ease-in-out infinite; }
@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.animate-gradient-text {
  background-size: 200% auto;
  animation: gradientText 4s linear infinite;
}
@keyframes gradientText {
  to { background-position: 200% center; }
}

/* Category boxes */
.cat-box {
  position: relative; display: block;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 60%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.2); border-radius: 1.35rem;
  padding: 1.4rem 1rem 1.45rem; box-shadow: 0 10px 28px rgba(2, 6, 23, 0.45);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s, background 0.3s;
  text-decoration: none; overflow: visible; z-index: 1; cursor: pointer; width: 100%;
}
.cat-box:hover {
  border-color: rgba(74, 222, 128, 0.5); box-shadow: 0 14px 32px rgba(2, 6, 23, 0.5);
  transform: translateY(-3px); z-index: 2;
}
.cat-box.active {
  z-index: 5; border-color: #86efac;
  background: linear-gradient(165deg, #15803d 0%, #14532d 40%, #052e16 100%);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.55), 0 0 0 7px rgba(34, 197, 94, 0.15), 0 14px 32px rgba(34, 197, 94, 0.28);
}
.cat-box-inner { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; text-align: center; }
.cat-icon { width: 72px; height: 72px; object-fit: contain; transition: transform 0.3s; }
.cat-box:hover .cat-icon { transform: scale(1.08); }
.cat-label { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #e2e8f0; }
.cat-box.active .cat-label { color: #bbf7d0; }
@media (min-width: 768px) {
  .cat-icon { width: 88px; height: 88px; }
  .cat-label { font-size: 0.875rem; }
}

/* Agent cards */
.agent-card {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 55%, #020617 100%);
  border: 1px solid rgba(148, 163, 184, 0.18); border-radius: 1.25rem;
  padding: 1.1rem 1rem 1.15rem; box-shadow: 0 12px 32px rgba(2, 6, 23, 0.18);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s; overflow: hidden; min-height: 100%;
}
.agent-card:hover {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28); transform: translateY(-4px);
}
.agent-card-accent {
  position: absolute; top: 0; left: 12%; right: 12%; height: 3px; border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, #4ade80, transparent); opacity: 0.55;
}
.agent-card-num {
  position: absolute; top: 0.65rem; inset-inline-end: 0.85rem;
  font-family: 'Chakra Petch', sans-serif; font-weight: 900; font-size: 1.65rem;
  color: rgba(255, 255, 255, 0.04); pointer-events: none;
}
.agent-card-icon {
  width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center;
  border-radius: 0.85rem; color: #4ade80;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(74, 222, 128, 0.25);
}
.agent-btn-phone {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 0.75rem; border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1; font-size: 0.7rem; font-weight: 700; text-decoration: none;
}
.agent-btn-phone:hover { border-color: rgba(74, 222, 128, 0.4); color: #4ade80; background: rgba(34, 197, 94, 0.08); }

.product-card.is-hidden { display: none !important; }

/* Compact product cards (real CSS — not Tailwind-in-JS) */
.pcard {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: #fff; border: 1px solid #f1f5f9; border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.product-card:hover .pcard,
.group:hover .pcard {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(34,197,94,0.14);
}
.pcard-media {
  position: relative; display: flex; align-items: center; justify-content: center;
  height: 140px; padding: 0.75rem; background: #fff;
}
@media (min-width: 768px) {
  .pcard-media { height: 160px; padding: 1rem; }
}
.pcard-media img {
  max-height: 100%; max-width: 100%; width: auto; height: auto;
  object-fit: contain; transition: transform 0.4s ease;
}
.product-card:hover .pcard-media img { transform: scale(1.05); }
.pcard-badge {
  position: absolute; top: 0.5rem; inset-inline-end: 0.5rem;
  background: #0f172a; color: #4ade80; font-size: 0.6rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem; border-radius: 999px;
}
.pcard-body { text-align: center; padding: 0 0.75rem 0.85rem; }
.pcard-rule {
  width: 1.5rem; height: 2px; margin: 0 auto 0.4rem;
  border-radius: 999px; background: linear-gradient(90deg, #4ade80, #34d399);
  transition: width 0.35s ease;
}
.product-card:hover .pcard-rule { width: 2.5rem; }
.pcard-body h3 {
  margin: 0 0 0.15rem; font-size: 0.8rem; font-weight: 900; line-height: 1.25;
  color: #0f172a;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) {
  .pcard-body h3 { font-size: 0.95rem; }
}
.pcard-visc {
  margin: 0; font-size: 0.65rem; font-weight: 700; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.pcard-vol {
  margin: 0.15rem 0 0.55rem; font-size: 0.95rem; font-weight: 900;
  color: #16a34a; text-transform: uppercase; letter-spacing: 0.04em;
}
.pcard-desc {
  margin: 0 0 0.55rem; font-size: 0.75rem; color: #64748b;
  display: none;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 768px) {
  .pcard-desc { display: -webkit-box; }
}
.pcard-btn {
  display: block; width: 100%; text-decoration: none; text-align: center;
  border-radius: 0.55rem; font-size: 0.7rem; font-weight: 800;
  padding: 0.55rem 0.5rem; color: #fff;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pcard-btn:hover { background: linear-gradient(90deg, #16a34a, #22c55e); }
.pcard-btn-outline {
  margin-bottom: 0.35rem; color: #334155; background: #fff;
  border: 1px solid #e2e8f0;
}
.pcard-btn-outline:hover { color: #16a34a; border-color: #22c55e; background: #fff; }
.pcard-btn-green { background: #16a34a; }
.pcard-btn-green:hover { background: #22c55e; }

/* Keep reveal animation from blowing out page width */
.scroll-reveal-3d, .scroll-reveal-3d-stagger {
  overflow: hidden;
}
#productGrid, #products {
  overflow-x: clip;
}

/* Slightly tighter category boxes */
#categoryFilter .cat-box { padding: 0.85rem 0.6rem 0.95rem; }
#categoryFilter .cat-icon { width: 52px; height: 52px; }
#categoryFilter .cat-label { font-size: 0.7rem; }
@media (min-width: 768px) {
  #categoryFilter .cat-box { padding: 1rem 0.85rem 1.1rem; }
  #categoryFilter .cat-icon { width: 64px; height: 64px; }
  #categoryFilter .cat-label { font-size: 0.8rem; }
}
