@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --primary: #004aad;
  --primary-dark: #003590;
  --primary-light: #ecf2ff;
  --white: #ffffff;
  --bg: #f8faff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ─── AUTH PAGE ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 24px;
}

.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 74, 173, 0.3);
}

.auth-logo {
  margin-bottom: 28px;
}

.auth-logo img {
  height: 110px;
  width: auto;
  object-fit: contain;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.google-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.15);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.email-form { text-align: left; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 500; font-size: 0.85rem; margin-bottom: 5px; }
.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}
.form-group input:focus { border-color: var(--primary); }

.primary-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 13px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 4px;
}
.primary-btn:hover { background: var(--primary-dark); }

.auth-switch {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}
.auth-switch a:hover { text-decoration: underline; }

.auth-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.auth-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  display: none;
}

/* ─── HEADER ──────────────────────────────────────── */
.header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-left { display: flex; align-items: center; gap: 8px; }

nav { display: flex; gap: 4px; }
nav a {
  padding: 7px 14px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  transition: all 0.2s;
}
nav a:hover, nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.15);
}

.header-right { display: flex; align-items: center; gap: 10px; }

.social-icons { display: flex; gap: 8px; }
.social-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background 0.2s;
}
.social-icon:hover { background: rgba(255,255,255,0.3); }

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 0.85rem;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  object-fit: cover;
}

.signout-btn {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.83rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.signout-btn:hover { background: rgba(255,255,255,0.25); }

.cart-btn {
  position: relative;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.2s;
}
.cart-btn:hover { background: rgba(255,255,255,0.25); }

.cart-badge {
  background: #fbbf24;
  color: #1a1a1a;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--white);
}

/* ─── LOGO BANNER ─────────────────────────────────── */
.logo-banner {
  background: var(--white);
  text-align: center;
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.logo-banner img { height: 144px; width: auto; object-fit: contain; }

/* ─── PAGE HERO ───────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 48px 20px;
  text-align: center;
}
.page-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-hero p { opacity: 0.85; font-size: 1rem; }

/* ─── SECTIONS ────────────────────────────────────── */
.section { padding: 64px 0; }
.section-muted { background: var(--primary-light); }
.section-dark { background: var(--primary); color: var(--white); }

.section-header { text-align: center; margin-bottom: 44px; }
.section-header .label {
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.section-header h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.section-header .divider {
  width: 48px; height: 3px;
  background: var(--primary);
  border-radius: 99px;
  margin: 0 auto 12px;
}
.section-header p.desc { color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* ─── PRODUCT GRID ────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 74, 173, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 74, 173, 0.15);
}

.product-card-img {
  width: 100%;
  height: 230px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }

.product-card-body { padding: 14px; }
.product-card-body h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price-scratch { text-decoration: line-through; color: #a3a3a3; font-size: 0.78rem; }
.price-current { color: var(--primary); font-weight: 700; font-size: 1.05rem; }

.btn-add {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-add:hover { background: var(--primary-dark); }

/* ─── COMBOS ──────────────────────────────────────── */
.combos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.combo-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 74, 173, 0.08);
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.combo-card:hover { transform: translateY(-4px); }
.combo-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.combo-card-body { padding: 14px; }
.combo-card-body h3 { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; }
.combo-card-body p { color: var(--text-muted); font-size: 0.82rem; }

/* ─── CTA ─────────────────────────────────────────── */
.cta { text-align: center; }
.cta h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.cta p { opacity: 0.85; margin-bottom: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--primary-light); }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.5); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }

