/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a2e;
  background-color: #f8f9fa;
  -webkit-font-smoothing: antialiased;
}

/* Header & Glassmorphism */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo */
.logo {
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
  color: #111;
  letter-spacing: -0.5px;
}

.logo .highlight {
  color: #007aff; /* Apple Blue */
}

/* Navigation */
.nav ul {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav a.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
  position: relative;
}

.nav a.nav-link:hover {
  color: #007aff;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-icon {
  font-size: 10px;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 150%;
  left: -20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  min-width: 200px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #444;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu a:hover {
  background: rgba(0, 122, 255, 0.05);
  color: #007aff;
}

/* Header Right Area */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Search Container */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search {
  padding: 10px 16px 10px 36px;
  border-radius: 100px;
  border: 1px solid #e1e1e1;
  background: #f5f5f7;
  font-size: 14px;
  outline: none;
  width: 240px;
  transition: all 0.3s ease;
}

.search:focus {
  background: #fff;
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
  width: 280px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #888;
  font-size: 14px;
}

/* Live Search Suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.search:focus + .search-icon + .search-suggestions,
.search-suggestions:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-suggestions ul {
  list-style: none;
  padding: 8px 0;
}

.search-suggestions li {
  padding: 10px 16px;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

.search-suggestions li i {
  color: #a1a1aa;
}

.search-suggestions li:hover {
  background: #f4f4f5;
  color: #007aff;
}

.search-suggestions li:hover i {
  color: #007aff;
}

/* Cart */
.cart {
  position: relative;
  font-size: 20px;
  cursor: pointer;
  color: #333;
  padding: 8px;
  transition: color 0.3s ease;
}

.cart:hover {
  color: #007aff;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  background: #ff3b30;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  height: 18px;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

/* Cart popup */
.cart-popup {
  position: absolute;
  top: calc(100% + 15px);
  right: -10px;
  width: 320px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  z-index: 100;
  border: 1px solid rgba(0,0,0,0.05);
}

.cart-popup.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

 /* invisible bridge to keep hover active */
.cart::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
}

.cart-popup-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-popup-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.clear-cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.clear-cart-btn:hover {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.08);
}

.cart-items {
  max-height: 250px;
  overflow-y: auto;
  padding: 10px 0;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  gap: 15px;
  transition: background 0.2s;
}

.cart-item:hover {
  background: #f8f9fa;
}

.item-img {
  width: 50px;
  height: 50px;
  background: #f1f3f5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #666;
}

/* Real product thumbnail image in cart popup */
.cart-item-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8f9fa;
  padding: 4px;
  border: 1px solid rgba(0,0,0,0.05);
  flex-shrink: 0;
}

.item-details {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 11px;
  color: #aaa;
  margin-bottom: 3px;
}

.item-price {
  font-size: 12px;
  color: #555;
  font-weight: 500;
}

.item-price strong {
  color: #007aff;
  font-weight: 700;
}

/* Remove item X button */
.remove-item-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.remove-item-btn:hover {
  color: #ff3b30;
  background: rgba(255,59,48,0.08);
}

/* Empty cart state */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  gap: 8px;
  text-align: center;
}

.cart-empty i {
  font-size: 32px;
  color: #ddd;
}

.cart-empty p {
  font-size: 14px;
  color: #aaa;
  margin: 0;
}

.browse-link {
  font-size: 13px;
  font-weight: 600;
  color: #007aff;
  text-decoration: none;
  margin-top: 4px;
}

.browse-link:hover {
  text-decoration: underline;
}

.cart-popup-footer {
  padding: 16px 20px;
  border-top: 1px solid #eee;
  background: #fcfcfc;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #555;
}

.total span {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.checkout-btn {
  width: 100%;
  background: #111;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.checkout-btn:hover {
  background: #333;
}

.checkout-btn:active {
  transform: scale(0.98);
}


/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001; /* Above mobile menu */
}

.hamburger .bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #333;
  position: absolute;
  left: 0;
  transition: all 0.3s ease-in-out;
  border-radius: 2px;
}

.hamburger .bar:nth-child(1) { top: 0; }
.hamburger .bar:nth-child(2) { top: 11px; }
.hamburger .bar:nth-child(3) { top: 22px; }

