/* NDMART Premium CSS Stylesheet
   Designed and Developed by NDtechHub, a unit of Navdiva Group Pvt Ltd */

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

:root {
  --primary: #0b1528;         /* Rich Slate Blue Header */
  --primary-light: #16253b;   /* Sub-header */
  --accent: #f59e0b;          /* Amazon Orange for primary buttons/highlights */
  --accent-hover: #d97706;    /* Button hover state */
  --accent-yellow: #facc15;   /* Review Stars & Prime Gold */
  
  /* Light Mode Variables */
  --bg-light: #f3f4f6;
  --card-light: #ffffff;
  --text-light: #111827;
  --text-muted-light: #6b7280;
  --border-light: #e5e7eb;
  
  /* Dark Mode Variables */
  --bg-dark: #080c14;
  --card-dark: #111827;
  --text-dark: #f9fafb;
  --text-muted-dark: #9ca3af;
  --border-dark: #374151;
  
  /* Active Theme Colors (switched dynamically) */
  --bg: var(--bg-light);
  --card: var(--card-light);
  --text: var(--text-light);
  --text-muted: var(--text-muted-light);
  --border: var(--border-light);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --header-height: 70px;
}

.dark-mode {
  --bg: var(--bg-dark);
  --card: var(--card-dark);
  --text: var(--text-dark);
  --text-muted: var(--text-muted-dark);
  --border: var(--border-dark);
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility Classes */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
  gap: 8px;
}

.btn-primary {
  background-color: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-secondary {
  background-color: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--border);
}

.btn-dark {
  background-color: var(--primary);
  color: #fff;
}

.btn-dark:hover {
  opacity: 0.9;
}

