/*
 * TryZ Hyperlocal Clothing E-Commerce
 * Custom Stylesheet - Minimalist Noir Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-primary: #151218;
  --bg-secondary: #0A0A0A;
  --surface-low: #1e1a21;
  --surface-container: #221e25;
  --surface-high: #2c292f;
  --surface-highest: #37333a;
  --border-color: #252530;
  
  --text-primary: #F0EEF5;
  --text-muted: #8B8A9B;
  --text-on-primary: #441177;
  
  --color-primary: #dbb8ff;
  --color-secondary: #ffade2;
  --color-tertiary: #fda9ff;
  --color-accent: #C879EA;
  --color-error: #ffb4ab;
  
  /* Gradients */
  --brand-gradient: linear-gradient(135deg, #5B2D8E 0%, #C026A0 50%, #C026D3 100%);
  --brand-gradient-hover: linear-gradient(135deg, #6c37a7 0%, #d42bb2 50%, #d62ceb 100%);
  --glass-gradient: rgba(30, 26, 33, 0.8);
  
  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-base: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  
  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-out;
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* Force mobile-only view frame on desktop, standard fluid on mobile */
.app-shell {
  width: 100%;
  max-width: 480px; /* Max mobile width */
  min-height: 100vh;
  background-color: var(--bg-secondary);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  overflow-y: auto;
  padding-bottom: 74px; /* Space for sticky bottom nav */
  padding-top: 64px; /* Space for sticky top bar */
}

/* Hide scrollbars but keep functionality */
.app-shell::-webkit-scrollbar,
.horizontal-scroll::-webkit-scrollbar {
  display: none;
}
.app-shell,
.horizontal-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Typography styles */
h1, h2, h3, h4, .price, .brand-font {
  font-family: var(--font-display);
}

/* Floating Top Navbar */
.top-nav {
  position: fixed;
  top: 0;
  width: 100%;
  max-width: 480px;
  height: 64px;
  background: var(--glass-gradient);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-base);
}

.brand-logo-container {
  height: 36px;
  display: flex;
  align-items: center;
}

.brand-logo-img {
  height: 100%;
  object-fit: contain;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--surface-low);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.location-badge:hover {
  background-color: var(--surface-container);
}

.location-badge span {
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-icon-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.cart-icon-btn:hover {
  background-color: var(--surface-low);
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-display);
  min-width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg-secondary);
}

/* Floating Bottom Navbar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: 70px;
  background: var(--glass-gradient);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  background: none;
  border: none;
  flex: 1;
  height: 100%;
  justify-content: center;
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: var(--transition-fast);
}

.nav-item.active svg {
  stroke: var(--color-primary);
  filter: drop-shadow(0 0 6px rgba(219, 184, 255, 0.4));
}

/* Horizontal scrollable items */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  gap: var(--space-base);
  padding: var(--space-base);
  scroll-snap-type: x mandatory;
}

.horizontal-scroll > * {
  scroll-snap-align: start;
  flex-shrink: 0;
}



/* Category filter chips */
.filter-container {
  padding: 4px var(--space-base);
  margin-bottom: var(--space-sm);
}

.filter-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 4px;
}

.filter-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 8px 16px;
  background-color: var(--surface-low);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-chip.active {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  border-color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* Search bar styling */
.search-container {
  padding: var(--space-base);
  position: relative;
}

.search-input {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 12px 16px 12px 42px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(200, 121, 234, 0.15);
}

.search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Product Grid */
.products-section {
  padding: 0 var(--space-base) var(--space-md) var(--space-base);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-base);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background-color: var(--surface-low);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.product-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.product-image-container {
  position: relative;
  width: 100%;
  padding-bottom: 125%; /* 4:5 Aspect Ratio */
  background-color: var(--surface-container);
  overflow: hidden;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.tag-hyperlocal {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--brand-gradient);
  color: white;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 6px;
  border-radius: var(--radius-full);
  z-index: 1;
}

.product-info {
  padding: var(--space-sm) 10px 10px 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-brand {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.product-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.product-mrp {
  font-size: 11px;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-left: 4px;
}


/* View panels switcher */
.view-panel {
  display: none;
  flex-direction: column;
  animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-panel.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feed screen styling */
.feed-header {
  padding: var(--space-base);
  text-align: center;
}

.feed-header h1 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.feed-header p {
  font-size: 12px;
  color: var(--text-muted);
}

.feed-item {
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-md);
}

.feed-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-base) var(--space-sm) var(--space-base);
}

.feed-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 12px;
  font-family: var(--font-display);
}