/* ─── CONTACT ─────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  padding: 52px 20px;
}

.info-card, .form-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0, 74, 173, 0.08);
  border: 1px solid var(--border);
}
.info-card h3, .form-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }

.contact-item {
  display: flex; align-items: flex-start;
  gap: 14px; margin-bottom: 20px;
}
.contact-icon {
  width: 40px; height: 40px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.contact-item p { font-weight: 500; font-size: 0.9rem; }
.contact-item a { color: var(--primary); font-size: 0.88rem; }

.form-group-c { margin-bottom: 14px; }
.form-group-c label { display: block; font-weight: 500; font-size: 0.85rem; margin-bottom: 5px; }
.form-group-c input, .form-group-c textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border 0.2s;
}
.form-group-c input:focus, .form-group-c textarea:focus { border-color: var(--primary); }
.form-group-c textarea { resize: vertical; min-height: 100px; }
.form-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 11px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-family: inherit;
  transition: background 0.2s;
}
.form-btn:hover { background: var(--primary-dark); }

/* ─── FOOTER ──────────────────────────────────────── */
.footer {
  background: #0d1117;
  color: var(--white);
  padding: 48px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer h4 { font-weight: 600; margin-bottom: 12px; color: var(--white); font-size: 0.95rem; }
.footer p, .footer span { color: #a3a3a3; font-size: 0.87rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: #a3a3a3; font-size: 0.87rem; transition: color 0.2s; }
.footer-links a:hover { color: #60a5fa; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #1f2937;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background 0.2s;
}
.footer-social a:hover { background: var(--primary); }
.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 20px;
  text-align: center;
  color: #6b7280;
  font-size: 0.82rem;
}

/* ─── CAROUSEL ────────────────────────────────────── */
.carousel { width: 100%; overflow: hidden; height: 340px; }
.carousel-track { display: flex; height: 100%; transition: transform 0.6s ease; }
.carousel-slide { min-width: 100%; height: 100%; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

/* ─── CART DRAWER ─────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0; right: -420px;
  width: 400px; max-width: 100vw;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 20px rgba(0,0,0,0.12);
  z-index: 201;
  transition: right 0.3s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-weight: 700; font-size: 1.05rem; }
.cart-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); }

.cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-item {
  display: flex; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item img {
  width: 60px; height: 60px;
  object-fit: cover; border-radius: 8px;
  background: var(--primary-light); flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.85rem; font-weight: 500; margin-bottom: 4px; }
.cart-item-price { color: var(--primary); font-weight: 600; font-size: 0.88rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 5px; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--primary-light); }
.cart-item-remove {
  background: none; border: none;
  color: #ef4444; font-size: 0.78rem;
  cursor: pointer; align-self: flex-start; margin-left: auto;
}
.cart-footer { border-top: 1px solid var(--border); padding: 16px 20px; }
.cart-total {
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 14px;
}
.cart-empty { text-align: center; padding: 48px 0; color: var(--text-muted); }

.checkout-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 13px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.2s;
}
.checkout-btn:hover { background: var(--primary-dark); }

/* ─── TOAST ───────────────────────────────────────── */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a1a; color: var(--white);
  padding: 12px 20px; border-radius: 8px;
  font-weight: 500; font-size: 0.9rem;
  z-index: 2000; opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 768px) {
  nav { display: none; }
  nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%;
    left: 0; right: 0;
    background: var(--primary);
    padding: 12px 16px;
    z-index: 99;
  }
  .mobile-menu-btn { display: flex; }
  .social-icons { display: none; }
  .logo-banner img { height: 96px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .combos-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; padding: 32px 20px; }
  .carousel { height: 200px; }
  .auth-card { padding: 36px 24px; }
  .user-info span { display: none; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .auth-card { padding: 28px 18px; }
}

/* ─── AUTH TABS ───────────────────────────────────── */
.auth-tabs {
  display: flex;
  border: 2px solid var(--primary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: white;
  color: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.auth-tab.active {
  background: var(--primary);
  color: white;
}
.auth-tab:hover:not(.active) {
  background: #ecf2ff;
}
.secondary-btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.secondary-btn:hover { background: #ecf2ff; }
.auth-hint {
  text-align: center;
  font-size: 0.82rem;
  color: #666;
  margin-top: 10px;
}
.auth-logo img {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* ─── LIGHTBOX ────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lb-fade 0.2s ease;
}
#lightbox.active { display: flex; }
#lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  animation: lb-scale 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
#lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#lightbox-close:hover { background: rgba(255,255,255,0.3); }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lb-scale { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.product-card-img img { transition: transform 0.2s; }
.product-card-img img:hover { transform: scale(1.04); }
