/* ── NovaShop Premium Mobile App-like CSS ──────────────────────────────── */

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Compact Sticky Mobile Header */
  .nova-storefront-header--sticky {
    position: sticky;
    top: 0;
    z-index: 1040;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.05);
  }

  header.nova-navbar {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  }

  /* On small phones keep announcement but allow language link via drawer */
  @media (max-width: 480px) {
    .nova-announcement .d-flex.align-items-center.gap-3 {
      display: none !important;
    }
  }

  /* Sticky Bottom Navigation Bar */
  .nova-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.06);
  }

  .nova-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    flex: 1;
    height: 100%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    background: transparent;
    padding: 4px 0;
  }

  .nova-mobile-nav-item i {
    font-size: 1.35rem;
    margin-bottom: 1px;
    transition: transform 0.2s ease, color 0.2s ease;
  }

  .nova-mobile-nav-item:active i {
    transform: scale(0.85);
  }

  .nova-mobile-nav-item:hover,
  .nova-mobile-nav-item.active {
    color: var(--color-primary);
  }

  .nova-mobile-nav-item.active i {
    color: var(--color-secondary);
    transform: translateY(-2px);
  }

  /* Cart Badge Overlay */
  .nova-mobile-nav-item .badge {
    position: absolute;
    top: 5px;
    left: 55%;
    padding: 0.25em 0.5em;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(220, 38, 38, 0.3);
  }

  /* Modern Slide-out Menu Mobile Drawer */
  .nova-mobile-drawer {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: min(290px, 88vw);
    height: 100vh;
    height: 100dvh;
    padding: 1.25rem 1rem 2rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1085;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-105%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05), 10px 0 40px rgba(0, 0, 0, 0.3);
    border-radius: 0 24px 24px 0;
  }

  html[dir="rtl"] .nova-mobile-drawer {
    transform: translateX(105%);
    border-radius: 24px 0 0 24px;
    box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.05), -10px 0 40px rgba(0, 0, 0, 0.3);
  }

  .nova-mobile-drawer--open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) !important;
  }

  .nova-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1080;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s;
  }

  .nova-mobile-overlay--open {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }

  body.nova-mobile-drawer-open {
    overflow: hidden;
  }

  .nova-mobile-drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nova-mobile-drawer__lang {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nova-mobile-drawer__lang-label {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .nova-mobile-drawer__section {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.55);
    padding: 0.35rem 0.5rem 0.5rem;
  }

  .nova-mobile-drawer__nav a {
    color: #e2e8f0 !important;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 12px;
    transition: all 0.2s ease;
  }

  .nova-mobile-drawer__nav a:hover,
  .nova-mobile-drawer__nav a:active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff !important;
    transform: translateX(4px);
  }

  html[dir="rtl"] .nova-mobile-drawer__nav a:hover,
  html[dir="rtl"] .nova-mobile-drawer__nav a:active {
    transform: translateX(-4px);
  }

  .nova-mobile-drawer__nav a i {
    font-size: 1.15rem;
    color: var(--color-secondary);
  }

  .nova-mobile-drawer .btn-close-white {
    opacity: 0.8;
  }

  /* Custom Search Input on Mobile */
  .nova-search-suggest-host input {
    border-radius: 12px !important;
    border: 1px solid rgba(17, 24, 39, 0.08) !important;
    background-color: #f1f5f9 !important;
    padding: 0.5rem 1rem !important;
  }

  .nova-search-suggest-host input:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15) !important;
    border-color: var(--color-secondary) !important;
  }
}

/* ── Stepper/Timeline for Order Status Redesign ─────────────────────── */
.nova-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.nova-stepper::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 5%;
  right: 5%;
  height: 4px;
  background: #e2e8f0;
  z-index: 1;
}

.nova-stepper-progress {
  position: absolute;
  top: 25px;
  left: 5%;
  height: 4px;
  background: var(--color-success);
  z-index: 1;
  transition: width 0.4s ease;
}

