/* ============================================
   RANJIT ELECTRONICS — Design System
   Palette: Volcanic Glass (dark industrial + orange)
   Fonts: Syne (display) + Plus Jakarta Sans (body)
   ============================================ */

:root {
  --bg:        #0f0f0f;
  --bg2:       #161616;
  --bg3:       #1e1e1e;
  --surface:   #242424;
  --border:    #2e2e2e;
  --accent:    #ff6b2b;
  --accent2:   #ffb088;
  --text:      #f0ece8;
  --text2:     #a09890;
  --text3:     #6a6460;
  --white:     #ffffff;
  --green:     #25d366;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
  --font-display: 'Syne', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HEADER ── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.header.scrolled { background: rgba(15,15,15,0.97); }
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon { font-size: 1.6rem; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
}
.logo-tagline {
  font-size: 0.68rem;
  color: var(--text3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text2);
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.cart-btn:hover { background: var(--accent); color: var(--white); }
.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
  transition: transform 0.2s;
}
.cart-count.bump { transform: scale(1.4); }
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
}
.menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── MOBILE NAV ── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  flex-direction: column;
  padding: 16px 24px;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 12px 0;
  font-weight: 500;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover { color: var(--accent); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.hero-bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,107,43,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,107,43,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,43,0.12);
  border: 1px solid rgba(255,107,43,0.25);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 460px;
  margin-bottom: 36px;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.6s 0.4s ease both;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.hero-card:hover { border-color: var(--accent); transform: translateX(4px); }
.hc-icon { font-size: 1.5rem; }
.hero-card-1 { transform: translateX(20px); }
.hero-card-2 { transform: translateX(0px); }
.hero-card-3 { transform: translateX(20px); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  background: #e85a1e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,107,43,0.35);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
  margin-top: 24px;
}
.btn-whatsapp:hover { background: #1db954; transform: translateY(-1px); }
.full-width { width: 100%; justify-content: center; }

/* ── CATEGORIES BAR ── */
.categories-bar {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 68px;
  z-index: 50;
}
.cat-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 7px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ── PRODUCTS SECTION ── */
.products-section { padding: 64px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-width: 220px;
  transition: border-color var(--transition);
}
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap svg { color: var(--text3); flex-shrink: 0; }
.search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  width: 100%;
}
.search-wrap input::placeholder { color: var(--text3); }

/* ── PRODUCT GRID ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: fadeUp 0.4s ease both;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255,107,43,0.15);
}
.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--surface);
  overflow: hidden;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-cat-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(15,15,15,0.85);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
}
.product-body { padding: 16px; }
.product-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-code {
  font-size: 0.72rem;
  color: var(--text3);
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}
.product-unit {
  font-size: 0.7rem;
  color: var(--text3);
  font-weight: 400;
}
.add-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.add-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.add-btn.added { background: var(--accent); border-color: var(--accent); color: var(--white); }

.no-results {
  text-align: center;
  color: var(--text3);
  padding: 64px 0;
  font-size: 1rem;
}

/* ── ABOUT ── */
.about-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.about-text p {
  color: var(--text2);
  margin-top: 16px;
  font-size: 0.95rem;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--accent); }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text2);
  font-weight: 500;
}

/* ── CONTACT ── */
.contact-section { padding: 96px 0; }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 20px;
  color: var(--text2);
  font-size: 0.92rem;
}
.contact-item svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }

/* ── FOOTER ── */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.footer-copy { color: var(--text3); font-size: 0.82rem; }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: var(--text3);
  font-size: 0.82rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent); }

/* ── CART DRAWER ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.cart-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text2);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.cart-close:hover { background: var(--accent); color: var(--white); }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 200px;
  color: var(--text3);
  font-size: 0.9rem;
}
.cart-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.cart-item-img {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg3);
  padding: 4px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-top: 2px; }
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ci-qty-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.ci-qty-btn:hover { background: var(--accent); border-color: var(--accent); }
.ci-qty { font-size: 0.85rem; font-weight: 600; min-width: 20px; text-align: center; }
.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 600;
}
.cart-total span:last-child {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent);
}

/* ── PRODUCT MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.product-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition);
  max-height: 90vh;
}
.modal-overlay.open .product-modal { transform: scale(1); }
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text2);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--accent); color: var(--white); }
.modal-img-wrap {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  min-height: 280px;
}
.modal-img-wrap img {
  max-height: 240px;
  object-fit: contain;
  width: 100%;
}
.modal-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.modal-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.modal-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.modal-code { font-size: 0.78rem; color: var(--text3); }
.modal-price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}
.modal-qty {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  width: fit-content;
}
.qty-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--accent); border-color: var(--accent); }
.qty-val { font-weight: 700; font-size: 1rem; min-width: 24px; text-align: center; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .hero { flex-direction: column; text-align: center; padding-top: 100px; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-cta { justify-content: center; }
  .hero-visual { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hero-card-1, .hero-card-2, .hero-card-3 { transform: none; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .product-modal { grid-template-columns: 1fr; }
  .modal-img-wrap { min-height: 200px; }
}
@media (max-width: 600px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section-header { flex-direction: column; align-items: flex-start; }
  .search-wrap { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .cart-drawer { width: 100vw; }
}
@media (max-width: 380px) {
  .products-grid { grid-template-columns: 1fr; }
}