﻿/* ===== AUTH & USER PANEL STYLES ===== */

/* NAV AUTH */
.nav-auth-area { display: flex; align-items: center; }

/* Cart Icon */
.nav-cart-icon {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: var(--secondary);
  border-radius: 50%;
  font-size: 1.1rem;
  color: white;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}
.nav-cart-icon:hover { background: #b8922e; }
.cart-count {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--primary);
  color: white;
  font-size: 0.58rem;
  font-weight: 800;
  width: 17px; height: 17px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  display: none;
  border: 2px solid white;
}

/* User icon button + dropdown wrapper */
.nav-user-wrap {
  position: relative;
  display: flex; align-items: center;
}
.nav-user-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
  flex-shrink: 0; padding: 0;
}
.nav-user-btn:hover { border-color: var(--secondary); background: rgba(201,168,76,0.08); color: var(--secondary); }
.nav-avatar {
  width: 100%; height: 100%;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
}

/* Dropdown */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(26,56,41,0.14);
  min-width: 200px;
  z-index: 9999;
  overflow: hidden;
  animation: dropIn 0.18s ease;
}
.nav-dropdown.open { display: block; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-drop-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), #2d5c40);
}
.nav-drop-avatar {
  width: 38px; height: 38px;
  background: var(--secondary); color: var(--primary);
  border-radius: 50%; font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.nav-drop-name { color: white; font-weight: 700; font-size: 0.88rem; }
.nav-drop-email { color: rgba(255,255,255,0.6); font-size: 0.72rem; }
.nav-drop-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-drop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px;
  font-size: 0.875rem; font-weight: 500; color: var(--primary);
  text-decoration: none; transition: background 0.15s;
  cursor: pointer; width: 100%; border: none; background: none;
  font-family: var(--font-body); text-align: left;
}
.nav-drop-item:hover { background: var(--light); color: var(--secondary); }
.nav-drop-icon { font-size: 1rem; width: 20px; text-align: center; }
.nav-drop-logout { color: #e74c3c; }
.nav-drop-logout:hover { background: #fff0f0; color: #c0392b; }

/* AUTH PAGES */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0e1520 0%, #1a3829 50%, #0a0800 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 80px 20px 40px;
}
.auth-card {
  background: white;
  border-radius: 24px;
  width: 100%; max-width: 460px;
  padding: 48px 44px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo::before {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: url("data:image/svg+xml,<svg viewBox='0 0 44 44' fill='none' xmlns='http://www.w3.org/2000/svg'><circle cx='22' cy='22' r='20' stroke='%23c9a84c' stroke-width='1.5'/><path d='M14 30L22 13L30 30' stroke='%23c9a84c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/><line x1='17' y1='24.5' x2='27' y2='24.5' stroke='%23c9a84c' stroke-width='1.6' stroke-linecap='round'/><path d='M22 13C21 10 18 9 18 11C18 13 20.5 13.5 22 13Z' fill='%23c9a84c'/><path d='M22 13C23 10 26 9 26 11C26 13 23.5 13.5 22 13Z' fill='%23c9a84c'/></svg>") center/contain no-repeat;
}
.auth-logo .logo-main {
  font-family: 'Cinzel', 'Trajan Pro', Georgia, serif;
  font-size: 2rem;
  color: var(--secondary);
  letter-spacing: 0.1em;
  font-weight: 600;
}
.auth-logo .logo-sub {
  font-size: 0.6rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--secondary);
  display: block;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 2px;
}
.auth-title { font-size: 1.5rem; color: var(--primary); margin-bottom: 6px; }
.auth-sub { font-size: 0.875rem; color: var(--gray); margin-bottom: 28px; }
.auth-form .form-group { margin-bottom: 18px; }
.auth-form label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.auth-form input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
  font-family: var(--font-body);
  box-sizing: border-box;
}
.auth-form input:focus { border-color: var(--secondary); }
.auth-form input.error { border-color: #e74c3c; }
.auth-btn {
  width: 100%; padding: 14px;
  background: var(--primary); color: white;
  border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
  font-family: var(--font-body); margin-top: 8px;
}
.auth-btn:hover { background: var(--secondary); }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-divider {
  text-align: center; color: var(--gray);
  font-size: 0.82rem; margin: 20px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute; top: 50%;
  width: 42%; height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-links { text-align: center; font-size: 0.85rem; margin-top: 20px; }
.auth-links a { color: var(--secondary); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  display: none;
}
.auth-alert.error { background: #fff0f0; color: #c0392b; border: 1px solid #fcd0d0; display: block; }
.auth-alert.success { background: #f0fff4; color: #27ae60; border: 1px solid #b8f0cc; display: block; }

/* OTP VERIFICATION BOXES */
.otp-boxes { display: flex; justify-content: center; gap: 12px; margin: 8px 0 4px; }
.otp-boxes input.otp-box {
  width: 48px; height: 48px;
  border: 1.5px solid var(--border) !important;
  border-radius: 50% !important;
  text-align: center;
  font-size: 1.2rem; font-weight: 700;
  color: var(--primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 0;
  box-sizing: border-box;
}
.otp-boxes input.otp-box:focus { border-color: var(--secondary) !important; box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
@media (max-width: 420px) {
  .otp-boxes { gap: 8px; }
  .otp-boxes input.otp-box { width: 42px; height: 42px; font-size: 1.05rem; }
}

/* PASSWORD STRENGTH */
.pwd-strength { margin-top: 6px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.pwd-strength-bar { height: 100%; width: 0; transition: width 0.3s, background 0.3s; border-radius: 2px; }
.pwd-hint { font-size: 0.72rem; color: var(--gray); margin-top: 4px; }

/* ─── PROFILE PAGE ─── */
.profile-page { padding: 40px 0 80px; min-height: 80vh; }
.profile-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}
.profile-sidebar {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  position: sticky;
  top: 90px;
}
.profile-header-card {
  background: linear-gradient(135deg, var(--primary), #2d5c40);
  padding: 32px 24px;
  text-align: center;
}
.profile-avatar-lg {
  width: 72px; height: 72px;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 50%;
  font-size: 2rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.profile-header-card h3 { color: white; font-size: 1rem; margin-bottom: 2px; }
.profile-header-card p { color: rgba(255,255,255,0.6); font-size: 0.78rem; }
.profile-nav { padding: 16px; }
.profile-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 0.875rem; font-weight: 500; color: var(--gray);
  cursor: pointer; transition: all 0.2s; border: none;
  background: none; width: 100%; text-align: left;
}
.profile-nav-item:hover { background: white; color: var(--primary); }
.profile-nav-item.active { background: var(--primary); color: white; }
.profile-nav-item .pni { font-size: 1rem; }
.profile-content { display: flex; flex-direction: column; gap: 24px; }
.profile-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  display: none;
}
.profile-panel.active { display: block; }
.profile-panel h3 {
  font-size: 1.15rem; color: var(--primary);
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.info-field label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--secondary); display: block; margin-bottom: 4px; }
.info-field p { font-size: 0.9rem; color: var(--primary); font-weight: 500; }
.info-field input, .info-field textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none; transition: border-color 0.2s;
  box-sizing: border-box;
}
.info-field input:focus, .info-field textarea:focus { border-color: var(--secondary); }
.info-field.full { grid-column: 1/-1; }

/* ORDERS TABLE */
.orders-list { display: flex; flex-direction: column; gap: 16px; }
.order-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.order-header {
  background: var(--light);
  padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.order-id { font-weight: 700; color: var(--primary); font-size: 0.9rem; }
.order-date { font-size: 0.78rem; color: var(--gray); }
.order-status {
  padding: 4px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status-confirmed { background: #e8f5e9; color: #2e7d32; }
.status-processing { background: #fff8e1; color: #f57f17; }
.status-shipped { background: #e8f5ed; color: #2d5c40; }
.status-outfordelivery { background: #e8eaf6; color: #3949ab; }
.status-delivered { background: #f3e5f5; color: #6a1b9a; }
.status-cancelled { background: #fce4ec; color: #c62828; }
.order-items { padding: 16px 20px; }
.order-item-row {
  display: flex; justify-content: space-between;
  font-size: 0.85rem; color: var(--gray);
  padding: 6px 0; border-bottom: 1px solid var(--border);
}
.order-item-row:last-child { border-bottom: none; }
.order-total {
  padding: 12px 20px;
  background: var(--light);
  display: flex; justify-content: space-between;
  font-weight: 700; font-size: 0.9rem; color: var(--primary);
}

/* ── ORDER TRACKING TIMELINE (customer-facing) ── */
.order-tracking { padding: 20px; border-top: 1px solid var(--border); }
.order-tracking-meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin-bottom: 20px; font-size: 0.82rem;
}
.otm-item { display: flex; flex-direction: column; gap: 2px; }
.otm-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray); }
.otm-value { font-weight: 700; color: var(--primary); }

.cust-timeline { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.ct-step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 84px; position: relative; }
.ct-line {
  position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0;
}
.ct-step:first-child .ct-line { display: none; }
.ct-step.done .ct-line { background: var(--secondary); }
.ct-dot {
  width: 30px; height: 30px; border-radius: 50%; z-index: 1;
  background: white; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: var(--secondary);
  margin-bottom: 8px;
}
.ct-step.done .ct-dot { background: var(--secondary); border-color: var(--secondary); color: white; }
.ct-step.current .ct-dot { box-shadow: 0 0 0 5px rgba(201,168,76,0.2); animation: ctPulse 1.8s ease-in-out infinite; }
@keyframes ctPulse { 0%,100% { box-shadow: 0 0 0 5px rgba(201,168,76,0.2); } 50% { box-shadow: 0 0 0 9px rgba(201,168,76,0.08); } }
.ct-stage { font-size: 0.72rem; font-weight: 700; text-align: center; color: var(--gray); }
.ct-step.done .ct-stage { color: var(--primary); }
.ct-time { font-size: 0.64rem; color: var(--gray); margin-top: 2px; text-align: center; }
.ct-cancelled-note {
  padding: 12px 16px; background: #fce4ec; color: #c62828;
  border-radius: 10px; font-size: 0.82rem; font-weight: 600;
}
@media (max-width: 560px) { .cust-timeline { justify-content: flex-start; } .ct-step { min-width: 74px; } }

/* CART PAGE */
.cart-page { padding: 40px 0 80px; min-height: 70vh; }
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
.cart-items-box, .cart-summary-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
}
.cart-item-row {
  display: flex; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.cart-item-row:last-child { border-bottom: none; }
.cart-item-emoji {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #1a1200, #3d2b00);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; color: var(--primary); font-size: 0.9rem; margin-bottom: 2px; }
.cart-item-cat { font-size: 0.75rem; color: var(--secondary); }
.cart-item-price { font-weight: 700; color: var(--primary); font-size: 0.95rem; white-space: nowrap; }
.qty-control {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.qty-btn {
  width: 28px; height: 28px;
  background: var(--light); border: 1px solid var(--border);
  border-radius: 6px; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--secondary); color: white; border-color: var(--secondary); }
.qty-num { font-weight: 600; font-size: 0.9rem; min-width: 20px; text-align: center; }
.remove-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray); font-size: 1.1rem; padding: 4px;
  transition: color 0.2s;
}
.remove-btn:hover { color: #e74c3c; }
.summary-row {
  display: flex; justify-content: space-between;
  font-size: 0.875rem; padding: 8px 0; color: var(--gray);
}
.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 8px; padding-top: 16px;
  font-weight: 700; font-size: 1rem; color: var(--primary);
}
.summary-row.discount-row span:last-child { color: #2e7d32; font-weight: 700; }

/* ── PROMO CODE (cart + checkout) ── */
.promo-block { margin: 8px 0; }
.promo-toggle-link {
  display: inline-block; color: var(--secondary); font-weight: 600;
  font-size: 0.85rem; cursor: pointer; text-decoration: none;
}
.promo-toggle-link:hover { text-decoration: underline; }
.promo-input-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.promo-remove-x {
  background: none; border: none; color: var(--gray); font-size: 1rem;
  cursor: pointer; padding: 4px; flex-shrink: 0; line-height: 1;
}
.promo-remove-x:hover { color: #e74c3c; }
.promo-input-row input {
  flex: 1; min-width: 0; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 0.85rem; font-family: var(--font-body); outline: none;
  transition: border-color 0.2s;
}
.promo-input-row input:focus { border-color: var(--secondary); }
.promo-apply-btn {
  padding: 10px 18px; background: var(--secondary); color: white; border: none;
  border-radius: 10px; font-weight: 700; font-size: 0.82rem; cursor: pointer;
  flex-shrink: 0; font-family: var(--font-body); transition: background 0.2s;
}
.promo-apply-btn:hover { background: #b8922e; }
.promo-apply-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.promo-applied-row {
  display: flex; justify-content: space-between; align-items: center;
  background: #e8f5e9; color: #2e7d32; padding: 10px 14px;
  border-radius: 10px; font-size: 0.85rem; margin: 4px 0;
}
.promo-applied-row button {
  background: none; border: none; color: #c0392b; font-size: 0.78rem;
  font-weight: 700; cursor: pointer; font-family: var(--font-body);
}
.promo-error { color: #c0392b; font-size: 0.78rem; margin-top: 6px; }
.checkout-btn {
  display: block; width: 100%;
  background: var(--primary); color: white;
  text-align: center; padding: 14px;
  border-radius: 12px; font-weight: 700;
  font-size: 0.95rem; text-decoration: none;
  margin-top: 16px; border: none; cursor: pointer;
  font-family: var(--font-body); transition: background 0.2s;
}
.checkout-btn:hover { background: var(--secondary); }
.empty-cart {
  text-align: center; padding: 80px 40px;
  color: var(--gray);
}
.empty-cart .icon { font-size: 4rem; margin-bottom: 16px; }

/* BUY / ADD TO CART BUTTONS ON PRODUCT CARDS */
.product-buy-row {
  display: flex; gap: 8px; margin-top: 8px;
}
.btn-buy {
  flex: 1; background: var(--primary); color: white;
  border: none; border-radius: 8px;
  padding: 8px 12px; font-size: 0.74rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
}
.btn-buy:hover { background: var(--secondary); }
.btn-cart {
  background: rgba(245,240,230,0.7); border: 1.5px solid var(--border);
  color: var(--primary); border-radius: 8px;
  padding: 8px 12px; font-size: 0.74rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font-body);
}
.btn-cart:hover { border-color: var(--secondary); background: rgba(201,168,76,0.08); }
.product-price {
  font-family: var(--font-heading);
  font-size: 1.05rem; color: var(--secondary);
  font-weight: 700; margin-top: 8px;
  display: flex; align-items: baseline; gap: 9px;
}
.product-price .price-original {
  font-size: 0.82rem; font-weight: 500; color: var(--gray);
  text-decoration: line-through;
}
.product-price .price-current { color: var(--secondary); font-weight: 700; }

/* CHECKOUT */
.checkout-page { padding: 40px 0 80px; }
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px; align-items: start;
}
.checkout-box {
  background: white; border: 1px solid var(--border);
  border-radius: 20px; padding: 32px;
}
.checkout-box h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.checkout-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.checkout-form .form-group { margin-bottom: 16px; }
.checkout-form label { font-size: 0.78rem; font-weight: 600; color: var(--primary); display: block; margin-bottom: 5px; }
.checkout-form input, .checkout-form select, .checkout-form textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 0.88rem; font-family: var(--font-body);
  outline: none; transition: border-color 0.2s; box-sizing: border-box;
}
.checkout-form input:focus, .checkout-form select:focus { border-color: var(--secondary); }
.place-order-btn {
  width: 100%; padding: 15px;
  background: var(--secondary); color: var(--primary);
  border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 800;
  cursor: pointer; font-family: var(--font-body);
  margin-top: 8px; transition: opacity 0.2s;
}
.place-order-btn:hover { opacity: 0.9; }

/* ORDER SUCCESS */
.order-success {
  text-align: center; padding: 80px 40px;
}
.success-icon { font-size: 5rem; margin-bottom: 20px; }
.success-id {
  background: var(--light); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 24px;
  display: inline-block; font-weight: 700; color: var(--primary);
  font-size: 1.1rem; margin: 16px auto; letter-spacing: 0.05em;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .auth-card { padding: 36px 24px; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .info-grid { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .checkout-layout { grid-template-columns: 1fr; }
  .checkout-form .form-row { grid-template-columns: 1fr; }
}
