/* Basic modern styles and subtle animations */
:root {
  --primary: #ff4d4f;
  --bg: #0f0f12;
  --card: #17171b;
  --text: #e8e8ea;
  --muted: #a0a0a7;
  --border: #222;
  --accent: #ffa41c;
  --header-bg: rgba(15, 15, 18, .7);
  --header-height: 60px;
  --footer-height: 60px;
  --container-padding: 1rem;
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f1115;
  --muted: #475569;
  --border: #e5e7eb;
  --header-bg: #ffffff;
}

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

html {
  font-size: 17px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 500;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  letter-spacing: 0.01em;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

h4 {
  font-size: 1.05rem;
  font-weight: 600;
}

/* Responsive Typography */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

/* Auth buttons full width for better tap targets */
.auth-container form .btn,
.login-container form .btn {
  width: 100%;
  text-align: center;
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

:root[data-theme="light"] body {
  font-weight: 500
}

/* Main Layout */
main {
  flex: 1;
  padding: 1rem var(--container-padding);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Header Styles */
.site-header {
  padding: 0.75rem var(--container-padding);
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  width: 100%;
}

/* Logo and Brand Styles */
.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text);
  cursor: pointer;
  padding: 5px;
}

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

  .header-bottom {
    display: none;
    flex-direction: column;
    padding: 10px 0;
    width: 100%;
    background: var(--header-bg);
    border-top: 1px solid var(--border);
  }

  .header-bottom.active {
    display: flex;
  }

  .header-bottom a {
    padding: 10px 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
}


.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.logo-wordmark {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
}

.brand-name[data-brand="Aradhya925"] {
  color: #0f172a;
}

/* Search Bar Styles */
.search-container {
  flex: 1;
  max-width: 600px;
  max-width: 600px;
  margin: 0 1.5rem;
}

@media (max-width: 768px) {
  .search-container {
    margin: 10px 0;
    width: 100%;
    padding: 0 10px;
  }

  .search-input-wrapper {
    width: 100%;
  }

  /* Reduce input min-width on mobile to prevent overflow */
  .search-input {
    min-width: 50px !important;
    font-size: 14px;
  }

  /* Hide category dropdown on very small screens to ensure button visibility */
  #searchCategory {
    display: none !important;
  }

  .search-submit {
    padding: 0.6rem 0.8rem;
    font-size: 14px;
    white-space: nowrap;
  }
}

.search-form {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
  box-shadow: 0 0 0 2px var(--primary);
}