.feed-brand-name {
  font-weight: 600;
  font-size: 13px;
}

.feed-brand-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.feed-image-container {
  width: 100%;
  padding-bottom: 125%; /* 4:5 aspect ratio */
  position: relative;
  background-color: var(--surface-container);
}

.feed-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-base);
}

.feed-like-comment {
  display: flex;
  gap: var(--space-base);
}

.feed-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 12px;
}

.feed-desc {
  padding: 0 var(--space-base) var(--space-xs) var(--space-base);
  font-size: 13px;
}

.feed-desc span {
  font-weight: 700;
  margin-right: 6px;
}

/* Product Detail Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  justify-content: center;
}

.drawer-overlay.active {
  display: flex;
}

.detail-drawer {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background-color: var(--surface-low);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  border-top: 1px solid var(--border-color);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.drawer-overlay.active .detail-drawer {
  transform: translateY(0);
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background-color: var(--surface-highest);
  border-radius: var(--radius-full);
  margin: 12px auto;
  flex-shrink: 0;
}

.drawer-content {
  overflow-y: auto;
  padding: 0 var(--space-base) var(--space-md) var(--space-base);
  flex-grow: 1;
}

.drawer-image-slider {
  display: flex;
  overflow-x: auto;
  gap: var(--space-sm);
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-base);
}

.drawer-image-slider::-webkit-scrollbar {
  display: none;
}

.drawer-img-container {
  width: 70%;
  padding-bottom: 87.5%; /* Adjust for slide representation */
  flex-shrink: 0;
  scroll-snap-align: center;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.drawer-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-header {
  margin-bottom: var(--space-base);
}

.drawer-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
}

.drawer-title-price {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-base);
}

.drawer-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.drawer-price-block {
  text-align: right;
  flex-shrink: 0;
}

.drawer-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-mrp {
  font-size: 13px;
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Sizing Selector */
.size-section {
  margin-bottom: var(--space-base);
}

.size-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.size-selector {
  display: flex;
  gap: 10px;
}

.size-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--surface-container);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.size-btn.selected {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  border-color: var(--text-primary);
}

/* Specifications Table */
.spec-section {
  margin-bottom: var(--space-base);
  background-color: var(--surface-container);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: var(--space-base);
}

.spec-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.spec-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 8px;
  font-size: 12px;
}

.spec-label {
  color: var(--text-muted);
  font-weight: 500;
}

.spec-val {
  color: var(--text-primary);
}

/* CTA footer drawer */
.drawer-footer {
  padding: var(--space-base);
  border-top: 1px solid var(--border-color);
  background-color: var(--surface-low);
  display: flex;
  gap: var(--space-sm);
}

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  background: var(--brand-gradient-hover);
  box-shadow: 0 4px 15px rgba(192, 38, 160, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: var(--surface-container);
}

.btn-close-drawer {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  padding: 0;
}

/* Cart Screen Styling */
.cart-header {
  padding: var(--space-base);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 20px;
  font-weight: 700;
}

.btn-clear-cart {
  background: none;
  border: none;
  color: var(--color-error);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.cart-empty-state {
  padding: var(--space-xl) var(--space-base);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-base);
}

.cart-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-items-list {
  padding: var(--space-base);
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
}

.cart-item {
  display: flex;
  gap: var(--space-base);
  background-color: var(--surface-low);
  padding: var(--space-base);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  position: relative;
}