.badge {
  background-color: var(--accent);
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.stars {
  color: var(--accent-yellow);
  display: inline-flex;
  gap: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   Header Component
   ========================================================================== */
header {
  background-color: var(--primary);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-main {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.logo-container a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-img {
  height: 42px;
  border-radius: 4px;
}

.logo-text {
  font-family: 'Outfit';
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -1px;
  background: linear-gradient(90deg, #ffffff 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Delivery Location Indicator */
.delivery-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.delivery-location:hover {
  border-color: rgba(255,255,255,0.3);
}

.delivery-location span {
  display: block;
}

.delivery-location .loc-to {
  color: var(--text-muted-dark);
  font-size: 0.75rem;
}

.delivery-location .loc-name {
  font-weight: 700;
}

/* Search Bar */
.search-bar-container {
  flex: 1;
  max-width: 700px;
  display: flex;
  position: relative;
}

.search-select {
  padding: 0 14px;
  border-radius: 6px 0 0 6px;
  border: none;
  background-color: #f3f4f6;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
  border-right: 1px solid #d1d5db;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  font-size: 0.95rem;
  background-color: #ffffff;
  color: #111827;
}

.search-btn {
  background-color: var(--accent);
  color: #000;
  padding: 0 20px;
  border-radius: 0 6px 6px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background-color: var(--accent-hover);
}

/* Search Suggestions dropdown */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 110;
  display: none;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.suggestion-item {
  padding: 12px 16px;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.suggestion-item:hover {
  background-color: #f3f4f6;
}

/* Nav Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  border-color: rgba(255,255,255,0.3);
}

.nav-link span {
  display: block;
}

.nav-link .link-sub {
  color: var(--text-muted-dark);
  font-size: 0.75rem;
}

.nav-link .link-main {
  font-weight: 700;
}

/* Cart Icon */
.cart-link {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  font-weight: 700;
  position: relative;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.cart-link:hover {
  border-color: rgba(255,255,255,0.3);
}

.cart-icon-wrapper {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--accent);
  color: #000;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

/* Theme Toggle button */
.theme-toggle-btn {
  color: #fff;
  padding: 8px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
}

.theme-toggle-btn:hover {
  background-color: rgba(255,255,255,0.1);
}

/* ==========================================================================
   Secondary Navbar Components
   ========================================================================== */
.header-subnav {
  background-color: var(--primary-light);
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 500;
}

.subnav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.subnav-item {
  color: #f3f4f6;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: var(--transition);
}

.subnav-item:hover, .subnav-item.active {
  border-color: rgba(255,255,255,0.25);
  background-color: rgba(255,255,255,0.05);
}

.subnav-item.menu-trigger {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-ticker {
  color: var(--accent);
  font-weight: 600;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ==========================================================================
   Home Hero Carousel
   ========================================================================== */
.hero-carousel {
  position: relative;
  height: 380px;
  overflow: hidden;
  margin-bottom: -120px; /* Overlaps with content like Amazon */
}

.hero-carousel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
}

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

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.3);
  color: #fff;
  width: 50px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  z-index: 10;
  border-radius: 4px;
}

.carousel-control:hover {
  background-color: rgba(0,0,0,0.6);
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* ==========================================================================
   Home Content Grid
   ========================================================================== */
.home-content {
  position: relative;
  z-index: 5;
  padding-bottom: 60px;
}

.category-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.category-card {
  background-color: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card h3 {
  font-family: 'Outfit';
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.category-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.grid-item {
  cursor: pointer;
}

.grid-item-img {
  height: 100px;
  background: linear-gradient(135deg, rgba(11,21,40,0.05) 0%, rgba(245,158,11,0.05) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 6px;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.grid-item:hover .grid-item-img {
  transform: scale(1.05);
}

.grid-item span {
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
  text-align: center;
  color: var(--text-muted);
}

.category-card-link {
  color: #0284c7;
  font-size: 0.9rem;
  font-weight: 600;
}

.category-card-link:hover {
  text-decoration: underline;
}

/* Slider Section (Horizontal Scroll deals) */
.product-slider-section {
  background-color: var(--card);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  border: 1px solid var(--border);
}

.product-slider-section h3 {
  font-family: 'Outfit';
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-slider-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 0;
  scroll-behavior: smooth;
}

.slider-card {
  min-width: 200px;
  max-width: 200px;
  cursor: pointer;
  transition: var(--transition);
}

.slider-card:hover {
  transform: translateY(-2px);
}

.slider-img-container {
  height: 150px;
  background-color: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.slider-deal-tag {
  background-color: #b91c1c;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.slider-price {
  font-size: 1.1rem;
  font-weight: 700;
}

.slider-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
}

/* ==========================================================================
   Product Grid & Sidebar Filters Page
   ========================================================================== */
.product-page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  padding: 30px 0;
}

/* Sidebar Filters */
.filter-sidebar {
  background-color: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h4 {
  font-family: 'Outfit';
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
  cursor: pointer;
}

.filter-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Main Grid List */
.products-list-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card);
  padding: 16px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

/* Product Card */
.product-card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.product-card-img-box {
  height: 180px;
  background-color: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid var(--border);
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #b91c1c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.product-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 44px;
  margin-bottom: 8px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.curr-price {
  font-size: 1.3rem;
  font-weight: 800;
}

.old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   Product Detail View
   ========================================================================== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr 300px;
  gap: 30px;
  padding: 40px 0;
}

/* Gallery column */
.detail-gallery {
  position: sticky;
  top: 90px;
  height: fit-content;
}

.main-image-display {
  height: 380px;
  background-color: rgba(0,0,0,0.02);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  margin-bottom: 16px;
}

.image-thumbnails {
  display: flex;
  gap: 12px;
}

.thumb-item {
  width: 70px;
  height: 70px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background-color: var(--card);
}

.thumb-item.active {
  border-color: var(--accent);
}

/* Information Column */
.detail-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-title {
  font-family: 'Outfit';
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.brand-link {
  color: #0284c7;
  font-weight: 600;
}

.detail-price-box {
  background-color: rgba(245, 158, 11, 0.05);
  border-left: 4px solid var(--accent);
  padding: 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.detail-price-box .price-save {
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.detail-spec-table tr {
  border-bottom: 1px solid var(--border);
}

.detail-spec-table td {
  padding: 10px;
  font-size: 0.9rem;
}

.detail-spec-table td:first-child {
  font-weight: 700;
  width: 30%;
  color: var(--text-muted);
}

/* Buying Column */
.detail-buy-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stock-status {
  font-weight: 700;
  color: #15803d;
}

.delivery-estimate {
  font-size: 0.9rem;
}

.qty-select-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Reviews Section
   ========================================================================== */
.reviews-section {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
}

.reviews-summary-card {
  height: fit-content;
}

.reviews-summary-card h4 {
  font-family: 'Outfit';
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.rating-bar-track {
  flex: 1;
  height: 16px;
  background-color: var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background-color: var(--accent);
}

.review-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.review-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}

.review-user-avatar {
  width: 32px;
  height: 32px;
  background-color: var(--primary-light);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Cart Page
   ========================================================================== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  padding: 40px 0;
}

.cart-items-panel {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.cart-title {
  font-family: 'Outfit';
  font-size: 1.8rem;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.cart-item-row {
  display: grid;
  grid-template-columns: 100px 1fr 150px;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-img-box {
  height: 100px;
  background-color: rgba(0,0,0,0.02);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 1px solid var(--border);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-qty-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

.qty-counter {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.qty-counter button {
  padding: 4px 10px;
  background-color: rgba(0,0,0,0.02);
}

.qty-counter button:hover {
  background-color: var(--border);
}

.qty-counter input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 700;
}

.cart-item-price-box {
  text-align: right;
}

.cart-item-price {
  font-size: 1.2rem;
  font-weight: 700;
}

.cart-item-mrp {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Subtotal / Summary panel */
.cart-summary-panel {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.summary-row.total {
  font-size: 1.3rem;
  font-weight: 800;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  padding: 40px 0;
}

.checkout-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.checkout-step-card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.checkout-step-card.active {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.step-num {
  background-color: var(--primary-light);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-header h3 {
  font-family: 'Outfit';
  font-size: 1.25rem;
  font-weight: 700;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-group input, .form-group select {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background-color: transparent;
  color: var(--text);
}

.payment-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.payment-option.selected {
  border-color: var(--accent);
  background-color: rgba(245, 158, 11, 0.04);
}

.payment-option input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Order Success page
   ========================================================================== */
.success-screen {
  text-align: center;
  max-width: 600px;
  margin: 60px auto;
  background-color: var(--card);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.success-icon-box {
  width: 80px;
  height: 80px;
  background-color: #dcfce7;
  color: #16a34a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 24px auto;
  animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-screen h2 {
  font-family: 'Outfit';
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.invoice-preview-box {
  background-color: rgba(0,0,0,0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

/* ==========================================================================
   Orders History List Page
   ========================================================================== */
.orders-page {
  padding: 40px 0;
}

.order-history-card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.order-card-header {
  background-color: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

.order-meta-info {
  display: flex;
  gap: 30px;
}

.order-meta-label {
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.order-meta-val {
  font-weight: 700;
}

.order-card-body {
  padding: 24px;
}

.order-product-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.order-tracking-bar {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  position: relative;
  padding: 10px 0;
}

.order-tracking-bar::after {
  content: '';
  position: absolute;
  top: 23px;
  left: 20px;
  right: 20px;
  height: 4px;
  background-color: var(--border);
  z-index: 1;
}

.track-node {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.node-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--border);
  margin: 0 auto 8px auto;
  border: 4px solid var(--card);
  transition: var(--transition);
}

.track-node.completed .node-dot {
  background-color: #16a34a;
}

.track-node.active .node-dot {
  background-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.2);
}

.track-node.cancelled .node-dot {
  background-color: #b91c1c;
}

.node-label {
  font-size: 0.75rem;
  font-weight: 700;
}

/* ==========================================================================
   Admin Dashboard panel
   ========================================================================== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  padding: 40px 0;
}

.admin-sidebar {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  height: fit-content;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  margin-bottom: 6px;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background-color: var(--primary-light);
  color: #fff;
}

.admin-content-card {
  background-color: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--bg);
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-val {
  font-family: 'Outfit';
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.9rem;
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  font-weight: 700;
  background-color: rgba(0,0,0,0.02);
}

/* ==========================================================================
   Modals & Drawers & Popups
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: 'Outfit';
  font-weight: 700;
  font-size: 1.3rem;
}

.close-modal-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--accent);
  transform: translateY(20px);
  opacity: 0;
  animation: slideIn 0.3s forwards, fadeOut 0.3s 2.7s forwards;
}

@keyframes slideIn {
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* ==========================================================================
   Footer Component
   ========================================================================== */
footer {
  background-color: #232f3e;
  color: #eaeded;
  font-size: 0.85rem;
}

.back-to-top {
  background-color: #37475a;
  text-align: center;
  padding: 15px 0;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.back-to-top:hover {
  background-color: #485769;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid #3a4553;
}

.footer-links-col h4 {
  font-family: 'Outfit';
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
}

.footer-links-col ul {
  list-style: none;
}

.footer-links-col li {
  margin-bottom: 10px;
}

.footer-links-col a:hover {
  text-decoration: underline;
}

.footer-copyright {
  text-align: center;
  padding: 30px 20px;
  background-color: #19222d;
  color: #9ca3af;
}

.footer-copyright .credit {
  margin-top: 8px;
  font-weight: 600;
  color: #eaeded;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */
@media(max-width: 1024px) {
  .product-detail-layout {
    grid-template-columns: 1fr 1fr;
  }
  .detail-buy-card {
    grid-column: span 2;
    position: static;
  }
}

@media(max-width: 768px) {
  .header-main {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 0;
  }
  .search-bar-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 6px;
  }
  .product-page-layout {
    grid-template-columns: 1fr;
  }
  .filter-sidebar {
    display: none; /* Hide filter on mobile or make toggleable */
  }
  .product-detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-gallery {
    position: static;
  }
  .detail-buy-card {
    grid-column: span 1;
  }
  .cart-layout, .checkout-layout {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full-width {
    grid-column: span 1;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

/* Custom AppFooter Styles */
.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.dark-mode .glass-panel {
  background: rgba(17, 24, 39, 0.4);
}

.glass-panel h3 {
  color: var(--text) !important;
}

.glass-panel p {
  color: var(--text-muted) !important;
}

.glass-btn {
  background-color: var(--accent);
  color: #000 !important;
  font-weight: 700;
  border: 1px solid transparent;
  transition: var(--transition);
}

.glass-btn:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  transform: translateY(-1px);
}

.amz-link {
  color: #ccc;
  transition: var(--transition);
  text-decoration: none;
}

.amz-link:hover {
  color: var(--accent) !important;
  text-decoration: underline !important;
}

.amz-link svg {
  display: inline-block;
  vertical-align: middle;
}