.search-icon {
  padding: 0 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input {
  flex: 1;
  padding: 0.6rem 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.search-submit {
  padding: 0.6rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-submit:hover {
  background: #ff7875;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wishlist-link,
.cart-link {
  position: relative;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.wishlist-link:hover,
.cart-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-container {
    margin: 0.75rem 0;
    order: 3;
    width: 100%;
  }

  .header-top {
    flex-wrap: wrap;
  }

  .logo-container {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.header-top,
.header-bottom {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-top {
  justify-content: space-between;
  padding: 0.5rem 0;
}

.header-bottom {
  justify-content: flex-start;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.site-header .brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: #0f172a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-header .brand[data-brand="Aradhya925"] {
  color: #0f172a;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
  position: relative;
  font-weight: 500;
  font-size: 1.05rem;
  padding: 0.5rem 0;
  transition: opacity 0.2s ease;
}

.site-header nav a:hover {
  opacity: 1;
  color: var(--primary);
}

.site-header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.site-header nav a:hover::after {
  width: 100%;
}

.user-name {
  font-weight: 600;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

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

/* ==== FIXED BOTTOM NAV ==== */
.bottom-nav {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0 2px;
  z-index: 9999;
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bottom-nav a .icon {
  font-size: 20px;
  margin-bottom: 2px;
}

/* Colorful bottom-nav icons */
.bottom-nav a:nth-child(2) .icon i {
  /* Cart */
  color: #3498db;
}

.bottom-nav a:nth-child(3) .icon i {
  /* Wishlist */
  color: #f1c40f;
}

.bottom-nav a:nth-child(4) .icon i {
  /* Shop */
  color: #00b894;
}

.bottom-nav a:nth-child(5) .icon i {
  /* Blog */
  color: #9b59b6;
}

.bottom-nav a:nth-child(6) .icon i {
  /* About */
  color: #0984e3;
}

.bottom-nav a:nth-child(7) .icon i {
  /* Account */
  color: #8e44ad;
}

/* Perfect Home Icon alignment */
.home-icon {
  width: 20px;
  height: 20px;
  display: block;
  margin-bottom: 2px;
  object-fit: contain;
}

/* active color */
.bottom-nav a.active {
  color: var(--primary);
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .site-header nav {
    display: none;
    /* Hide top nav on mobile */
  }

  .bottom-nav {
    display: flex;
    /* Show bottom nav on mobile */
  }

  body {
    padding-bottom: 75px;
    /* bottom bar space */
  }
}

@media (min-width: 769px) {
  .bottom-nav {
    display: none;
    /* Hide bottom nav on desktop */
  }
}

/* Theme Toggle */
.theme-toggle {
  margin-left: 1rem;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

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

.site-header nav a:hover {
  opacity: 1;
  color: #fff
}

:root[data-theme="light"] .site-header nav a:hover {
  color: #0f1115
}

:root[data-theme="light"] .site-header .brand {
  color: #0f172a
}

:root[data-theme="light"] .site-header nav a {
  color: #0f1115;
  opacity: 1
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.search-input {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  min-width: 160px;
  flex: 1
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none
}

.icon-btn:hover {
  filter: brightness(1.05)
}

.btn.pulse {
  animation: pulse 1.5s infinite ease-in-out
}

@keyframes pulse {
  0% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.03)
  }

  100% {
    transform: scale(1)
  }
}

/* Floating WhatsApp button */
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  border-radius: 0;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s;
  z-index: 2
}

.wishlist-btn svg {
  stroke: #fff;
}

.wishlist-btn:hover svg {
  stroke: #f00;
}

.wishlist-btn.active svg {
  fill: #f00;
  stroke: #f00;
  animation: like .3s ease-out;
}

@keyframes like {
  0% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.2)
  }

  100% {
    transform: scale(1)
  }
}

.wishlist-btn:hover {
  color: #f00
}

.wishlist-btn.active {
  color: #f00
}

/* Ensure wishlist heart is visible on product detail page, even on light images */
.product-page .product-gallery .wishlist-btn {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.product-page .product-gallery .wishlist-btn svg {
  stroke: #f97316;
}

.product-page .product-gallery .wishlist-btn.active svg {
  fill: #f97316;
  stroke: #f97316;
}

.product-share-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  z-index: 2
}

.product-share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2)
}

.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  background: #25D366;
  border-radius: 999px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
  border: none;
  animation: floatY 3s ease-in-out infinite
}

.whatsapp-fab:hover {
  filter: brightness(1.05)
}

.whatsapp-fab img {
  width: 32px;
  height: 32px;
  display: block
}

@keyframes floatY {
  0% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-6px)
  }

  100% {
    transform: translateY(0)
  }
}

.hero h1 {
  font-size: 42px;
  margin: 0 0 8px
}

.hero p {
  opacity: .9;
  margin: 0 0 16px
}

/* Button styles */
.btn {
  background-color: #ff4d4f;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s ease, filter 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn.primary {
  background-color: #ffa41c;
  color: white;
}

.category-filter .btn.active {
  background-color: #16a34a;
  color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem
}

section,
main.container,
footer,
header {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem
}

@media(min-width:768px) {

  section,
  main.container,
  footer,
  header {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem
  }
}

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

/* Product listing grids (home + shop) */
.container .product-grid,
.related-products .product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media(min-width:768px) {

  .container .product-grid,
  .related-products .product-grid {
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {

  .container .product-grid,
  .related-products .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {

  .container .product-grid,
  .related-products .product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Product detail page layout */
.product-page-container {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 16px 24px;
  display: block
}

.product-page-container .product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: flex-start
}

.product-gallery .main-image-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card)
}

.product-gallery .main-image-container {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 1/1
}

.product-gallery .main-image-container img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.product-description {
  margin-top: 8px;
  opacity: .9
}

.product-gallery-thumbs {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.product-gallery-thumbs button {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  opacity: .7
}

.product-gallery-thumbs button.active {
  opacity: 1;
  outline: 2px solid var(--primary);
}

.product-gallery-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card .content {
  padding: 12px 14px
}

/* Blog cards: compact with small thumbnail, no full-width white strip */
.card.blog-post {
  background: transparent;
  border: none;
  box-shadow: none;
  height: auto;
  margin-bottom: 16px;
}

.blog-post-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.blog-post-thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.blog-post-body h3 {
  font-weight: 700;
  margin-bottom: 4px;
}

.blog-post-meta {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 6px;
}

.blog-post-content {
  font-size: .95rem;
  line-height: 1.5;
}

/* Listing cards: flat style, no white panel */
.container .product-grid .card.food-card {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}

.container .product-grid .card.food-card .content {
  padding: 8px 4px 0;
}

.card .content h3 {
  font-weight: 700
}

.food-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block
}

.row {
  display: flex;
  gap: 12px;
  align-items: center
}

.row.between {
  justify-content: space-between
}

.price {
  color: var(--text)
}

.site-footer {
  padding: 32px 16px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 32px
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px
}

.footer-brand {
  color: var(--text);
  font-weight: 700
}

.footer-links a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin: 6px 0;
  opacity: .9;
  font-size: .95rem;
  font-weight: 500
}

.footer-links a:hover {
  opacity: 1
}

.footer-bottom {
  max-width: 1100px;
  margin: 12px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 14px
}

:root[data-theme="light"] .site-footer {
  color: #334155
}

.footer-policy {
  margin-top: 4px;
  font-weight: 400;
}

.social-links {
  display: flex;
  gap: 10px;
  align-items: center
}

.social-links img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  background: #fff;
  padding: 2px
}

