/* Base */
:root {
  --bg: #0b1220;
  --card: #0f172a;
  --muted: #9aa4b2;
  --text: #e5e7eb;
  --brand: #0ea5e9;
  --brand-600: #0284c7;
  --accent: #f97316;
  --ring: 0 0 0 3px rgb(14 165 233 / 35%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, #0b5c7a33, transparent), var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: clamp(14px, 1.6vw, 16px);
  overflow-x: hidden;
}
html { overflow-x: hidden; }

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(22px, 2.4vw, 28px); }
.section-head p { margin: 0; color: var(--muted); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.header-actions { display: inline-flex; align-items: center; gap: 8px; }
.header-actions .cart-btn { margin-inline-start: 6px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 48px; height: 48px; }
.brand-name { font-weight: 800; letter-spacing: -0.3px; font-size: clamp(16px, 2vw, 18px); }

.nav { position: relative; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 0; padding: 10px; border-radius: 12px; border: 1px solid var(--accent); background: var(--accent); color: #001018; font-weight: 700; min-width: 44px; min-height: 44px; }
.nav-toggle::before { content: "\2630"; font-size: 16px; line-height: 1; }

.nav-menu { list-style: none; margin: 0; padding: 8px; position: fixed; top: 60px; left: 0; right: 0; z-index: 60; background: var(--card); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; box-shadow: 0 16px 50px rgba(0,0,0,0.35); display: block; visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .18s ease, transform .18s ease, visibility .18s; pointer-events: none; width: 100vw; max-width: none; overflow: hidden; }
.nav-menu::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .18; background-image:
  radial-gradient(600px 200px at 90% 0%, rgba(14,165,233,.35), transparent 60%),
  radial-gradient(400px 160px at 10% 100%, rgba(249,115,22,.25), transparent 60%),
  linear-gradient(transparent 0 0),
  repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 24px),
  repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 24px);
  background-blend-mode: screen, screen, normal, normal, normal;
}
.nav-menu.open { visibility: visible; opacity: 1; transform: translateY(0); pointer-events: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; justify-content: end; }
.nav-menu a { display: block; padding: 12px 14px; border-radius: 10px; color: var(--muted); white-space: nowrap; }
.nav-menu a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

@media (min-width: 840px) {
  .nav-toggle { display: none; }
  .nav-menu { position: static; display: flex; flex-wrap: wrap; gap: 8px; background: transparent; border: 0; padding: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none; pointer-events: auto; width: auto; max-width: 100%; overflow: visible; }
}

/* Mobile header centering */
@media (max-width: 839px) {
  .header-inner { 
    position: relative !important; 
    min-height: 56px !important; 
    display: block !important; 
    justify-content: unset !important; 
  }
  .brand { position: absolute !important; right: 0 !important; top: 50% !important; transform: translateY(-50%) !important; }
  .nav-toggle { position: absolute !important; left: 0 !important; top: 50% !important; transform: translateY(-50%) !important; }
  .header-actions { position: absolute !important; left: 120px !important; top: 50% !important; transform: translateY(-50%) !important; }
}