.cart-item-img-container {
  width: 70px;
  height: 87.5px; /* 4:5 ratio */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.cart-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cart-item-brand {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 0.05em;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-size-badge {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 700;
  background-color: var(--surface-container);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.cart-item-price {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.qty-counter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--surface-container);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.qty-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: none;
  background-color: var(--surface-high);
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

.cart-item-remove-btn {
  position: absolute;
  top: var(--space-base);
  right: var(--space-base);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cart-item-remove-btn:hover {
  color: var(--color-error);
}

/* Settings block for sheet */
.settings-section {
  padding: 0 var(--space-base);
  margin-bottom: var(--space-md);
}

.settings-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.settings-drawer {
  display: none;
  background-color: var(--surface-low);
  border: 1px solid var(--border-color);
  padding: var(--space-base);
  border-radius: var(--radius-lg);
  margin-top: var(--space-sm);
}

.settings-drawer.active {
  display: block;
}

/* Checkout Form */
.checkout-section {
  padding: var(--space-base);
  border-top: 1px solid var(--border-color);
}

.checkout-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-base);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.form-group {
  margin-bottom: var(--space-sm);
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.form-input {
  width: 100%;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(200, 121, 234, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Order Summary */
.summary-card {
  background-color: var(--surface-low);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-base);
  margin-bottom: var(--space-base);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.summary-row.total {
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
}

.summary-label {
  color: var(--text-muted);
}

.summary-val {
  color: var(--text-primary);
}

.summary-val.free {
  color: #22c55e;
  font-weight: 600;
}

/* Order placement button block */
.checkout-btn-block {
  padding: 0 var(--space-base) var(--space-md) var(--space-base);
}

/* Delivery Live Tracker Section */
.tracker-header {
  padding: var(--space-md) var(--space-base);
  background-color: var(--surface-low);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.tracker-time-card {
  background: var(--brand-gradient);
  border-radius: var(--radius-lg);
  padding: var(--space-base) var(--space-md);
  color: white;
  margin-bottom: var(--space-base);
  box-shadow: 0 4px 20px rgba(192, 38, 160, 0.3);
}

.time-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
  margin-bottom: var(--space-xs);
}

.time-countdown {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tracker-status-bar {
  display: flex;
  justify-content: space-between;
  margin: var(--space-base) 0;
  padding: 0 var(--space-sm);
  position: relative;
}

.tracker-status-bar::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 32px;
  right: 32px;
  height: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.tracker-progress-line {
  position: absolute;
  top: 15px;
  left: 32px;
  width: 0%; /* Dynamic update */
  height: 2px;
  background: var(--brand-gradient);
  z-index: 2;
  transition: width 0.8s ease-in-out;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 3;
  width: 60px;
}

.status-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--surface-container);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.status-step.active .status-dot {
  background: var(--brand-gradient);
  border-color: #fff;
  color: white;
  box-shadow: 0 0 10px rgba(192, 38, 160, 0.6);
}

.status-step.completed .status-dot {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}

.status-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
}

.status-step.active .status-label {
  color: var(--color-primary);
}

/* Stylized Vector Map */
.tracker-map-container {
  height: 260px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-base);
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.map-svg {
  width: 100%;
  height: 100%;
  background-color: #0b090e;
}

.map-street {
  fill: none;
  stroke: #1b1622;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-street-major {
  stroke: #251e30;
  stroke-width: 4;
}

.map-route-bg {
  fill: none;
  stroke: rgba(219, 184, 255, 0.05);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-route {
  fill: none;
  stroke: url(#mapGradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600; /* Animate this down to 0 */
  filter: drop-shadow(0 0 4px rgba(192, 38, 160, 0.8));
}

.map-pulse {
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.map-icon {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.courier-marker {
  transition: transform 0.2s linear;
}

/* Active Tracker Info List */
.tracker-log {
  padding: 0 var(--space-base) var(--space-base) var(--space-base);
}

.log-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.log-item {
  display: flex;
  gap: var(--space-base);
  font-size: 12px;
  background-color: var(--surface-low);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border-left: 2px solid var(--border-color);
}

.log-item.active {
  border-left-color: var(--color-accent);
  background-color: var(--surface-container);
}

.log-time {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-accent);
  width: 50px;
  flex-shrink: 0;
}

.log-desc {
  color: var(--text-primary);
}

.log-item.active .log-desc {
  font-weight: 600;
}

/* Toast Message */
.toast {
  position: fixed;
  bottom: 86px;
  left: 50%;
  transform: translateX(-50%) translateY(150px);
  background-color: var(--surface-high);
  border: 1px solid var(--color-primary);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  z-index: 2000;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 6px var(--color-accent);
}