/* Channel Partners section */
.channel-partners-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
}

.footer-brand-logo {
  flex-shrink: 0;
}

.footer-brand-logo img {
  width: 80px;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.channel-partners-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.channel-partners-logos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.channel-partners-logos img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .channel-partners-container {
    flex-direction: column;
    gap: 16px;
  }

  .channel-partners-logos {
    justify-content: center;
  }

  .footer-brand-logo img {
    width: 100px;
  }
}

.login-container,
.auth-container {
  max-width: 460px;
  margin: 72px auto;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25)
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  width: 100%
}

label {
  display: block;
  margin: 8px 0 4px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500
}

input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(255, 77, 79, .4)
}

.auth-container input,
.auth-container textarea,
.user-panel-container input,
.user-panel-container textarea {
  padding: 14px 16px;
  min-height: 44px;
  font-size: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.food-list .food-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border)
}

.food-card .img-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.actions .btn {
  flex: 1;
}

.actions form {
  display: flex;
  flex: 1;
  gap: 8px;
}

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

/* Product details positioning and discount badge */
.product-details .img-container {
  position: relative;
}

.checkout-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
  margin-top: 24px
}

.checkout-details>form {
  order: 1;
  max-width: 640px
}

.checkout-details>.product-summary {
  order: 2
}

.checkout-details form .grid-2 {
  grid-template-columns: 1fr
}

.checkout-details form .grid-2>div {
  margin-bottom: 10px
}

.checkout-details form input,
.checkout-details form textarea {
  padding: 14px 16px;
  min-height: 46px;
  font-size: 1rem;
  border-radius: 10px
}

.checkout-details #address_preview {
  min-height: 96px
}

.product-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start
}

.product-summary img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px
}

.checkout-items-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.checkout-item-row {
  display: flex;
  align-items: flex-start;
  font-size: .9rem;
  width: 100%;
  box-sizing: border-box;
}

.checkout-item-row:last-child {
  border-bottom: none
}

.price-container {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px
}

.price {
  font-size: 20px;
  font-weight: 600
}

del {
  color: var(--muted);
  margin-right: 6px;
  margin-left: 0;
  font-size: .9rem
}

.discount-amount {
  color: var(--accent);
  font-weight: 600;
  margin-left: 8px
}

form .btn {
  margin-top: 16px
}

.cart-list .cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border)
}

.cart-list img {
  width: 88px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background-color: #fff
}

.order-list .order-item {
  display: grid;
  grid-template-columns: 120px 1fr 100px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border)
}

.checkout-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Prevent shrinking in flex layouts */
}

.available-coupons {
  margin-top: 10px
}

.available-coupons-toggle {
  margin-top: 4px;
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: .9rem;
  padding: 0
}

.available-coupons-list {
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  max-height: 220px;
  overflow: auto
}

.available-coupon-item {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer
}

.available-coupon-item:last-child {
  border-bottom: none
}

.available-coupon-code {
  font-weight: 600
}

.available-coupon-meta {
  font-size: .85rem;
  color: var(--muted)
}

.payment-methods {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px
}

.payment-methods label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem
}

/* Checkout steps bar */
.checkout-steps {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  overflow: hidden
}

:root[data-theme="light"] .checkout-steps {
  background: #e5f0ff
}

.checkout-step {
  flex: 1;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  position: relative;
  z-index: 1
}

.checkout-step.completed {
  color: #16a34a
}

.checkout-step.current {
  color: #2563eb
}

.checkout-step::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(148, 163, 184, 0.35);
  transform: translateY(-50%);
  z-index: -1
}