/* Hamburger Animation */
.hamburger.active .bar:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .search-container {
    display: none; /* Hide search on mobile, or place in menu */
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.4s ease-in-out;
    z-index: 1000;
  }

  .nav.active {
    left: 0;
  }

  .nav ul {
    flex-direction: column;
    gap: 30px;
    align-items: center;
  }

  .nav ul li {
    text-align: center;
  }

  .nav a.nav-link {
    font-size: 24px;
    font-weight: 600;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
    padding: 10px 0 0 0;
    display: none;
  }

  /* Expand dropdown on mobile */
  .dropdown.active .dropdown-menu {
    display: flex;
    margin-top: 10px;
  }

  .dropdown-menu a {
    font-size: 18px;
    color: #666;
  }
  
  .cart-popup {
    display: none; /* Disable cart popup hover on mobile */
  }
}

/* =========================================
   HERO SECTION (Premium Apple Style)
   ========================================= */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fdfbfb 0%, #eaedee 100%);
  padding: 80px 5%;
  overflow: hidden;
}

/* Subtle animated background layer */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,122,255,0.03) 0%, transparent 60%);
  animation: rotateGradient 20s linear infinite;
  z-index: 0;
}

@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1200px;
  width: 100%;
  align-items: center;
  animation: fadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero-text {
  max-width: 500px;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  color: #111;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero-title .highlight {
  background: linear-gradient(90deg, #007aff, #00c6ff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: #555;
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.cta-btn {
  padding: 16px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: #111;
  color: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.primary-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.secondary-btn {
  background: rgba(255,255,255,0.8);
  color: #111;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.1);
}

.secondary-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* Glassmorphism Product Card */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.08);
  max-width: 340px;
  width: 100%;
  position: relative;
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.product-badge {
  position: absolute;
  top: -15px;
  left: 20px;
  background: #fff;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 100px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.featured-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
}

.product-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

.product-info .price {
  font-size: 18px;
  color: #007aff;
  font-weight: 600;
}

/* Scroll Indicator */
.scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  color: #888;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-10px) translateX(-50%); }
  60% { transform: translateY(-5px) translateX(-50%); }
}

/* Mobile Responsiveness for Hero */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-text {
    margin: 0 auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-title {
    font-size: 48px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .cta-btn {
    width: 100%;
  }
}

/* =========================================
   PRODUCTS SECTION (Dynamic Grid)
   ========================================= */
.products {
  padding: 80px 5%;
  background: #f8f9fa;
  min-height: 80vh;
}

.products-container {
  max-width: 1400px;
  margin: 0 auto;
}

.products-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;
  text-align: center;
}

.section-title {
  font-size: 40px;
  font-weight: 800;
  color: #111;
  margin-bottom: 24px;
}

.section-title .highlight {
  color: #007aff;
}

.product-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: 100px;
  border: 1px solid #e1e1e1;
  background: #fff;
  color: #555;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #007aff;
  color: #007aff;
}

.filter-btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* Dynamic Grid Layout */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 100px 0;
  font-size: 18px;
  color: #888;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007aff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Premium Product Card */
.product-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(0,0,0,0.02);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.product-img-wrapper {
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect ratio */
  position: relative;
  background: #fff;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: transform 0.5s ease;
}

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

.product-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin-bottom: 8px;
  line-height: 1.4;
  /* Truncate text */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.product-rating i {
  color: #ffc107;
  font-size: 14px;
}

.product-rating span {
  font-size: 13px;
  color: #666;
}

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

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.add-to-cart-btn {
  background: #f4f4f5;
  color: #111;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-card:hover .add-to-cart-btn {
  background: #111;
  color: #fff;
}

.add-to-cart-btn:active {
  transform: scale(0.9);
}

/* Responsiveness for Grid */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .product-filters {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
}

/* =========================================
   PRODUCT DETAIL PAGE
   ========================================= */
.product-detail-wrapper {
  padding: 40px 5% 80px;
  background: #fff;
  min-height: 70vh;
}

.breadcrumb-nav {
  font-size: 14px;
  color: #888;
  margin-bottom: 40px;
  display: flex;
  gap: 10px;
}

.breadcrumb-nav a {
  color: #111;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb-nav a:hover {
  color: #007aff;
}