/* Hero */
.hero { padding: 72px 0 32px; }
.hero-inner { display: grid; gap: 28px; align-items: center; grid-template-columns: 1.1fr 0.9fr; }
.hero h1 { margin: 0 0 10px; font-size: clamp(28px, 4.2vw, 42px); line-height: 1.2; }
.hero p { margin: 0 0 18px; color: var(--muted); font-size: clamp(14px, 1.8vw, 16px); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-media { display: grid; place-items: center; }


/* New hero poster */
.hero-poster {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(260px, 42vw, 460px);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  background:
    url('../images/1758140794982-302868930.png') center/cover no-repeat;
}
.hero-poster::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
  pointer-events: none;
}
.poster-content {
  position: absolute; inset: 0; z-index: 2;
  display: grid; grid-template-rows: auto 1fr auto auto;
  gap: 10px; padding: 14px; align-content: end;
}
.poster-kicker { display: inline-block; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); padding: 4px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; color: var(--text); }
.poster-title { margin: 8px 0 4px; font-size: clamp(18px, 3.4vw, 28px); line-height: 1.2; }
.poster-sub { margin: 0; color: var(--muted); font-size: clamp(12px, 1.8vw, 14px); }
.poster-points { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.poster-points li { display: flex; align-items: center; gap: 8px; }
.poster-points li::before { content: "✔"; color: #22c55e; font-weight: 800; }
.poster-points .inline-action { margin-inline-start: auto; }
.poster-footer { display: flex; align-items: center; justify-content: flex-start; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 6px; }
.poster-footer .dot { opacity: .6; }
.poster-corner { position: absolute; width: 46px; height: 46px; border: 2px solid rgba(255,255,255,0.18); z-index: 2; opacity: .7; }
.poster-corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.poster-corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.poster-corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.poster-corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }

@media (max-width: 480px) {
  .poster-content { padding: 12px; }
  .poster-title { font-size: clamp(16px, 5.4vw, 22px); }
}

/* Poster variant */


@media (max-width: 480px) {
  .poster-content { padding: 12px; }
  .poster-title { font-size: clamp(16px, 5.4vw, 22px); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 5.2vw; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-content { display: contents; }
  .hero-content h1 { grid-row: 1; }
  .hero-media { grid-row: 2; }
  .hero-content p { grid-row: 3; }
  .hero-cta { grid-row: 4; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 4.8vw; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 14px; }
.feature { 
  background: var(--card); 
  border: 1px solid var(--accent); 
  border-radius: 16px; 
  padding: 24px 20px; 
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(249,115,22,0.2);
}
.feature:hover::before {
  opacity: 1;
}
.feature-icon { 
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(249,115,22,0.1));
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 16px;
  color: var(--brand);
  transition: all 0.3s ease;
}
.feature:hover .feature-icon {
  background: linear-gradient(135deg, rgba(14,165,233,0.2), rgba(249,115,22,0.2));
  border-color: var(--brand);
  transform: scale(1.05);
}
.feature-icon i {
  font-size: 32px;
  line-height: 1;
}
.feature h3 { 
  margin: 0 0 12px; 
  font-size: clamp(16px, 1.8vw, 18px); 
  font-weight: 600;
  color: var(--text);
}
.feature p { 
  margin: 0; 
  color: var(--muted); 
  line-height: 1.6;
  font-size: clamp(14px, 1.6vw, 15px);
}

/* Features responsive */
@media (max-width: 768px) {
  .features { 
    grid-template-columns: 1fr; 
    gap: 16px; 
  }
  .feature { 
    padding: 20px 16px; 
  }
  .feature-icon { 
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
  }
  .feature-icon i {
    font-size: 28px;
  }
}

/* Products */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.product-card { background: var(--card); border: 1px solid var(--accent); border-radius: 10px; overflow: hidden; transition: box-shadow .15s ease; }
.product-card:hover { box-shadow: 0 6px 20px rgba(249,115,22,0.3); border-color: var(--accent); }
.product-card img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.product-body { padding: 10px; }
.product-body h3 { margin: 0 0 4px; font-size: clamp(16px, 1.8vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-body p { margin: 0 0 6px; color: var(--muted); font-size: clamp(14px, 1.6vw, 15px); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.product-card .btn { width: 100%; justify-content: center; }
.price { color: var(--brand); font-weight: 700; }

/* Category cards */
.category-card { cursor: pointer; }
.category-card .product-body { padding-bottom: 16px; }
.category-card .product-meta { justify-content: flex-start; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 16px; }
.contact-card, .contact-form { background: var(--card); border: 1px solid var(--accent); border-radius: 14px; padding: 16px; transition: all 0.3s ease; }
.contact-card:hover, .contact-form:hover { box-shadow: 0 8px 25px rgba(249,115,22,0.2); border-color: var(--accent); }

/* Mobile contact adjustments */
@media (max-width: 768px) {
  .contact-grid { 
    grid-template-columns: 1fr; 
    gap: 20px; 
    display: flex;
    flex-direction: column-reverse;
  }
  .contact-card { 
    order: 2;
    margin-top: 12px; 
  }
  .contact-form { 
    order: 1;
    margin-bottom: 8px; 
  }
}
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { padding: 6px 0; color: var(--text); font-size: clamp(14px, 1.6vw, 16px); }

.contact-form label { display: grid; gap: 6px; margin-bottom: 12px; font-weight: 600; }
.contact-form input, .contact-form textarea {
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { box-shadow: var(--ring); border-color: var(--brand); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.form-note { color: var(--muted); margin: 6px 0 0; font-size: clamp(12px, 1.4vw, 13px); }

/* Modal */
.modal { 
  position: fixed; 
  inset: 0; 
  z-index: 100; 
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.7); 
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}
.modal-dialog { 
  position: relative; 
  width: min(500px, 92%); 
  max-height: 90vh;
  background: var(--card); 
  border: 1px solid rgba(255,255,255,0.12); 
  border-radius: 20px; 
  padding: 0;
  box-shadow: 0 25px 50px rgba(0,0,0,0.6);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s ease;
  overflow: hidden;
}
.modal:not(.hidden) .modal-dialog {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(14,165,233,0.1), rgba(249,115,22,0.05));
}
.modal-dialog h3 { 
  margin: 0; 
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  font-weight: 300;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.1);
}
.modal .muted { 
  color: var(--muted); 
  margin: 0 0 20px; 
  padding: 0 24px;
  font-size: 14px;
}
.modal form {
  padding: 24px;
}
.modal form label {
  display: block;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text);
}
.modal form input,
.modal form textarea {
  width: 100%;
  background: rgba(11, 18, 32, 0.8);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 16px;
  outline: none;
  transition: all 0.2s ease;
  font-size: 14px;
}
.modal form input:focus,
.modal form textarea:focus { 
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2); 
  border-color: var(--brand);
  background: rgba(11, 18, 32, 0.9);
}
.modal .form-actions { 
  justify-content: flex-end; 
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.modal .btn {
  min-width: 100px;
  font-weight: 600;
}

@media (min-width: 680px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile grids */
@media (max-width: 480px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-card img { 
    width: 100% !important;
    max-width: none !important;
    aspect-ratio: 3 / 2 !important; 
    height: 180px !important; 
    object-fit: cover !important; 
  }
}
/* Mobile: make compressor category card full-width and horizontal (image right, text left) */
@media (max-width: 480px) {
  #categories .product-grid .product-card[data-filter="compressor"] {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
  }
  #categories .product-grid .product-card[data-filter="compressor"] img {
    width: 50% !important;
    height: auto !important;
    object-fit: cover !important;
    aspect-ratio: unset !important;
  }
  #categories .product-grid .product-card[data-filter="compressor"] .product-body {
    width: 50% !important;
    display: grid !important;
    align-content: center !important;
  }
}
@media (max-width: 360px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 18px 0 36px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Back to Top Button */
/* Back to Top styles removed */

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--accent); color: #001018; background: var(--accent); transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease; font-size: clamp(14px, 1.6vw, 15px); }
.btn:hover { transform: translateY(-1px); background: #ea580c; border-color: #ea580c; }
.btn-sm { padding: 8px 10px; font-size: clamp(13px, 1.4vw, 14px); }
.btn-primary { background: var(--accent); color: #001018; border: 0; font-weight: 800; }
.btn-primary:hover { background: #ea580c; }
.btn-outline { background: var(--accent); color: #001018; border-color: var(--accent); }
.btn-outline:hover { background: #ea580c; border-color: #ea580c; }

/* Utility */
.hidden { display: none !important; }

/* RTL tweaks */
html[dir="rtl"] .product-meta { flex-direction: row-reverse; }
html[dir="rtl"] .footer-inner { flex-direction: row-reverse; }

/* Articles scroller */
#articles .section-head { margin-bottom: 12px; position: relative; }

/* Coming Soon Overlay for Article Cards */
.coming-soon-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(8px);
  color: var(--brand);
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 11px;
  border: 1px solid rgba(14, 165, 233, 0.3);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.coming-soon-text {
  letter-spacing: 0.3px;
  font-size: 10px;
}

.coming-soon-icon {
  font-size: 10px;
  color: var(--accent);
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Article card positioning for overlay */
.article-card {
  position: relative;
}

/* Mobile responsive for coming soon overlay */
@media (max-width: 768px) {
  .coming-soon-overlay {
    top: 6px;
    right: 6px;
    padding: 3px 6px;
    font-size: 10px;
  }
  
  .coming-soon-text {
    font-size: 9px;
  }
  
  .coming-soon-icon {
    font-size: 9px;
  }
}
.articles-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 320px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.articles-scroller::-webkit-scrollbar { height: 8px; }
.articles-scroller::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 8px; }
.articles-scroller::-webkit-scrollbar-track { background: transparent; }

.article-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0e172b, #0b1220);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  min-height: 100%;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.35); border-color: rgba(14,165,233,0.3); }
.article-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.article-body { padding: 12px; display: grid; gap: 6px; }
.article-body h3 { font-size: 16px; margin: 0; line-height: 1.4; color: var(--text); }
.article-body p { font-size: 13px; color: var(--muted); margin: 0; }
.read-more { display: inline-block; margin-top: 6px; color: var(--brand); font-weight: 700; font-size: 13px; }

@media (min-width: 992px) {
  .articles-scroller { grid-auto-columns: minmax(260px, 360px); gap: 16px; }
  .article-card img { height: 180px; }
}

@media (max-width: 480px) {
  .articles-scroller { grid-auto-columns: 75%; gap: 12px; }
}

/* Catalog modal tweaks */
#catalogGrid { max-height: 60vh; overflow: auto; padding-right: 6px; }
#catalogGrid .product-card { background: linear-gradient(180deg, #0e172b, #0b1220); }

/* Fullscreen catalog modal */
.modal.fullscreen { position: fixed; inset: 0; }
.modal.fullscreen .modal-dialog { width: min(1200px, 96%); margin: 4vh auto; max-height: 92vh; display: flex; flex-direction: column; }
.catalog-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; background: var(--card); z-index: 1; padding: 20px 20px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.catalog-tools { display: flex; align-items: center; gap: 8px; }
.input { background: #0b1220; border: 1px solid rgba(255,255,255,0.12); color: var(--text); border-radius: 10px; padding: 10px 12px; outline: none; }
.input:focus { box-shadow: var(--ring); border-color: var(--brand); }

/* Catalog content wrapper for proper scrolling */
.catalog-content-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 20px 20px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  min-height: 0;
}

/* Ensure smooth scrolling on mobile devices */
.modal.fullscreen .catalog-content-wrapper {
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

#catalogGrid { max-height: unset; overflow: visible; padding-right: 2px; }
#catalogGrid.product-grid { gap: 18px; }

/* Desktop styles for catalog grid */
@media (min-width: 769px) {
  #catalogGrid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
  }
  
  #catalogGrid .product-card {
    background: linear-gradient(135deg, #0e172b 0%, #0b1220 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  }
  
  #catalogGrid .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    border-color: rgba(14,165,233,0.3);
  }
  
  #catalogGrid .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  #catalogGrid .product-card:hover::before {
    opacity: 1;
  }
  
  #catalogGrid .product-card img { 
    aspect-ratio: 16/10; 
    height: 200px; 
    object-fit: cover;
    transition: transform 0.3s ease;
  }
  
  #catalogGrid .product-card:hover img {
    transform: scale(1.05);
  }
  
  #catalogGrid .product-card .product-body { 
    padding: 20px; 
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  #catalogGrid .product-card .product-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
  }
  
  #catalogGrid .product-card .product-meta { 
    justify-content: space-between; 
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  
  #catalogGrid .product-card .price { 
    font-size: 16px; 
    font-weight: 800; 
    color: var(--brand);
    background: rgba(14,165,233,0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(14,165,233,0.2);
  }
  
  #catalogGrid .product-card .btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    min-width: 100px;
    transition: all 0.2s ease;
  }
  
  #catalogGrid .product-card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(249,115,22,0.3);
  }
}