.checkout-step:first-child::before {
  left: 50%
}

.checkout-step:last-child::before {
  right: 50%
}

.checkout-step-car {
  position: absolute;
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: #2563eb;
  animation: truck-move 2.4s ease-in-out infinite
}

.checkout-step-car i {
  display: inline-block
}

/* Default: move between Cart and Address */
@keyframes truck-move {
  0% {
    left: 10%;
    transform: translateY(-50%) scale(1)
  }

  50% {
    left: 45%;
    transform: translateY(-55%) scale(1.05)
  }

  100% {
    left: 10%;
    transform: translateY(-50%) scale(1)
  }
}

/* Payment page: keep truck near Payment step */
.checkout-steps-payment .checkout-step-car {
  animation: truck-move-end 2.4s ease-in-out infinite
}

@keyframes truck-move-end {
  0% {
    left: 55%;
    transform: translateY(-50%) scale(1)
  }

  50% {
    left: 80%;
    transform: translateY(-55%) scale(1.05)
  }

  100% {
    left: 55%;
    transform: translateY(-50%) scale(1)
  }
}

@media (max-width: 768px) {
  .checkout-details {
    gap: 18px
  }

  .cart-list .cart-item,
  .order-list .order-item {
    grid-template-columns: 1fr;
  }

  .product-page-container {
    margin-top: 16px;
    margin-bottom: 80px;
    padding: 0 12px 24px
  }

  .product-page-container .product-grid {
    grid-template-columns: 1fr;
    gap: 16px
  }

  .product-gallery .main-image-container img {
    max-height: 360px;
    object-fit: cover
  }
}

@media (max-width: 768px) {
  .header-container {
    align-items: stretch;
  }

  .header-top {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 3rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.9rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.user-panel-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.user-panel-sidebar {
  flex: 1 1 250px;
  margin-bottom: 1.5rem;
}

.user-panel-content {
  flex: 1 1 70%;
}

@media (max-width: 768px) {
  .user-panel-container {
    flex-direction: column;
  }
}

/* Profile sidebar: keep form clean without extra card background */
.user-panel-sidebar form {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.user-panel-sidebar form .btn {
  margin-top: 10px;
}

.user-panel-sidebar .btn {
  width: 100%;
  text-align: center;
}

.badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: #333;
  color: #ddd;
  text-align: center
}

.badge.paid {
  background: #16a34a;
  color: #fff
}

.error {
  color: #ef4444
}

.success {
  color: #22c55e
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

/* Toast */
.toast {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
  transform: none;
  padding: 12px 20px;
  border-radius: 8px;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  z-index: 2000;
  animation: fadeUp .3s ease-out both;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25)
}

.toast.success {
  background: #16a34a
}

.toast.error {
  background: #ef4444
}

/* Utility */
.fade {
  animation: fadeUp .5s ease-out both
}

/* Header badges */
.nav-link {
  position: relative;
}

.icon-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-link span {
  display: none;
}

@media(min-width: 768px) {
  .icon-link span {
    display: inline;
  }
}

.nav-link-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  transform: translateX(0);
  background: #ff4d4f;
  color: white;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 2px;
  text-shadow: none;
}

@keyframes badge-bump {
  0% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.2)
  }

  100% {
    transform: scale(1)
  }
}

.nav-link-badge.bump {
  animation: badge-bump .3s ease-out
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  display: none;
  /* Hidden by default */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
}