.detail-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.detail-img-container {
  background: #fdfdfd;
  border-radius: 24px;
  padding: 40px;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 20px 40px rgba(0,0,0,0.02);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.detail-img {
  width: 100%;
  max-width: 400px;
  height: 400px;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.detail-img-container:hover .detail-img {
  transform: scale(1.15); /* TOP 1% Zoom Feature */
}

.detail-info {
  display: flex;
  flex-direction: column;
}

.detail-category {
  font-size: 14px;
  color: #007aff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 12px;
}

.detail-title {
  font-size: 36px;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.detail-rating i {
  color: #ffc107;
  font-size: 16px;
}

.detail-rating span {
  font-size: 14px;
  color: #888;
}

.detail-price {
  font-size: 32px;
  font-weight: 700;
  color: #111;
  margin-bottom: 24px;
}

.detail-description {
  font-size: 16px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 40px;
}

/* Add to Cart Controls */
.detail-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #e1e1e1;
  border-radius: 100px;
  overflow: hidden;
  height: 54px;
}

.qty-btn {
  background: #f8f9fa;
  border: none;
  width: 44px;
  height: 100%;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: #e9ecef;
}

.qty-input {
  width: 50px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  outline: none;
  background: #fff;
}

/* Chrome, Safari, Edge, Opera hide arrows in number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.detail-add-btn {
  height: 54px;
  padding: 0 40px;
  font-size: 16px;
  flex: 1;
}

.related-products {
  padding-top: 40px;
}

@media (max-width: 900px) {
  .detail-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .detail-img-container {
    padding: 30px;
  }
  
  .detail-img {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .detail-title {
    font-size: 28px;
  }
  
  .detail-price {
    font-size: 28px;
  }
  
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .quantity-selector {
    justify-content: center;
  }
}

/* =========================================
   INTERACTIVE FEATURES — PRODUCT DETAIL
   ========================================= */

/* --- Image Zoom Lens --- */
.detail-img-container {
  position: relative;
  cursor: crosshair;
}

.zoom-lens {
  display: none;
  position: absolute;
  width: 100px;
  height: 100px;
  border: 2px solid rgba(0, 122, 255, 0.6);
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.08);
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.zoom-preview {
  display: none;
  position: absolute;
  top: 0;
  left: calc(100% + 16px);
  width: 320px;
  height: 320px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
  background-repeat: no-repeat;
  background-color: #fdfdfd;
  z-index: 20;
  pointer-events: none;
}

/* Hide zoom preview on mobile — use CSS scale instead */
@media (max-width: 900px) {
  .zoom-lens    { display: none !important; }
  .zoom-preview { display: none !important; }

  .detail-img-container:hover .detail-img {
    transform: scale(1.4);
  }
}

/* --- Price Block --- */
.price-block {
  margin-bottom: 24px;
}

.price-block .detail-price {
  margin-bottom: 4px;
}

.price-total-label {
  font-size: 15px;
  color: #555;
  margin: 0;
}

.price-total-label strong {
  color: #111;
  font-size: 17px;
}

/* --- Product Variations --- */
.variation-group {
  margin-bottom: 22px;
}

.variation-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.selected-label {
  color: #007aff;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variation-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid #e1e1e1;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.variation-btn:hover {
  border-color: #007aff;
  color: #007aff;
}

.variation-btn.active {
  border-color: #007aff;
  background: #007aff;
  color: #fff;
  font-weight: 600;
}

/* Color swatch dot inside button */
.color-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}

/* Override: map common CSS color names */
.color-swatch[style*="spacegray"]    { background: #6e6e73 !important; }
.color-swatch[style*="midnightblack"]{ background: #1c1c1e !important; }
.color-swatch[style*="rosegold"]     { background: #b76e79 !important; }
.color-swatch[style*="default"]      { background: linear-gradient(135deg, #f5f5f5, #ccc) !important; }

/* --- Stock Indicator --- */
.stock-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #32d74b;
  font-weight: 500;
  margin-top: 16px;
  margin-bottom: 0;
}

.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #32d74b;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(50, 215, 75, 0.2);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0px rgba(50, 215, 75, 0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(50, 215, 75, 0);   }
  100% { box-shadow: 0 0 0 0px rgba(50, 215, 75, 0);   }
}

/* --- Toast Notification --- */
.detail-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #111;
  color: #fff;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.detail-toast i {
  color: #32d74b;
  font-size: 18px;
}

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

/* --- Star display in detail --- */
.star-display {
  color: #ffc107;
  font-size: 18px;
  letter-spacing: 2px;
}

/* =========================================
   CART BADGE BOUNCE ANIMATION
   ========================================= */
@keyframes badge-bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.5); }
  70%  { transform: scale(0.85); }
  100% { transform: scale(1); }
}

