/* ══════════════════════════════════════════════
   shared.css — Common styles for cart & checkout
   ══════════════════════════════════════════════ */

/* ─── Navbar ─── */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border-light, #eee);
  padding: 0 40px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  direction: rtl;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.nav-logo-text .name-ar {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1206;
  font-family: 'Tajawal', sans-serif;
  line-height: 1.2;
}

.nav-logo-text .name-en {
  font-size: 0.62rem;
  color: #999;
  letter-spacing: 0.12em;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  background: #f8f8f8;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid #eee;
}

/* ─── User Avatar & Dropdown ─── */
.user-profile-wrap {
  position: relative;
  display: none; /* shown by JS when logged in */
}

.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-bg-a11y, #97690F);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: 0.2s;
  box-shadow: 0 2px 8px rgba(215,164,73,0.3);
}

.user-avatar-btn:hover { transform: scale(1.05); }

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  min-width: 200px;
  padding: 8px;
  display: none;
  z-index: 500;
  animation: dropIn 0.15s ease;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown.open { display: block; }

.user-dropdown-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 6px;
}

.user-dropdown-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #111;
}

.user-dropdown-email {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  color: #555;
  text-decoration: none;
  font-size: 0.88rem;
  transition: 0.15s;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  direction: rtl;
  font-family: inherit;
}

.user-dropdown-item:hover {
  background: #fdf7ee;
  color: var(--gold-text-a11y, #8A6416);
}

.user-dropdown-item.danger { color: #e74c3c; }
.user-dropdown-item.danger:hover { background: #fff5f5; color: #c0392b; }

/* ─── Checkout Steps Bar ─── */
.checkout-steps {
  background: #fafafa;
  border-bottom: 1px solid #efefef;
  padding: 14px 0;
}

.steps-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  border: 2px solid #ddd;
  color: #aaa;
  background: #fff;
  transition: 0.2s;
}

.step.active .step-circle {
  background: var(--gold-bg-a11y, #97690F);
  border-color: var(--gold-bg-a11y, #97690F);
  color: #fff;
  box-shadow: 0 3px 10px rgba(215,164,73,0.35);
}

.step.done .step-circle {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #bbb;
  white-space: nowrap;
}

.step.active .step-label { color: var(--gold-text-a11y, #8A6416); }
.step.done .step-label   { color: #27ae60; }

.step-line {
  flex: 1;
  height: 2px;
  background: #e0e0e0;
  margin-bottom: 22px;
  min-width: 28px;
}

.step-line.done { background: #27ae60; }

/* ─── WhatsApp Float ─── */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 1000;
  text-decoration: none;
  transition: 0.3s;
}

.whatsapp-float:hover { transform: scale(1.1) rotate(8deg); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; height: 60px; }
  .steps-inner { max-width: 100%; }
  .step-label { font-size: 0.62rem; }
  .step-circle { width: 30px; height: 30px; font-size: 0.75rem; }
  .step-line { min-width: 16px; }
}

/* ─── Header V6 (unified site header) ─── */
.header-v6 {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0ece4;
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-right { flex: 0 0 auto; }
.nav-center { display: flex; align-items: center; gap: 28px; }
.nav-left   { display: flex; align-items: center; gap: 16px; }

.nav-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1a1206;
}

.nav-logo-img {
  height: 46px;
  width: 46px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.nav-logo-text { line-height: 1.1; }
.nav-logo-text .brand-name  { font-size: 1.2rem; font-weight: 700; margin: 0; font-family: 'Tajawal', sans-serif; }
.nav-logo-text span { font-size: 0.65rem; color: #888; font-family: 'Inter', sans-serif; letter-spacing: 0.1em; }

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  padding-bottom: 2px;
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover { color: #8A6416; }
.nav-link.active { color: #8A6416; font-weight: 600; border-bottom: 2px solid #D7A449; }

.action-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #F5EDD6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #B8862E;
  position: relative;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: 0.2s;
}
.action-circle:hover { background: #F0E8D5; transform: scale(1.05); }

.action-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #97690F;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(215,164,73,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.action-initials:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(215,164,73,0.45); }

.profile-card {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 264px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.14);
  padding: 22px;
  z-index: 9999;
  display: none;
  animation: pcDropIn 0.2s ease;
}
@keyframes pcDropIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-card-header { text-align: center; padding-bottom: 16px; border-bottom: 1px solid #f3f3f3; margin-bottom: 12px; }
.profile-card-name   { font-weight: 700; font-size: 1rem; color: #111; }
.profile-card-email  { font-size: 0.72rem; color: #999; }

.profile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #333;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s;
}
.profile-nav-link:hover { background: #FAF7F0; color: #8A6416; }
