/* ===========================
   Cart Sidebar
   =========================== */

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: #1A1A1A;
  border-left: 1px solid #2A2A2A;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6);
}

.cart-sidebar.open {
  right: 0;
}

/* RTL: slide from left */
[dir="rtl"] .cart-sidebar {
  right: auto;
  left: -420px;
  border-left: none;
  border-right: 1px solid #2A2A2A;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .cart-sidebar.open {
  left: 0;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 8999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Sidebar Header */
.cart-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #2A2A2A;
  background: #121212;
}

.cart-sidebar-header h2 {
  font-size: 1.25rem;
  color: #FFD700;
  font-weight: 700;
}

.cart-close-btn {
  background: none;
  border: none;
  color: #A0A0A0;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.cart-close-btn:hover {
  color: #fff;
  background: #2A2A2A;
}

/* Cart Items */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: #2A2A2A #1A1A1A;
}

.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-thumb {
  background: #2A2A2A;
  border-radius: 3px;
}

.cart-empty {
  text-align: center;
  color: #A0A0A0;
  margin-top: 3rem;
  font-size: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #2A2A2A;
  align-items: flex-start;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: #121212;
  border-radius: 8px;
  border: 1px solid #2A2A2A;
  padding: 0.25rem;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #F0F0F0;
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

.cart-item-price {
  font-size: 1rem;
  font-weight: 700;
  color: #FFD700;
  margin-bottom: 0.5rem;
}

/* Qty Controls */
.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.qty-btn {
  background: #2A2A2A;
  border: 1px solid #3A3A3A;
  color: #F0F0F0;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.qty-btn:hover {
  background: #FFD700;
  border-color: #FFD700;
  color: #000;
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  color: #F0F0F0;
  font-size: 0.95rem;
}

.remove-btn {
  background: transparent;
  border-color: #444;
  color: #FF4C4C;
  font-size: 0.85rem;
  width: auto;
  padding: 0 0.4rem;
}

.remove-btn:hover {
  background: #FF4C4C;
  border-color: #FF4C4C;
  color: #fff;
}

/* Cart Footer */
.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid #2A2A2A;
  background: #121212;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: #F0F0F0;
}

.cart-total strong {
  font-size: 1.3rem;
  color: #FFD700;
}

.cart-checkout-btn {
  width: 100%;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ===========================
   Toast notification
   =========================== */

.cart-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #FFD700;
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  z-index: 10000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}

.cart-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===========================
   Lead Capture Modal
   =========================== */

.lead-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 1rem;
}

.lead-modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.lead-modal {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from { transform: scale(0.92) translateY(-20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.lead-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #A0A0A0;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s;
}

[dir="rtl"] .lead-modal-close {
  right: auto;
  left: 1rem;
}

.lead-modal-close:hover {
  color: #fff;
}

.lead-modal h2 {
  font-size: 1.5rem;
  color: #FFD700;
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

[dir="rtl"] .lead-modal h2 {
  padding-right: 0;
  padding-left: 2rem;
}

.lead-modal-sub {
  color: #A0A0A0;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.lead-form input {
  background: #121212;
  border: 1px solid #3A3A3A;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #F0F0F0;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  width: 100%;
}

.lead-form input:focus {
  outline: none;
  border-color: #FFD700;
}

.lead-form input::placeholder {
  color: #555;
}

.lead-form .btn {
  padding: 0.875rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.lead-form .btn-outline {
  background: transparent;
  border: 1px solid #3A3A3A;
  color: #A0A0A0;
}

.lead-form .btn-outline:hover {
  border-color: #666;
  color: #F0F0F0;
  background: transparent;
}

.lead-confirm {
  text-align: center;
  color: #4CAF50;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1.5rem 0;
  line-height: 1.6;
}

/* ===========================
   Language Selector
   =========================== */

.lang-selector {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #A0A0A0;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.08);
}

.lang-btn.active {
  color: #FFD700;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .cart-sidebar {
    width: 100vw;
    right: -100vw;
  }

  [dir="rtl"] .cart-sidebar {
    left: -100vw;
  }

  .lead-modal {
    padding: 1.5rem;
  }
}