.nova-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.nova-step-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 4px solid #fff;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.nova-step.active .nova-step-icon {
  background: var(--color-success);
  color: #fff;
  box-shadow: 0 6px 15px rgba(22, 163, 74, 0.3);
}

.nova-step.current .nova-step-icon {
  background: var(--color-success);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.2), 0 6px 15px rgba(22, 163, 74, 0.3);
  animation: pulse-step 2s infinite;
}

.nova-step.cancelled .nova-step-icon {
  background: var(--color-danger);
  color: #fff;
  box-shadow: 0 6px 15px rgba(220, 38, 38, 0.3);
}

.nova-step-label {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}

.nova-step.active .nova-step-label,
.nova-step.current .nova-step-label {
  color: var(--color-primary);
}

.nova-step.cancelled .nova-step-label {
  color: var(--color-danger);
}

@keyframes pulse-step {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4), 0 4px 10px rgba(0, 0, 0, 0.05); }
  70% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0), 0 4px 10px rgba(0, 0, 0, 0.05); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0), 0 4px 10px rgba(0, 0, 0, 0.05); }
}

/* Vertical stepper on small devices */
@media (max-width: 767.98px) {
  .nova-stepper {
    flex-direction: column;
    padding: 0;
    margin-bottom: 1.5rem;
    gap: 1.25rem;
  }

  .nova-stepper::before {
    top: 0;
    bottom: 0;
    left: 27px;
    width: 4px;
    height: 100%;
  }

  html[dir="rtl"] .nova-stepper::before {
    left: auto;
    right: 27px;
  }

  .nova-stepper-progress {
    display: none;
  }

  .nova-step {
    flex-direction: row;
    gap: 1rem;
    align-items: center;
  }

  .nova-step-label {
    margin-top: 0;
    text-align: start;
    font-size: 0.9rem;
  }
}

/* ── Modern Premium Cards for Order Details ───────────────────────── */
.order-details-card {
  border: none;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.order-details-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.5rem;
}

.order-details-body {
  padding: 1.5rem;
}

.info-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.info-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-item-content {
  min-width: 0;
}

.info-item-title {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.info-item-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* ── Realtime Toast Notification Styling ──────────────────────────── */
.nova-toast-push {
  min-width: 280px;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15) !important;
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(10px);
  color: #fff !important;
  overflow: hidden;
}

.nova-toast-push-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--color-secondary) !important;
  padding: 0.6rem 1rem;
}

.nova-toast-push-body {
  padding: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ── Premium Enhancements: Cart, Tracking, Dashboard & Payment selections ── */

@keyframes bounce-effect {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}
.animate-bounce {
  animation: bounce-effect 0.8s infinite alternate;
}

.hover-grow {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.hover-grow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

/* Tracking SVG animations */
.tracking-road {
  stroke-dasharray: 8;
  animation: dash 35s linear infinite;
}
@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}
.pulse-glow {
  animation: pulse-glow-anim 2s infinite;
}
@keyframes pulse-glow-anim {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/* Glassmorphism Profile styles */
.profile-gradient-avatar {
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.2);
}

.dashboard-stat-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.dashboard-stat-card:hover {
  transform: translateY(-4px) !important;
  border-color: var(--color-secondary) !important;
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.08) !important;
}

/* Payment Selectable Cards */
.payment-grid-card {
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: var(--color-card);
}
.payment-grid-card:hover {
  border-color: var(--color-secondary);
  background: rgba(212, 175, 55, 0.01);
}
.payment-grid-card input[type="radio"]:checked + .payment-card-content {
  color: var(--color-primary);
}
.payment-grid-card:has(input[type="radio"]:checked) {
  border-color: var(--color-secondary) !important;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.1);
  background: rgba(212, 175, 55, 0.03);
}

.payment-card-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 30px;
}
html[dir="rtl"] .payment-card-badge {
  right: auto;
  left: 15px;
}