/* Large desktop styles */
@media (min-width: 1200px) {
  #catalogGrid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
  }
  
  #catalogGrid .product-card .product-body h3 {
    font-size: 20px;
  }
  
  #catalogGrid .product-card .price {
    font-size: 18px;
    padding: 10px 16px;
  }
}


/* Cart tweaks */
.cart-btn { display: inline-flex; align-items: center; gap: 6px; }
.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #16a34a;
  color: #001018;
  font-weight: 800;
  font-size: 12px;
}

#cartGrid.product-grid { gap: 10px; }
.cart-item-actions { display: flex; align-items: center; gap: 6px; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.12); background: #0b1220; color: var(--text); }
.qty-value { min-width: 20px; text-align: center; font-weight: 700; }
.remove { padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(255,0,0,0.35); background: transparent; color: #fca5a5; }
.remove:hover { background: rgba(255,0,0,0.08); }

.muted-total { color: var(--muted); font-weight: 700; }


/* Mobile-specific styles for catalog modal product cards */
@media (max-width: 768px) {
  #catalogGrid {
    grid-template-columns: 1fr !important;
    gap: 12px;
    padding-bottom: 20px;
  }
  
  #catalogGrid .product-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(14,23,43,0.9) 0%, rgba(11,18,32,0.9) 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 140px;
    overflow: hidden;
    position: relative;
  }
  
  #catalogGrid .product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: 60% 30%;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
    border-radius: 12px;
    background-image: var(--product-bg-image, url('logo.svg'));
  }
  
  #catalogGrid .product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-color: rgba(14,165,233,0.3);
  }
  
  #catalogGrid .product-card img {
    width: 150px !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    object-position: 60% 30%;
    position: relative;
    z-index: 1;
  }
  
  #catalogGrid .product-card .product-body {
    flex: 1;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    position: relative;
    z-index: 1;
  }
  
  #catalogGrid .product-card .product-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  #catalogGrid .product-card .product-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
  }
  
  #catalogGrid .product-card .price {
    font-size: 13px !important;
    font-weight: 700;
    color: var(--brand);
    background: rgba(14,165,233,0.1);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(14,165,233,0.2);
  }
  
  #catalogGrid .product-card .btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    width: auto !important;
    min-width: 60px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  #catalogGrid {
    gap: 10px !important;
  }
  
  #catalogGrid .product-card {
    gap: 10px;
    padding: 10px;
  }
  
  #catalogGrid .product-card img {
    width: 130px !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    object-position: 60% 30%;
  }
  
  #catalogGrid .product-card .product-body {
    min-height: 100px;
  }
  
  #catalogGrid .product-card .product-body h3 {
    font-size: 13px;
  }
  
  #catalogGrid .product-card .price {
    font-size: 12px !important;
    padding: 1px 4px;
  }
  
  #catalogGrid .product-card .btn {
    padding: 5px 10px;
    font-size: 11px;
    min-width: 55px;
  }
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
  .modal.fullscreen .modal-dialog {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  
  .catalog-header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .catalog-header h3 {
    width: 100%;
    order: -1;
  }
  
  .catalog-tools {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .catalog-tools .input {
    flex: 1;
    min-width: 0;
  }
  
  .catalog-content-wrapper {
    padding: 0 16px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .modal-dialog {
    width: 95%;
    margin: 2vh auto;
    max-height: 95vh;
  }
  .modal-header {
    padding: 20px 20px 16px;
  }
  .modal form {
    padding: 20px;
  }
  .modal .muted {
    padding: 0 20px;
  }
  .modal-dialog h3 {
    font-size: 18px;
  }
  
  .catalog-header {
    padding: 12px;
  }
  
  .catalog-content-wrapper {
    padding: 0 12px 12px;
  }
}

/* Article modal body */
#articleContent { padding: 0 20px 20px; color: var(--text); line-height: 1.9; }
#articleContent h3, #articleContent h4 { margin: 12px 0 6px; }
#articleContent p { margin: 0 0 10px; }
#articleContent ul { margin: 0 0 10px; padding: 0 20px; }

/* Temporarily hide products section header */
#products .section-head { display: none; }

/* Desktop catalog refinements */
@media (min-width: 992px) {
  #catalogGrid {
    max-height: 70vh;
    overflow: auto;
    padding-right: 6px;
  }
  #catalogGrid.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
  }
  .catalog-header { padding: 10px 0 8px; }
  .catalog-tools .input { min-width: 320px; }

  /* Smooth scrollbar */
  #catalogGrid::-webkit-scrollbar { width: 10px; }
  #catalogGrid::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 10px; }
  #catalogGrid::-webkit-scrollbar-thumb { background: rgba(14,165,233,0.35); border-radius: 10px; }
  #catalogGrid::-webkit-scrollbar-thumb:hover { background: rgba(14,165,233,0.5); }
}

@media (min-width: 1024px) {
  #catalogGrid .product-card img { height: 220px; }
}

@media (min-width: 1440px) {
  .modal.fullscreen .modal-dialog { width: min(1280px, 92%); }
  #catalogGrid.product-grid { gap: 28px; }
  #catalogGrid .product-card img { height: 240px; }
}