.mobile-bottom-nav .nav-item i {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

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

/* Show bottom padding on smaller screens to prevent overlap with floating elements */
@media (max-width: 768px) {

  main.container,
  .main-content,
  main {
    padding-bottom: 0;
  }
}

/* Chatbot Styles */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  background: var(--card);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.chat-window {
  display: none;
  width: 350px;
  height: 500px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 15px;
  background-color: var(--primary);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.chat-close {
  cursor: pointer;
  font-size: 20px;
}

.chat-body,
#chat-box {
  background-image: none !important;
  background-color: var(--card, #fff) !important;
}

.chat-body {
  flex-grow: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-message {
  padding: 10px 15px;
  border-radius: 18px;
  max-width: 80%;
  line-height: 1.4;
}

.chat-message.bot {
  background-color: var(--primary-light);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  background-color: var(--border);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
  display: flex;
}

#chatInput {
  flex-grow: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 15px;
  background: var(--bg);
  color: var(--text);
}

#chatSend {
  margin-left: 10px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-weight: bold;
}

/* Product Card Styles for JS-rendered listings (flat, like reference) */
.product-card {
  border: none;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.product-card .img-container {
  position: relative;
}

.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.product-card .content {
  padding: 8px 4px 0;
}

.product-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.product-card .price-container {
  margin-top: 4px;
}

/* Footer social links from index.php */
.footer-bottom .social-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bottom .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  text-decoration: none;
  color: var(--text);
}

.footer-bottom .social-links svg {
  width: 18px;
  height: 18px;
}

/* Coupon popup */
.coupon-popup {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  z-index: 3000;
}

.coupon-popup.active {
  display: flex;
}

.coupon-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.coupon-popup-dialog {
  position: relative;
  max-width: 360px;
  width: 90%;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px 20px 18px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  animation: fadeUp 0.4s ease-out both;
}

.coupon-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.coupon-content {
  text-align: center;
}

.coupon-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.coupon-text {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 12px;
}

.coupon-cta {
  width: 100%;
  margin-top: 4px;
}

@media (max-width: 480px) {

  .login-container,
  .auth-container {
    margin: 32px 16px;
    padding: 20px;
  }

  .coupon-popup-dialog {
    max-width: 320px;
    padding: 18px;
  }
}

.sticky-footer-actions {
  display: none;
}

@media (max-width: 768px) {
  .sticky-footer-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    background: var(--card);
    padding: 12px;
    border-top: 1px solid var(--border);
    z-index: 100;
  }

  .sticky-footer-actions .btn {
    flex: 1;
    text-align: center;
  }

  .product-page .actions {
    display: none;
  }

  .product-page .bottom-nav {
    display: none;
  }

  .product-page {
    padding-bottom: 72px;
  }
}

/* === Product Page Refactor Styles === */

/* Product gallery Swiper (desktop + mobile base) */
.product-gallery .product-swiper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
}

.product-gallery .product-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  /* ensure visible area even before image loads */
  position: relative;
  /* allow absolute buttons (wishlist/share) inside */
}

.product-gallery .product-swiper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.swiper-pagination-bullet {
  background: rgba(148, 163, 184, 0.6);
  opacity: 0.9;
}

.swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

.product-page .swiper-button-next,
.product-page .swiper-button-prev {
  color: rgba(15, 23, 42, 0.6);
  background: transparent;
}

@media (max-width: 768px) {

  .product-page .swiper-button-next,
  .product-page .swiper-button-prev {
    display: none;
  }

  .product-page .product-gallery .product-swiper {
    background: transparent;
  }
}

/* General Info section */
.product-info h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.rating-display .stars {
  color: #ffc107;
  font-size: 1.1rem;
}

.rating-display .rating-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.product-comments {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.delivery-suggestion {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #0f766e;
  background-color: rgba(13, 148, 136, 0.05);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* Related Products */
.related-products {
  margin-top: 2.5rem;
}

.related-products h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Reviews Section */
.reviews-section {
  margin-top: 3rem;
}

.reviews-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.review {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.review:first-of-type {
  border-top: none;
  padding-top: 0;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.review-user {
  font-weight: 600;
}

.review-stars {
  color: #ffc107;
}

.review-comment {
  color: var(--muted);
  line-height: 1.6;
}

.review-date {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.8;
}


/* Responsive adjustments for Product Page */
@media (max-width: 768px) {
  /* --- FNP Style Mobile Product Page --- */

  /* 1. Custom Mobile Header */
  body.product-page .header-container {
    display: none;
    /* Hide the default header */
  }

  .mobile-back-btn {
    display: block;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  /* 2. Image Hero Section (No more 'white patti') */
  .product-page-container {
    padding-top: 0;
  }

  .product-gallery {
    background: #f8f8f8;
    /* Very light grey, almost white */
    padding: 0;
  }

  .product-gallery .product-swiper {
    background: transparent;
    /* No white box */
    border-radius: 0;
  }

  .product-gallery .swiper-slide {
    aspect-ratio: 1/1;
    min-height: auto;
  }

  .product-gallery .product-swiper .swiper-pagination {
    bottom: 20px;
  }

  /* 3. Product Info Section (FNP Style) */
  .product-info {
    padding: 1.5rem 1rem;
  }

  .product-info h1 {
    font-size: 1.25rem;
    font-weight: 600;
  }

  .price-container {
    gap: 12px;
    margin-top: 8px;
  }

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

  del {
    font-size: 1rem;
  }

  .discount-tag {
    color: #22c55e;
    font-weight: 700;
    font-size: 1rem;
  }

  .rating-display {
    margin-top: 12px;
  }

  /* Hide desktop elements */
  .actions input[type="number"] {
    display: none;
  }
}