/* =========================
   DESIGN SYSTEM
========================= */
:root {
  --primary: #0078ff;
  --secondary: #1c1f26;
  --bg: #f8f9fa;
  --text: #333;
  --radius: 12px;
  --shadow: 0 4px 10px rgba(0,0,0,0.08);
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --text: #e5e7eb;
  --secondary: #161a22;
  --primary: #4da3ff;
}

/* =========================
   GLOBAL
========================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

a { text-decoration: none; }

/* =========================
   HEADER
========================= */
.site-header {
  background: var(--secondary);
  padding: 1rem 0;
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: 500;
  color: #fff;
}

.logo span { color: var(--primary); }

nav {
  display: flex;
  gap: 1.2rem;
}

nav a {
  color: #fff;
  font-weight: 600;
}

nav a:hover {
  color: var(--primary);
}

/* =========================
   HERO
========================= */
.hero {
  text-align: center;
  padding: 60px 20px 20px;
}

.cta-btn {
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 15px;
}

/* =========================
   PRODUCTS GRID
========================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* =========================
   PRODUCT CARD
========================= */
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 15px;
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
}

.product-card h3 {
  font-size: 16px;
  margin: 10px 0;
}

.product-card .price {
  font-size: 16px;
  font-weight: bold;
  color: #28a745;
  margin-bottom: 10px;
}

.product-card .buy-btn {
  background: var(--primary);
  color: #fff;
  padding: 10px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
}

/* =========================
   PRODUCTS PAGE (STORE LIST)
========================= */
.store-prices {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Each store row */
.mini-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #fafafa;
  border-radius: 6px;
  border: 1px solid #eee;
  transition: 0.2s ease;
}

.mini-price-row:hover {
  background: #f1f7ff;
}

/* Store name */
.mini-price-row span {
  font-size: 13px;
  font-weight: 600;
}

/* Price */
.mini-price-row strong {
  font-size: 14px;
  color: #28a745;
}

/* USD */
.mini-price-row small {
  display: block;
  font-size: 11px;
  color: #777;
}

/* Save badge */
.save-badge {
  font-size: 11px;
  color: #28a745;
  margin-left: 8px;
}

/* Best price highlight */
.best-price {
  font-weight: bold;
  color: #1e7e34;
}

/* Highlight cheapest row */
.mini-price-row:first-child {
  border: 1px solid #28a745;
  background: #f6fff6;
}

/* =========================
   PRODUCT DETAIL PAGE
========================= */
.product-detail {
  max-width: 1200px;
  margin: 50px auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  padding: 20px;
  background: #ffd;
  border-radius: 12px;
}

/* =========================
   FINAL PERFECT STORE LAYOUT
========================= */

.product-detail .store-prices {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-detail .store-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 600px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}

/* LEFT */
.product-detail .store-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* LOGO (FIX SIZE) */
.product-detail .store-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

/* STORE NAME */
.product-detail .store-name {
  font-size: 14px;
  font-weight: 500;
}

/* RIGHT SIDE */
.product-detail .store-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap; /* FIX OVERFLOW */
}

/* PRICE */
.product-detail .price {
  font-size: 15px;
  font-weight: bold;
}

/* USD */
.product-detail .price small {
  font-size: 11px;
}

/* PRICE BOX */
.product-detail .price-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap; /* VERY IMPORTANT */
}

/* SAVE */
.save-inline {
  font-size: 12px;
  color: #28a745;
}

/* BUTTON */
.product-detail .buy-btn {
  background: #ff6a00;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
}

/* BEST PRICE */
.product-detail .best-price {
  border: 2px solid #28a745;
  background: #f6fff8;
}
/* BEST LABEL */
.product-detail .best-label {
  font-size: 11px;
}



/* =========================
   FOOTER
========================= */
footer {
  background: var(--secondary);
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {

  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail .store-row {
    flex-direction: row;
  }

  nav {
    display: none;
    flex-direction: column;
    background: var(--secondary);
  }

  nav.active {
    display: flex;
  }
}

/* =========================
   SMALL FIXES
========================= */
.section-title {
  margin-top: 0;
}
/* =========================
   ABOUT FOUNDER SECTION
========================= */

.about-founder {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.about-founder img {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ddd;
}

.founder-text {
  flex: 1;
}

.founder-text p {
  margin-bottom: 10px;
  line-height: 1.6;
}


/* =========================
   SIMILAR PRODUCTS SECTION
========================= */

.similar-products {
    margin-top: 60px;
}

.similar-products h2 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* GRID LAYOUT */
.similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* PRODUCT CARD */
.similar-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s ease;
}

.similar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* IMAGE */
.similar-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
}

/* TITLE */
.similar-card h3 {
    font-size: 15px;
    margin: 10px 0 5px;
}

/* CATEGORY */
.similar-card p {
    font-size: 13px;
    color: #777;
}

/* BUTTON */
.view-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
}

.view-btn:hover {
    background: #0056b3;
}
/* PRICE IN SIMILAR CARDS */
.sim-price {
    margin-top: 6px;
    font-weight: bold;
    color: #28a745;
    font-size: 14px;
}

.sim-price.unavailable {
    color: #999;
    font-size: 13px;
}
/* INLINE SAVINGS */
.price-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-inline {
  font-size: 12px;
  color: #28a745;
  font-weight: 500;
}
/* =========================
   FIX ALL LINKS VISIBILITY
========================= */


a {
  color: #0d6efd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}



/* PRODUCT LINKS */
.product-card a,
.similar-card a {
  color: #0d6efd;
  font-weight: 500;
}

.product-card a:hover,
.similar-card a:hover {
  text-decoration: underline;
}

/* BUTTON LINKS */
.buy-btn,
.view-btn {
  text-decoration: none;
  color: #fff;
}
a {
  transition: 0.2s ease;
}
/* BEST ROW HIGHLIGHT */
.best-row {
  background: #f6fff8 !important;
  border-left: 4px solid #28a745;
}
/* BEST ROW HIGHLIGHT */
.best-row {
  background: #f6fff8;
  border-left: 4px solid #28a745;
}