/* ─── NAV ACTIONS ─── */
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-cart {
  position: relative; background: none; border: none; color: #fff;
  font-size: 18px; cursor: pointer; padding: 8px 12px; border-radius: 8px;
  transition: background 0.3s;
}
.nav-cart:hover { background: rgba(255,255,255,0.1); }
.cart-badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.nav-auth-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.25);
  color: #fff; padding: 8px 18px; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.3s; display: inline-flex; align-items: center; gap: 6px;
}
.nav-auth-btn:hover { background: var(--primary-light); border-color: var(--primary-light); }
.nav-user-menu { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 14px; font-weight: 500; }
.nav-logout {
  background: none; border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.7);
  padding: 6px 14px; border-radius: 6px; font-size: 12px; cursor: pointer; transition: all 0.3s;
}
.nav-logout:hover { border-color: #ef5350; color: #ef5350; }

/* ─── SEARCH BAR ─── */
.search-bar {
  display: flex; align-items: center; gap: 12px;
  max-width: 560px; margin: -30px auto 40px; padding: 14px 24px;
  background: #fff; border-radius: 60px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1.5px solid #e8e8e8; transition: border-color 0.3s;
}
.search-bar:focus-within { border-color: var(--primary-light); box-shadow: 0 4px 24px rgba(76,175,80,0.15); }
.search-icon { font-size: 20px; flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none; font-size: 15px;
  font-family: 'Inter'; background: transparent; color: var(--text-dark);
}
.search-count { font-size: 13px; color: var(--primary-light); font-weight: 600; white-space: nowrap; }

/* ─── ADD TO CART BUTTON ─── */
.product-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.btn-add-cart {
  padding: 10px 18px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff; font-weight: 700; font-size: 13px; cursor: pointer;
  transition: all 0.3s; white-space: nowrap;
}
.btn-add-cart:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,143,0,0.35); }

/* ─── CART SIDEBAR ─── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 90vw;
  height: 100vh; background: #fff; z-index: 2001;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transition: right 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.cart-sidebar.open { right: 0; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px; border-bottom: 1px solid #eee;
}
.cart-header h3 { font-size: 20px; font-weight: 700; margin: 0; }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #666; padding: 4px 8px; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-item {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 12px; background: #f8f9fa; margin-bottom: 12px;
  position: relative;
}
.cart-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.cart-item-code { font-size: 12px; color: var(--text-muted); }
.cart-qty {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
}
.cart-qty button {
  width: 28px; height: 28px; border: 1px solid #ddd; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.cart-qty button:hover { border-color: var(--primary-light); color: var(--primary); }
.cart-qty span { font-weight: 700; font-size: 15px; min-width: 20px; text-align: center; }
.cart-remove {
  position: absolute; top: 8px; right: 8px; background: none;
  border: none; color: #ccc; cursor: pointer; font-size: 16px;
  transition: color 0.2s;
}
.cart-remove:hover { color: #ef5350; }
.cart-empty {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.cart-empty span { font-size: 48px; display: block; margin-bottom: 16px; opacity: 0.3; }
.cart-empty p { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: var(--text-dark); }
.cart-empty small { font-size: 14px; }
.cart-summary { padding: 20px 24px; border-top: 1px solid #eee; }
.cart-total { font-size: 16px; margin-bottom: 16px; }
.btn-order {
  width: 100%; padding: 16px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff; font-weight: 700; font-size: 16px; cursor: pointer;
  transition: all 0.3s;
}
.btn-order:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(76,175,80,0.35); }
.cart-note { display: block; text-align: center; margin-top: 10px; font-size: 12px; color: var(--text-muted); }

/* ─── MODALS ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 3000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: 20px; padding: 40px;
  width: 420px; max-width: 90vw; position: relative;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px; background: none;
  border: none; font-size: 20px; cursor: pointer; color: #999;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { background: #f5f5f5; color: #333; }
.modal-header { text-align: center; margin-bottom: 28px; }
.modal-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.modal-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.modal-header p { color: var(--text-muted); font-size: 14px; }
.modal .form-group { margin-bottom: 16px; }
.modal .form-group label { font-size: 13px; }
.modal .form-group input { padding: 12px 16px; font-size: 14px; }
.modal .btn-submit { margin-top: 8px; }
.modal-footer {
  text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted);
}
.modal-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
.modal-footer a:hover { text-decoration: underline; }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--primary-dark); color: #fff; padding: 14px 28px;
  border-radius: 12px; font-size: 14px; font-weight: 600;
  z-index: 5000; opacity: 0; transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-actions { gap: 6px; }
  .nav-auth-btn { font-size: 12px; padding: 6px 12px; }
  .nav-lang { display: none; }
  .product-actions { flex-direction: column; align-items: stretch; }
  .btn-add-cart { text-align: center; }
}
