/* ===== CART DRAWER ===== */
.cart-overlay {
  position: fixed; inset: 0; z-index: 3000; background: var(--bg-overlay);
  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; bottom: 0; width: 420px; max-width: 100%;
  background: var(--bg-secondary); z-index: 3001; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--transition), visibility var(--transition);
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
  visibility: hidden; pointer-events: none;
}
[dir="rtl"] .cart-drawer { right: auto; left: 0; transform: translateX(-100%); box-shadow: 10px 0 40px rgba(0,0,0,0.2); }
.cart-overlay.open .cart-drawer { transform: translateX(0); visibility: visible; pointer-events: auto; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cart-header h3 span { color: var(--accent); }
.cart-close { width: 36px; height: 36px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition); }
.cart-close:hover { background: var(--accent-light); color: var(--accent); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; padding: 60px 20px; }
.cart-empty i { font-size: 3rem; color: var(--text-tertiary); margin-bottom: 16px; }
.cart-empty p { color: var(--text-secondary); }
.cart-item {
  display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.cart-item-img {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.cart-item-price { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 0.8rem; transition: all var(--transition); background: var(--bg-tertiary);
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-item-qty { font-size: 0.9rem; font-weight: 600; min-width: 24px; text-align: center; }
.cart-item-remove { margin-left: auto; color: var(--text-tertiary); font-size: 0.85rem; padding: 4px; }
[dir="rtl"] .cart-item-remove { margin-left: 0; margin-right: auto; }
.cart-item-remove:hover { color: var(--danger); }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1.05rem; font-weight: 700; }
.cart-total .amount { color: var(--accent); }
.cart-checkout { width: 100%; padding: 14px; border-radius: var(--radius-md); background: var(--accent-gradient); color: #fff; font-weight: 700; font-size: 1rem; border: none; cursor: pointer; transition: all var(--transition); }
.cart-checkout:hover { box-shadow: 0 8px 25px rgba(0,180,216,0.4); }

/* ===== WISHLIST DRAWER ===== */
.wishlist-overlay {
  position: fixed; inset: 0; z-index: 3000; background: var(--bg-overlay);
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.wishlist-overlay.open { opacity: 1; pointer-events: all; }
.wishlist-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%;
  background: var(--bg-secondary); z-index: 3001; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--transition), visibility var(--transition);
  box-shadow: -10px 0 40px rgba(0,0,0,0.2);
  visibility: hidden; pointer-events: none;
}
[dir="rtl"] .wishlist-drawer { right: auto; left: 0; transform: translateX(-100%); box-shadow: 10px 0 40px rgba(0,0,0,0.2); }
.wishlist-overlay.open .wishlist-drawer { transform: translateX(0); visibility: visible; pointer-events: auto; }
.wishlist-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.wishlist-header h3 { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.wishlist-close { width: 36px; height: 36px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all var(--transition); }
.wishlist-close:hover { background: var(--accent-light); color: var(--accent); }
.wishlist-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.wishlist-empty { text-align: center; padding: 60px 20px; }
.wishlist-empty i { font-size: 3rem; color: var(--text-tertiary); margin-bottom: 16px; }
.wishlist-item {
  display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-light); align-items: center;
}
.wishlist-item-img { width: 70px; height: 70px; border-radius: var(--radius-sm); background: var(--bg-tertiary); flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.wishlist-item-img img { width: 100%; height: 100%; object-fit: contain; }
.wishlist-item-info { flex: 1; }
.wishlist-item-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.wishlist-item-price { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.wishlist-item-actions { display: flex; gap: 8px; }
.wishlist-add-cart, .wishlist-remove {
  width: 34px; height: 34px; border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.85rem; transition: all var(--transition);
}
.wishlist-add-cart:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.wishlist-remove:hover { background: rgba(239,68,68,0.1); color: var(--danger); border-color: var(--danger); }

/* ===== AUTH MODAL ===== */
.auth-overlay {
  position: fixed; inset: 0; z-index: 4000; background: var(--bg-overlay);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.auth-overlay.open { opacity: 1; pointer-events: all; }
.auth-modal {
  width: 90%; max-width: 440px; background: var(--bg-secondary);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-xl);
  border: 1px solid var(--border); overflow: hidden;
  transform: scale(0.9); transition: transform var(--transition);
}
.auth-overlay.open .auth-modal { transform: scale(1); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; padding: 16px; text-align: center; font-weight: 600; font-size: 0.95rem;
  color: var(--text-tertiary); cursor: pointer; transition: all var(--transition);
  border-bottom: 2px solid transparent;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-form { padding: 28px; }
.auth-form.hidden { display: none; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text-primary); }
.form-group input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--bg-input);
  color: var(--text-primary); font-size: 0.95rem; transition: border-color var(--transition); outline: none;
}
.form-group input:focus { border-color: var(--accent); }
.auth-submit {
  width: 100%; padding: 14px; border-radius: var(--radius-md);
  background: var(--accent-gradient); color: #fff; font-weight: 700;
  font-size: 1rem; border: none; cursor: pointer; transition: all var(--transition);
}
.auth-submit:hover { box-shadow: 0 8px 25px rgba(0,180,216,0.4); }
.auth-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  border-radius: var(--radius-full); display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); cursor: pointer; transition: all var(--transition);
}
[dir="rtl"] .auth-close { right: auto; left: 16px; }
.auth-close:hover { background: var(--accent-light); color: var(--accent); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-footer); padding: 60px 0 0; color: var(--text-on-footer);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--container-padding-x) 40px;
  box-sizing: border-box;
}
.footer-brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 4px;
}
.footer-brand-logo .logo-icon,
.footer-brand-logo .brand-logo-shell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  background: transparent;
}
.footer-brand-logo .brand-logo:not(.brand-logo--ui) {
  display: block;
  width: auto;
  height: auto;
  max-width: min(220px, 72vw);
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
}
[dir="rtl"] .footer-brand-logo .brand-logo:not(.brand-logo--ui) {
  object-position: right center;
}
.footer-desc { color: #64748b; font-size: 0.9rem; line-height: 1.7; margin: 16px 0 24px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  border: 1px solid #1e3a5f; display: flex; align-items: center; justify-content: center;
  color: #64748b; transition: all var(--transition);
}
.footer-social a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.footer-col h4 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 20px; }
.footer-col a {
  display: block;
  padding: 6px 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition), text-decoration-color var(--transition);
}
.footer-col a:hover,
.footer-col a:focus-visible {
  color: #e8f1fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-bottom {
  border-top: 1px solid #1e3a5f; padding: 16px var(--container-padding-x);
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px;
  text-align: center;
  box-sizing: border-box;
}
.footer-copy { font-size: 0.85rem; color: #475569; }
.payment-icons { display: flex; gap: 12px; align-items: center; }
.payment-icon {
  height: 28px; padding: 4px 12px; background: #152238; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: #64748b;
}

/* ===== FLOATING ACTION STACK (bottom → top: WhatsApp, Support Chat, Scroll-To-Top) ===== */
:root {
  --aw-float-inline-end: 24px;
  --aw-float-gap: 12px;
  --aw-float-base: 24px;
  --aw-float-whatsapp-size: 56px;
  --aw-float-chat-size: 56px;
  --aw-float-scroll-size: 44px;
  --aw-float-whatsapp-bottom: var(--aw-float-base);
  --aw-float-chat-bottom: calc(var(--aw-float-whatsapp-bottom) + var(--aw-float-whatsapp-size) + var(--aw-float-gap));
  --aw-float-scroll-bottom: calc(var(--aw-float-chat-bottom) + var(--aw-float-chat-size) + var(--aw-float-gap));
  --aw-sc-panel-bottom: calc(var(--aw-float-chat-bottom) + var(--aw-float-chat-size) + var(--aw-float-gap));
  --aw-sc-panel-preferred-height: 560px;
  --aw-sc-panel-max-height: min(var(--aw-sc-panel-preferred-height), calc(100dvh - var(--aw-sc-panel-bottom) - 1rem));
}

@media (max-width: 575.98px) {
  :root {
    --aw-float-inline-end: 16px;
    --aw-float-base: 16px;
    --aw-float-gap: 10px;
  }
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: var(--aw-float-whatsapp-bottom);
  right: var(--aw-float-inline-end);
  z-index: 900;
  width: var(--aw-float-whatsapp-size);
  height: var(--aw-float-whatsapp-size);
  border-radius: var(--radius-full);
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: all var(--transition);
  animation: whatsappPulse 2s infinite;
}
[dir="rtl"] .whatsapp-float { right: auto; left: var(--aw-float-inline-end); }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(37,211,102,0.5); }
@keyframes whatsappPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.6); }
}

/* ===== BACK TO TOP (above Support Chat when visible) ===== */
.back-to-top {
  position: fixed;
  bottom: var(--aw-float-scroll-bottom);
  right: var(--aw-float-inline-end);
  z-index: 900;
  width: var(--aw-float-scroll-size);
  height: var(--aw-float-scroll-size);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-md);
}
[dir="rtl"] .back-to-top { right: auto; left: var(--aw-float-inline-end); }
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ===== SWEETALERT2 ===== */
.alwadi-swal-popup {
    font-family: var(--font-body, 'Inter', sans-serif) !important;
    border-radius: 12px !important;
}

[dir="rtl"] .swal2-popup {
    text-align: right;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  z-index: 9000; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 24px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  opacity: 0; transition: all var(--transition);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast-msg { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }
