/* ============================================================
   717tech — Global Styles
   ============================================================ */

/* --- Variables --- */
:root {
  --green:       #3DFF6E;
  --green-glow:  #00FF57;
  --green-dim:   #1aff4f44;
  --bg:          #0e0e0e;
  --bg-nav:      #0b0b0b;
  --bg-card:     #161616;
  --border:      #2a2a2a;
  --text:        #f0f0f0;
  --text-muted:  #888;
  --font:        'Inter', sans-serif;
  --radius:      8px;
  --transition:  0.22s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
img { max-width: 100%; display: block; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  height: 60px;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Logo */
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  min-height: 34px;
  animation: none;
}
.brand-logo {
  display: block;
  width: 68px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(61,255,110,0.85)) drop-shadow(0 0 12px rgba(61,255,110,0.38));
}
.logo::after {
  content: '';
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 2px;
  height: 1px;
  background: var(--green);
  opacity: 0;
  box-shadow: 0 0 9px var(--green);
  animation: signGlitch 5.8s steps(1, end) infinite;
  pointer-events: none;
  display: none;
}
@keyframes signFlicker {
  0%, 9%, 11%, 32%, 34%, 69%, 71%, 100% { opacity: 1; filter: brightness(1); }
  10%, 33%, 70% { opacity: 0.45; filter: brightness(0.72); }
}
@keyframes signGlitch {
  0%, 32%, 34%, 69%, 71%, 100% { opacity: 0; transform: translateX(0); }
  10%, 33%, 70% { opacity: 0.9; transform: translateX(2px); }
}
.logo .logo-white { color: var(--text); }
.logo .logo-green { color: var(--green); }
.logo .logo-dot   { color: var(--green); margin-left: 4px; animation: logoDotBlink 2.8s ease-in-out infinite; text-shadow: 0 0 7px rgba(61,255,110,0.65); }
@keyframes logoDotBlink {
  0%, 100% { opacity: 1; text-shadow: 0 0 7px rgba(61,255,110,0.65); }
  50% { opacity: 0.28; text-shadow: 0 0 2px rgba(61,255,110,0.2); }
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--green); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: color var(--transition);
}
.dropdown-btn:hover { color: var(--green); }
.dropdown-arrow { transition: transform var(--transition); font-size: 0.75rem; }
.nav-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #141414;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 170px;
  padding: 6px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block;
  padding: 10px 18px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.dropdown-panel a:hover { color: var(--green); background: #1c1c1c; }

/* Nav right */
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Search */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  transition: border-color var(--transition);
}
.search-box:focus-within { border-color: var(--green); }
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.875rem;
  width: 220px;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-ico { color: var(--text-muted); flex-shrink: 0; }

/* Cart */
.cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: var(--text);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.cart-btn:hover { color: var(--green); background: #1a1a1a; }
.cart-badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--green);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   BUTTONS (global)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-green {
  background: var(--green);
  color: #000;
  border: 2px solid var(--green);
}
.btn-green:hover {
  background: transparent;
  color: var(--green);
  box-shadow: 0 0 20px var(--green-dim);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid transparent;
}
.btn-ghost:hover { color: var(--green); }
.button-icon { width: 16px; height: 16px; flex: 0 0 auto; }

@keyframes buttonFlash {
  0% { box-shadow: 0 0 0 rgba(61,255,110,0); }
  35% { box-shadow: 0 0 22px rgba(61,255,110,0.82); }
  100% { box-shadow: 0 0 7px rgba(61,255,110,0.2); }
}

.btn:hover,
.add-btn:hover,
.detail-add-button:hover,
.whatsapp-button:hover,
.quantity-control button:hover,
.filter-option:hover {
  animation: buttonFlash 0.38s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .logo, .logo::after, .logo .logo-dot { animation: none; }
}

/* ============================================================
   FOOTER (shared)
   ============================================================ */
