:root {
  --gold: #e6e88b;
  --accent: #0cc0df;
  --dark: #111827;
  --muted: #6b7280;
  --bg: #f8fafc;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  margin: 0;
  background: var(--bg);
  color: #111;
  width: 100%;
  
}

.wrap {
  max-width: 90%;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.site-header {
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 120px;
  width: auto;
}

.site-title {
  margin: 0;
  font-size: 2rem;
  text-align: center;
}

.site-tag {
  margin: 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Top Nav */
.top-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  width: 240px;
}

select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 18px;
}

.sidebar {
  background: #e6e88b;
  padding: 20px;
  border-radius: 2px;
  height: vh;
  position: sticky;
  top: 20px;
  overflow: auto;
}

.sidebar h2 {
  color: var(--accent);
  margin: auto;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  background: #111827;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.sidebar a {
  color: #6ef783;
  text-decoration: none;
}

/* Content */
.content section {
  margin-bottom: 15px;
}

.content h2 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 12px;
  padding: 50px 0 20px 0;
  text-align: center;
}

/* Product Cards */
.products-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(20%, 1fr));
}

.product-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 10px 6px 18px rgba(16, 24, 40, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;

}

.product-card img {
  width: 100%;
  height: 200px;
  /* control how tall the cards appear */
  object-fit: contain;
  /* fills area and crops extra background */
  object-position: center;
  /* keeps subject centered */
  border-bottom: 1px solid #f3f4f6;
  border-radius: 8px 8px 0 0;
  display: block;
}

.product-card .card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  float: right;
}

.product-card h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.product-card .price {
  color: #b91c1c;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-card a.btn {
  margin-top: auto;
  background: var(--gold);
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid #f3f4f6;
  padding: 18px;
  margin-top: 30px;
  text-align: center;
}

.site-footer a {
  color: var(--accent);
}

/* WhatsApp Button */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #25D366;
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.12);
  z-index: 999;
}

.whatsapp-float img {
  height: 20px;
  width: auto;
}

/* === PRODUCT PAGE STYLING === */
.product-page {
  max-width: 1200px;
  margin: 28px auto;
  background: #fff;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Layout: Image left, Details right on desktop */
.product-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* --- Gallery --- */
.gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.gallery .main-img {
  width: 100%;
  max-width: 550px;
  height: 450px;
  object-fit: cover;
  border-radius: 12px;
  background: #f9f9f9;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Thumbnails */
.thumbnail-list {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.thumbnail-list img {
  width: 110px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.thumbnail-list img:hover,
.thumbnail-list img.active {
  transform: scale(1.05);
  border-color: var(--gold);
}

/* --- Details --- */
.details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.details h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.details .price {
  font-size: 1.3rem;
  font-weight: 600;
  color: #b91c1c;
}

.details .desc {
  line-height: 1.6;
  color: var(--muted);
  background: #f9fafb;
  padding: 1rem;
  border-radius: 8px;
}

/* --- Buy Now --- */
.buy-now {
  display: inline-block;
  margin-top: 1rem;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(18, 140, 126, 0.3);
}

/* --- Back Link --- */
.back-link {
  display: inline-block;
  margin: 1rem 0 0 2rem;
  color: #128C7E;
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}


/* Product Page Styles */
.product-detail-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  padding: 20px;
}

.product-gallery {
  flex: 1 1 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.main-image-container {
  width: 100%;
  max-width: 500px;
}

.main-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

.thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.thumbnail {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.thumbnail:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

.product-info {
  flex: 1 1 350px;
}

.product-info h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.product-info .price {
  font-size: 1.5rem;
  color: #eab308;
  margin-bottom: 1rem;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  margin-top: 10px;
}

.btn-whatsapp:hover {
  background: #1da851;
}

/* ========================
   Most Bought Sidebar Images
======================== */
#mostBoughtList li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: rgb(244, 238, 238);
  /* matches sidebar dark style */
  border-radius: 8px;
  margin-bottom: 15px;
  transition: transform 0.2s, background 0.2s;
}

#mostBoughtList li:hover {
  transform: scale(1.02);
  background: #374151;
}

#mostBoughtList li img {
  width: 100px;
  height: 100px;
  object-fit: fill;
  border-radius: 6px;
  border: 1px solid #444;
  flex-shrink: 0;
}

#mostBoughtList li span {
  font-size: 1rem;
  font-weight: 500;
  color: black;
}

#mostBoughtList li small {
  display: block;
  font-size: 0.8rem;
  text-align: center;
  color: #ccc;
}


/* Responsive */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .product-main {
    grid-template-columns: 1fr;
  }

  .search-input {
    width: 140px;
  }
}