/* === Banner === */
.banner {
  background: linear-gradient(135deg, #0066c0, #00aaff);
  color: #fff;
  padding: 24px;
  text-align: center;
}
.banner h1 { margin: 0; font-size: 2rem; }
.banner p { margin: 8px 0 0; font-size: 1.1rem; }

/* === Layout === */
.layout {
  display: flex;
  align-items: flex-start;
}

/* === Left Sidebar (Navigation) === */
.sidebar.left {
  width: 220px;
  min-width: 220px;
  background: #fafafa;
  border-right: 1px solid #ddd;
  padding: 16px;
}

/* Base nav list */
.nav-list, .nav-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { margin: 6px 0; }

/* === Pill-style menu items === */
.nav-list a {
  display: inline-block;
  padding: 6px 14px;
  margin: 4px 0;
  border-radius: 999px;       /* fully rounded pill shape */
  background: #f0f7ff;        /* light background */
  color: #0066c0;             /* brand blue text */
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.nav-list a:hover {
  background: #0066c0;        /* invert on hover */
  color: #fff;
  transform: translateY(-2px);
}

/* Parent links (with children) can be styled slightly bolder */
.nav-list a.parent-link {
  font-weight: 600;
}

/* === Collapsible nested menu === */
.nav-list ul {
  display: none;
  margin-left: 0.8rem;
  padding-left: 0.6rem;
  border-left: 1px solid #ddd;
}
.nav-list ul.open { display: block; }

.toggle {
  margin-left: 6px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  color: #0066c0;
  padding: 0 6px;
  line-height: 1.2;
}

.parent-link {
  font-weight: 600;
  color: #004080;
  text-decoration: none;
}
.parent-link:hover { text-decoration: underline; }

/* === Main Content === */
.content {
  flex: 1;
  padding: 20px;
}

/* === Right Sidebar (Widgets/Ads) === */
.sidebar.right {
  width: 250px;
  min-width: 250px;
  background: #fdfdfd;
  border-left: 1px solid #ddd;
  padding: 16px;
}
.widget {
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* === Product Grid === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* === Product Card Styling === */
.product-card {
  border: 1px solid #e2e2e2;
  border-radius: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #fdfdfd);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}
.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 8px;
}
.title { font-size: 1.1rem; font-weight: 600; margin: 8px 0; color: #333; }
.desc { font-size: 0.94rem; color: #555; margin-top: 6px; }
.price-row { margin-top: 8px; font-weight: 700; color: #c00; }
.was-now { margin-top: 4px; font-size: 0.9rem; color: #666; }
.save-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 0.85rem;
  font-weight: 600;
}

/* === Merchant Button === */
.merchant-block { margin-top: 14px; }
.merchant-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 6px;
  text-decoration: none;
  background: #0066c0;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}
.merchant-btn:hover { background: #004080; transform: translateY(-2px); }
.merchant-text { margin-bottom: 4px; }
.merchant-logo img { max-height: 56px; display: block; }

/* === Amazon/eBay Buttons === */
.amazon-block, .ebay-block { margin-top: 12px; }
.amazon-link, .ebay-link {
  display: inline-block;
  max-width: 90%;
  text-align: center;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: background 0.2s ease, transform 0.2s ease;
}
.amazon-link { background: #ff9900; }
.amazon-link:hover { background: #e68a00; transform: translateY(-2px); }
.ebay-link { background: #0064d2; }
.ebay-link:hover { background: #004a9f; transform: translateY(-2px); }

/* === Footer === */
.footer { margin-top: 24px; text-align: center; color: #777; }
.back-top { display: inline-block; margin-top: 8px; color: #0066c0; text-decoration: none; }

/* === Mobile Adjustments === */
@media (max-width: 768px) {
  .layout { display: block; }
  .sidebar.left, .sidebar.right {
    width: 100%;
    min-width: auto;
    border: none;
    border-bottom: 1px solid #ddd;
  }
  .content { padding: 12px; }
}

/* === Ad slot styling === */
.ad-slot {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #eee;
  text-align: center;
  min-height: 0;
}

/* Center and constrain width on single-category pages */
.single-category .ad-slot {
  margin-left: auto;
  margin-right: auto;
  max-width: 320px;
}

/* Hide slot if no ad content is injected */
.ad-slot ins.adsbygoogle:empty {
  display: none !important;
}

/* Modern browsers: hide parent if child <ins> is empty */
.ad-slot:has(ins.adsbygoogle:empty) {
  display: none !important;
}