.cart-count.bounce {
  animation: badge-bounce 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* =========================================
   CART PAGE (cart.html)
   ========================================= */
.cart-page-section {
  padding: 40px 5% 100px;
  background: #f8f9fa;
  min-height: 80vh;
}

.cart-page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.cart-page-title {
  font-size: 32px;
  font-weight: 800;
  color: #111;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

/* Two-column layout: items left, summary right */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* ---- Cart Items Panel ---- */
.cart-items-panel {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.cart-items-panel-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr;
  padding: 14px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cart-page-item {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
  gap: 16px;
}

.cart-page-item:last-child {
  border-bottom: none;
}

.cart-page-item:hover {
  background: #fafafa;
}

.cart-product-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-product-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
  background: #f8f9fa;
  padding: 6px;
  border: 1px solid rgba(0,0,0,0.04);
  flex-shrink: 0;
}

.cart-product-text h4 {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cart-product-text .cart-meta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 8px;
}

.cart-page-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  transition: color 0.2s;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.cart-page-remove-btn:hover {
  color: #ff3b30;
}

.cart-unit-price {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* Quantity stepper in cart page */
.cart-qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #e1e1e1;
  border-radius: 100px;
  overflow: hidden;
  width: fit-content;
  height: 38px;
}

.cart-qty-btn {
  width: 36px;
  height: 100%;
  background: #f8f9fa;
  border: none;
  font-size: 18px;
  color: #444;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:hover {
  background: #e9ecef;
}

.cart-qty-display {
  width: 36px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  background: #fff;
}

.cart-line-total {
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

/* Empty Cart State */
.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
}

.cart-empty-state i {
  font-size: 64px;
  color: #e1e1e1;
  margin-bottom: 24px;
}

.cart-empty-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
}

.cart-empty-state p {
  font-size: 15px;
  color: #888;
  margin-bottom: 28px;
}

/* ---- Order Summary Panel ---- */
.order-summary {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  position: sticky;
  top: 100px;
}

.summary-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}

.shipping-free {
  color: #32d74b;
  font-weight: 700;
  font-size: 13px;
}

/* Promo Code Input */
.promo-group {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 4px;
}

.promo-input {
  flex: 1;
  border: 1.5px solid #e1e1e1;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  color: #111;
}

.promo-input:focus {
  border-color: #007aff;
}