.footer {
  background: #080808;
  border-top: 1px solid var(--border);
  padding: 48px 24px 32px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 40px;
}
.footer-store-logo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 2px;
  transition: color var(--transition), text-shadow var(--transition);
}
.footer-store-logo span { color: var(--text); letter-spacing: 1px; }
.footer-store-logo:hover { color: #fff; text-shadow: 0 0 12px rgba(61,255,110,0.75); }
.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 260px;
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--green); }
.social-link {
  display: flex !important;
  align-items: center;
  gap: 12px;
  color: var(--text-muted) !important;
  font-size: 0.9rem !important;
  font-weight: 600;
  transition: color var(--transition), text-shadow var(--transition), transform var(--transition) !important;
}
.social-link svg { width: 22px; height: 22px; color: #999; transition: color var(--transition), filter var(--transition); }
.social-link:hover { color: var(--green) !important; text-shadow: 0 0 10px rgba(61,255,110,0.5); transform: translateX(3px); }
.social-link:hover svg { color: var(--green); filter: drop-shadow(0 0 5px rgba(61,255,110,0.75)); }
.support-list { display: grid; gap: 7px; padding: 0; color: var(--text-muted); font-size: 0.8rem; list-style: none; }
.support-list li { transition: color var(--transition), transform var(--transition); }
.support-list li:hover { color: var(--green); transform: translateX(3px); }
.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   SECTION TITLE (shared)
   ============================================================ */
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.section-title .accent { color: var(--green); }
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .nav-links, .nav-actions .search-box { display: none; }
  .nav-hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============================================================
   CART DRAWER
   ============================================================ */
body.cart-is-open { overflow: hidden; }
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.72);
  animation: overlayIn 0.22s ease-out;
}
.cart-overlay[hidden] { display: none; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(390px, 100vw);
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: #0b0b0b;
  border-left: 1px solid #303030;
  box-shadow: -12px 0 40px rgba(0,0,0,0.5);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer-header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid #292929; }
.cart-drawer-header h2 { font-size: 1rem; }
.cart-drawer-header h2 span { color: var(--green); margin-right: 7px; }
.cart-drawer-header h2 small { color: var(--green); font-size: 0.7rem; font-weight: 500; }
.drawer-close { color: #ddd; font-size: 1.5rem; line-height: 1; padding: 5px; transition: color var(--transition), transform var(--transition); }
.drawer-close:hover { color: var(--green); transform: rotate(90deg); }
.cart-drawer-content { flex: 1; overflow-y: auto; padding: 13px 13px 20px; }
.drawer-items { display: grid; gap: 12px; }
.drawer-item { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) 20px; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid #1f1f1f; }
.drawer-item-image { width: 58px; height: 58px; background: #161616; }
.drawer-item-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.drawer-item-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drawer-item-info small { color: #7d7d7d; font-size: 0.56rem; text-transform: uppercase; }
.drawer-item-info > a { overflow: hidden; color: var(--text); font-size: 0.74rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.drawer-item-info > a:hover { color: var(--green); }
.drawer-item-info > strong { color: var(--green); font-size: 0.78rem; }
.drawer-quantity { width: 68px; height: 23px; display: grid; grid-template-columns: 1fr 1fr 1fr; margin-top: 3px; border: 1px solid #2a2a2a; }
.drawer-quantity button, .drawer-quantity span { display: flex; align-items: center; justify-content: center; color: #cfcfcf; font-size: 0.7rem; }
.drawer-quantity button:hover { color: var(--green); background: #1a1a1a; }
.drawer-remove { align-self: center; color: #777; font-size: 0.9rem; }
.drawer-remove:hover { color: #ff6868; }
.clear-cart { margin-top: 14px; color: #8b8b8b; font-size: 0.72rem; text-decoration: underline; }
.clear-cart:hover { color: var(--green); }
.drawer-empty { min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #999; text-align: center; }
.drawer-empty span { font-size: 2rem; opacity: 0.65; }
.drawer-empty strong { color: var(--text); font-size: 0.9rem; }
.drawer-empty p { font-size: 0.75rem; }
.cart-drawer-footer { padding: 16px 13px 18px; border-top: 1px solid #292929; }
.drawer-total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; color: #aaa; font-size: 0.78rem; }
.drawer-total strong { color: var(--green); font-size: 1.25rem; }
.drawer-checkout { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #000; background: var(--green); font-size: 0.75rem; font-weight: 800; transition: background var(--transition), box-shadow var(--transition); }
.drawer-checkout:hover { background: #fff; box-shadow: 0 0 20px rgba(61,255,110,0.6); }
.drawer-checkout.is-disabled { opacity: 0.45; }
.cart-drawer-footer > p { margin-top: 9px; color: #777; font-size: 0.62rem; text-align: center; }
.cart-btn.cart-added { animation: cartAdded 0.7s ease-out; }
@keyframes cartAdded { 30% { color: var(--green); transform: scale(1.16); } 100% { transform: scale(1); } }