.promo-btn {
  background: #f0f0f0;
  border: none;
  border-radius: 100px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.promo-btn:hover {
  background: #007aff;
  color: #fff;
}

.promo-feedback {
  font-size: 12px;
  min-height: 16px;
  margin: 2px 4px 4px;
}

.promo-feedback.success { color: #32d74b; }
.promo-feedback.error   { color: #ff3b30; }

.summary-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 16px 0;
}

.summary-total-row {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin-bottom: 20px;
}

.checkout-big-btn {
  width: 100%;
  height: 54px;
  font-size: 15px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-big-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.continue-shopping-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  margin-bottom: 20px;
  transition: color 0.2s;
}

.continue-shopping-link:hover {
  color: #007aff;
}

.secure-badges {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.secure-badges span {
  font-size: 11px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 4px;
}

.secure-badges i {
  font-size: 12px;
  color: #bbb;
}

/* ---- Responsive Cart Page ---- */
@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

  .cart-items-panel-header {
    display: none; /* hide column headers on mobile */
  }

  .cart-page-item {
    grid-template-columns: 1fr 1fr;
    row-gap: 12px;
  }

  .cart-product-info {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .cart-page-item {
    grid-template-columns: 1fr;
  }

  .cart-page-title {
    font-size: 24px;
  }
}

/* =========================================
   CHECKOUT PAGE (checkout.html)
   ========================================= */
.checkout-section {
  padding: 40px 5% 100px;
  background: #f8f9fa;
  min-height: 100vh;
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Step Progress Bar ---- */
.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  gap: 0;
}

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

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #ddd;
  background: #fff;
  color: #bbb;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s ease;
}

.step.active .step-circle {
  background: #007aff;
  border-color: #007aff;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,122,255,0.15);
}

.step.done .step-circle {
  background: #32d74b;
  border-color: #32d74b;
  color: #fff;
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.step.active .step-label,
.step.done .step-label {
  color: #111;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e1e1e1;
  max-width: 100px;
  margin-bottom: 20px;
  transition: background 0.4s ease;
}

.step-line.done {
  background: #32d74b;
}

/* ---- Layout ---- */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

/* ---- Form Panel ---- */
.checkout-form-panel {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  min-height: 400px;
}

.checkout-step-panel {
  display: none;
}

.checkout-step-panel.active {
  display: block;
  animation: fadeSlideIn 0.3s ease both;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.step-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-title i {
  color: #007aff;
  font-size: 20px;
}

/* ---- Form Elements ---- */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  height: 48px;
  border: 1.5px solid #e1e1e1;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #111;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  outline: none;
}

.form-input:focus {
  border-color: #007aff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.form-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.input-icon-group {
  position: relative;
}

.input-icon-group .form-input {
  padding-right: 42px;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #bbb;
  font-size: 15px;
}

/* ---- Shipping Options ---- */
.checkout-shipping-options {
  margin-bottom: 24px;
}

.shipping-option-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.shipping-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid #e1e1e1;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.shipping-option input[type="radio"] {
  accent-color: #007aff;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.shipping-option.selected {
  border-color: #007aff;
  background: rgba(0,122,255,0.03);
}

.shipping-option-content {
  flex: 1;
}

.s-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.s-time {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.s-price {
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.free-tag {
  color: #32d74b;
}

/* ---- Payment Tabs ---- */
.payment-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.pay-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  border: 1.5px solid #e1e1e1;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.pay-tab:hover {
  border-color: #007aff;
  color: #007aff;
}

.pay-tab.active {
  background: #007aff;
  border-color: #007aff;
  color: #fff;
}

.pay-tab-content {
  display: none;
}

.pay-tab-content.active {
  display: block;
  animation: fadeSlideIn 0.3s ease both;
}

/* ---- Virtual Card Preview ---- */
.card-preview {
  background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  box-shadow: 0 20px 40px rgba(15, 52, 96, 0.35);
}

.card-preview::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.card-preview::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: 40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.card-chip {
  font-size: 28px;
  color: #ffd700;
  margin-bottom: 20px;
  opacity: 0.9;
}

.card-number-display {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 3px;
  margin-bottom: 24px;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.9);
}

.card-bottom {
  display: flex;
  align-items: flex-end;
  gap: 32px;
}

.card-label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.card-value {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
}

.card-logo {
  margin-left: auto;
  color: rgba(255,255,255,0.8);
}

.save-card-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  margin-top: 8px;
}

.save-card-label input {
  accent-color: #007aff;
  width: 16px;
  height: 16px;
}

/* ---- Alt Payment Blocks ---- */
.alt-payment-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  gap: 16px;
  border: 1.5px dashed #e1e1e1;
  border-radius: 16px;
}

.alt-payment-block p {
  font-size: 14px;
  color: #666;
  max-width: 320px;
  line-height: 1.6;
}

.paypal-logo {
  width: 120px;
}

.paypal-btn {
  background: #003087;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}

.paypal-btn:hover {
  background: #001c5f;
}

.gpay-icon {
  font-size: 28px;
  font-weight: 700;
  color: #111;
}

.gpay-btn {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}

.gpay-btn:hover {
  background: #333;
}

.upi-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.upi-apps {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.upi-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
  border: 1.5px solid #e1e1e1;
  border-radius: 14px;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.upi-app-btn img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.upi-app-btn:hover {
  border-color: #007aff;
  background: #fff;
}

/* ---- Navigation Buttons ---- */
.step-next-btn {
  margin-top: 24px;
  min-width: 200px;
}

.step-nav-btns {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.step-back-btn {
  min-width: 120px;
}

.form-error {
  color: #ff3b30;
  font-size: 13px;
  font-weight: 500;
  margin-top: 8px;
  margin-bottom: 0;
}

/* ---- Review Step ---- */
.review-block {
  background: #f8f9fa;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.review-block h4 {
  font-size: 13px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.review-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #444;
  margin-bottom: 6px;
}

.review-row span:last-child {
  font-weight: 600;
  color: #111;
}

.review-cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.review-cart-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.review-item-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.review-item-info {
  flex: 1;
}

.review-item-title {
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.review-item-qty {
  font-size: 12px;
  color: #888;
}

.review-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #007aff;
}

.place-order-btn {
  flex: 1;
}

/* ---- Checkout Summary Sidebar ---- */
.checkout-summary-panel {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  position: sticky;
  top: 100px;
}

.checkout-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.checkout-summary-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.checkout-summary-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: #f8f9fa;
  padding: 4px;
  flex-shrink: 0;
}

.checkout-summary-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

.checkout-summary-price {
  font-size: 13px;
  font-weight: 700;
  color: #007aff;
}

/* ---- Success Screen ---- */
.success-panel {
  text-align: center;
  padding: 20px 0 40px;
}

.success-animation {
  margin-bottom: 28px;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #32d74b, #20c43c);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: success-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  box-shadow: 0 0 0 0 rgba(50, 215, 75, 0.4);
}

.success-checkmark i {
  color: #fff;
  font-size: 36px;
}

@keyframes success-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-title {
  font-size: 28px;
  font-weight: 800;
  color: #111;
  margin-bottom: 12px;
}

.success-msg {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
}

.order-ref {
  display: inline-block;
  background: #f0f6ff;
  border: 1px solid #c2d9ff;
  border-radius: 100px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 700;
  color: #007aff;
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.success-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Responsive Checkout ---- */
@media (max-width: 900px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary-panel {
    position: static;
    order: -1;
  }

  .form-grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .checkout-form-panel {
    padding: 24px 18px;
  }

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .checkout-steps {
    gap: 0;
  }

  .step-line {
    max-width: 40px;
  }

  .step-label {
    font-size: 10px;
  }

  .card-number-display {
    font-size: 16px;
    letter-spacing: 2px;
  }
}

/* =========================================
   PERFORMANCE & UI UPGRADES
   ========================================= */

/* Skeleton Loader Framework */
.skeleton {
  background: #eee;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  border-radius: 5px;
  background-size: 200% 100%;
  animation: 1.5s shimmer linear infinite;
  display: block;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 20px;
}
.skeleton-img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
}
.skeleton-title {
  width: 40%;
  height: 20px;
  border-radius: 4px;
}
.skeleton-text {
  width: 25%;
  height: 16px;
  border-radius: 4px;
}
.skeleton-flex {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* =========================================
   AUTHENTICATION MODAL STYLES (auth.css)
   ========================================= */

.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.auth-modal {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.4);
  width: 90%;
  max-width: 420px;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.auth-modal-overlay.active .auth-modal {
  transform: translateY(0);
}

.auth-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.05);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #555;
  transition: all 0.2s;
}

.auth-close-btn:hover {
  background: rgba(0,0,0,0.1);
  color: #111;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 2px solid rgba(0,0,0,0.05);
  padding-bottom: 8px;
}

.auth-tab {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  padding: 0;
  position: relative;
  font-family: inherit;
  transition: color 0.2s;
}

.auth-tab.active {
  color: #111;
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #111;
  border-radius: 2px;
}

/* Form Styles */
.auth-form {
  display: none;
  animation: fadeSlideIn 0.3s ease both;
}

.auth-form.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input-group {
  position: relative;
}

.auth-input-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border-radius: 12px;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.7);
  font-size: 14px;
  font-family: inherit;
  color: #111;
  transition: all 0.2s;
  box-sizing: border-box;
  outline: none;
}

.auth-input:focus {
  border-color: #111;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.auth-btn {
  background: #111;
  color: #fff;
  height: 48px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.auth-error {
  color: #ff3b30;
  font-size: 13px;
  text-align: center;
  margin-top: -8px;
  font-weight: 500;
  display: none;
}

/* Header Profile/Login Styles */
.nav-btn.login-btn {
  background: #111;
  color: #fff;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.user-profile-menu {
  position: relative;
  display: none; /* hidden by default */
}

.user-profile-menu.active {
  display: block;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #007aff, #00c6ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.profile-avatar:hover {
  border-color: rgba(0,122,255,0.3);
  box-shadow: 0 2px 8px rgba(0,122,255,0.2);
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 12px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.profile-dropdown.open {
  display: flex;
  animation: fadeSlideIn 0.2s ease both;
}

.profile-header {
  padding: 12px 12px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 4px;
}

.profile-email {
  font-size: 13px;
  font-weight: 600;
  color: #111;
  word-break: break-all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  transition: all 0.2s;
  font-family: inherit;
}

.dropdown-item i {
  font-size: 14px;
  color: #888;
}

.dropdown-item:hover {
  background: rgba(0,0,0,0.03);
  color: #111;
}

.dropdown-item.logout {
  color: #ff3b30;
}

.dropdown-item.logout:hover {
  background: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
}

/* Demo Button Styles */
.auth-divider {
  text-align: center;
  margin: 15px 0 5px;
  color: #888;
  font-size: 13px;
  position: relative;
}
.auth-divider::before, 
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(0,0,0,0.1);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-btn.demo-btn {
  background: #f0f0f0;
  color: #333;
}
.auth-btn.demo-btn:hover {
  background: #e0e0e0;
}
