/* Unified CSS - SmartPriceWatch.com */
:root {
    --accent-color: #e74c3c;
    --bg: #0b1020;
    --border: rgba(255, 255, 255, 0.12);
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --dark-color: #2c3e50;
    --gray-color: #95a5a6;
    --light-color: #ecf0f1;
    --link: #7aa7ff;
    --max: 1100px;
    --muted: #a7b0c3;
    --panel: #0f1a3a;
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --text: #e6e9f2;
}

/* === Styles from site.css === */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
}

body.splash-page {
  background: radial-gradient(1200px 600px at 20% 10%, #182a5b 0%, var(--bg) 45%) no-repeat,
              radial-gradient(900px 400px at 85% 25%, #203b86 0%, var(--bg) 55%) no-repeat,
              var(--bg);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px;
}

header {
  background: rgba(11, 18, 40, 0.85);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  margin: 18px 0;
  position: sticky;
  top: 10px;
  z-index: 100;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-color), #9bb8ff);
  color: #050910;
  font-size: 20px;
}

.logo-text {
  font-size: 24px;
}

.logo-text span {
  color: var(--primary-color);
}

.logo-img {
  height: 40px;
}

.search-bar {
  flex: 1;
  max-width: 600px;
  margin: 0 20px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 12px 50px 12px 18px;
  border-radius: 40px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  font-size: 16px;
  transition: all 0.3s;
}

.search-bar input::placeholder {
  color: #6b7280;
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-bar button {
  position: absolute;
  right: 9px;
  top: 6px;
  border: none;
  border-radius: 40px;
  padding: 8px 18px;
  background: var(--primary-color);
  color: #050910;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-bar button:hover {
  background-color: #2980b9;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.user-actions a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-actions a:hover {
  color: var(--primary-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 18px 20px;
  margin: 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.4px;
  position: relative;
  padding-bottom: 6px;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--primary-color);
  border-radius: 999px;
}

.site-header, .site-footer {
  border: 1px solid var(--border);
  background: rgba(10, 18, 40, 0.55);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 14px 18px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.main {
  margin: 18px 0;
  border: 1px solid var(--border);
  background: rgba(10, 18, 40, 0.45);
  border-radius: 14px;
  padding: 18px;
}

.h1 {
  font-size: clamp(28px, 3vw, 40px);
  margin: 4px 0 10px 0;
}

.muted { color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 14px;
}

.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  font-size: 14px;
}

.kv .k { color: var(--muted); }

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
}

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

/* Account Page */
.account-page {
  margin: 40px auto;
}


.account-card {
  padding: 30px;
}

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.account-intro {
  margin-top: 8px;
  color: var(--gray-color);
}

.account-actions {
  display: flex;
  gap: 12px;
}

.user-actions-account .user-action-active {
  color: var(--primary-color);
}

.account-grid {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.account-panel {
  min-width: 300px;
}

.account-panel-details {
  flex: 0 0 360px;
  max-width: 400px;
}

.account-panel-overview {
  flex: 1 1 0;
  min-width: 360px;
}

.card.account-panel-details {
  background-color: #f0f7ff;
}

.account-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.account-panel-title i {
  color: var(--primary-color);
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.account-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}

.account-meta p {
  margin-top: 4px;
}

.account-meta-note {
  font-size: 14px;
  color: var(--gray-color);
}

.account-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background-color: white;
  padding: 15px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  box-shadow: var(--box-shadow);
}

.account-type-note {
  font-size: 14px;
  color: var(--gray-color);
}

.account-section-title {
  margin-top: 25px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.account-settings {
  list-style: none;
  padding: 0;
  margin: 0;
}

.account-settings li {
  border-bottom: 1px solid #eee;
}

.account-settings li:last-child {
  border-bottom: none;
}

.account-settings-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  text-decoration: none;
  color: var(--dark-color);
}

.account-settings-link i {
  color: var(--primary-color);
}

.account-settings-link span i {
  margin-right: 10px;
}

.account-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 20px 0 10px;
}

.account-metric {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.account-metric-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 6px;
}

.account-metric-value--primary {
  color: var(--primary-color);
}

.account-metric-value--secondary {
  color: var(--secondary-color);
}

.account-metric-value--accent {
  color: var(--accent-color);
}

.account-metric-link {
  font-size: 14px;
  color: var(--primary-color);
  text-decoration: none;
}

.account-products {
  margin-top: 10px;
}

.account-product-icon {
  font-size: 40px;
  color: #3498db;
}

.account-product-meta {
  font-size: 12px;
  color: var(--gray-color);
  margin-top: 10px;
}

.account-table-card {
  margin-top: 10px;
}

.account-table-wrapper {
  overflow-x: auto;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
}

.account-table thead tr {
  background-color: #f8f9fa;
}

.account-table th,
.account-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.account-table-product {
  font-weight: 600;
}

.account-table-drop {
  color: var(--secondary-color);
  font-weight: 600;
}

.account-status {
  font-size: 14px;
}

.account-status--alert {
  color: var(--accent-color);
  font-weight: 600;
}

.account-status--muted {
  color: var(--gray-color);
}

.account-ad {
  margin: 30px 0 10px;
}

/* Manage Alerts */
.alerts-page {
  margin: 40px auto;
}

.alerts-card {
  padding: 30px;
}

.alerts-title h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alerts-title i {
  color: var(--primary-color);
}

.alerts-title p {
  margin-top: 10px;
  color: var(--gray-color);
}

.alerts-toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin: 25px 0;
}

.alerts-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.alerts-table-card {
  padding: 0;
  overflow: hidden;
}

.alerts-table-wrapper {
  overflow-x: auto;
}

.alerts-table {
  width: 100%;
  border-collapse: collapse;
}

.alerts-table thead tr {
  background-color: #f8f9fa;
}

.alerts-table th,
.alerts-table td {
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.alerts-row--triggered {
  background-color: #f0fff0;
}

.alerts-product {
  display: flex;
  align-items: center;
  gap: 15px;
}

.alerts-product-icon {
  width: 50px;
  height: 50px;
  background-color: #f5f5f5;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alerts-product-icon i {
  color: var(--primary-color);
}

.alerts-product-name {
  font-weight: 600;
}

.alerts-product-retailers {
  font-size: 14px;
  color: var(--gray-color);
}

.alerts-price {
  font-weight: 700;
}

.alerts-current {
  font-weight: 700;
  color: var(--accent-color);
}

.alerts-current-note {
  font-size: 12px;
  color: var(--gray-color);
}

.alerts-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.alerts-status--triggered {
  background-color: #2ecc71;
}

.alerts-status--active {
  background-color: var(--primary-color);
}

.alerts-status-note {
  font-size: 12px;
  color: var(--gray-color);
  margin-top: 5px;
}

.alerts-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.alerts-action-btn {
  padding: 8px 15px;
  font-size: 12px;
}

.alerts-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.alerts-summary-card {
  flex: 1;
  min-width: 200px;
}

.alerts-summary-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.alerts-summary-card i {
  color: var(--primary-color);
}

.alerts-stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.alerts-stats-value {
  font-weight: 600;
}

.alerts-stats-value--secondary {
  color: var(--secondary-color);
}

.alerts-stats-value--accent {
  color: var(--accent-color);
}

.alerts-settings {
  flex: 2;
  min-width: 300px;
}

.alerts-settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.alerts-settings-item p {
  font-size: 14px;
  color: var(--gray-color);
}

.alerts-select {
  width: auto;
}

.alerts-ad {
  margin: 30px 0 10px;
}

/* Contact */
.contact-page {
  margin: 40px auto;
}

.contact-card {
  padding: 30px;
}

.contact-title p {
  margin-top: 10px;
  color: var(--gray-color);
}

.contact-grid {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.contact-form,
.contact-info {
  flex: 1;
  min-width: 300px;
}

.contact-info-card {
  background-color: #f9f9f9;
  padding: 25px;
  border-radius: var(--border-radius);
  margin-bottom: 30px;
}

.contact-info-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.contact-info-card i {
  color: var(--primary-color);
}

.contact-info-title {
  margin-top: 20px;
}

.faq-item {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--dark-color);
}

.contact-ad {
  margin: 30px 0 10px;
}

/* Search Results */
.search-results-header {
  background-color: #f8f9fa;
  padding: 25px 0;
}

.search-query {
  margin-bottom: 8px;
  color: var(--dark-color);
}

.search-results-page {
  margin: 30px auto 60px;
}



/* Ad Placement Slots — space-reserving wrappers for AdSense and fallback frames
 *
 * .placement-box        — shared outer wrapper; always reserves fixed dimensions
 * .slot-leaderboard     — 728×90 desktop leaderboard
 * .slot-mobile-banner   — 320×100 mobile banner (shown on narrow viewports)
 * .slot-rectangle       — 300×250 medium rectangle / sidebar
 * .placement-frame      — always-visible background frame (never collapses)
 * .placement-content    — positioned layer for the ad snippet, rendered above frame
 */

/* Shared wrapper — position:relative so placement-content can overlay */
.placement-box {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

/* Leaderboard: 728×90 desktop */
.placement-box.slot-leaderboard {
  width: 728px;
  height: 90px;
  margin: 20px auto;
}

/* Mobile banner: 320×100 — hidden by default; shown via media query below */
.placement-box.slot-mobile-banner {
  width: 320px;
  height: 100px;
  margin: 20px auto;
  display: none;
}

/* Medium rectangle / sidebar: 300×250 */
.placement-box.slot-rectangle {
  width: 300px;
  height: 250px;
  margin: 0 auto 20px;
}

/* Always-visible frame — fills the wrapper regardless of ad script state.
   Provides the visible placeholder when no ad renders. */
.placement-frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  box-sizing: border-box;
}

.placement-frame .slot-label {
  font-size: 10px;
  color: #aaaaaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
  user-select: none;
}

/* Amazon ad layer — on top by default until AdSense reports filled */
.placement-amazon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

/* AdSense layer — starts below Amazon; JS promotes to z-index 2 when filled */
.placement-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* On narrow viewports (< 820px): hide leaderboard, show mobile banner.
   820px gives the 728px ad + container padding room before
   it would overflow on typical layouts. */
@media (max-width: 819px) {
  .placement-box.slot-leaderboard {
    display: none;
  }
  .placement-box.slot-mobile-banner {
    display: block;
  }
}

.advanced-filters-container {
  display: none;
}

.advanced-filters-container.visible {
  display: block;
}

.search-results-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 25px;
}

.sidebar-filters {
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  padding: 20px;
}

.sidebar-filters.hidden {
  display: none;
}

.search-results-grid.no-sidebar {
  grid-template-columns: 1fr;
}

.filter-section {
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.filter-section-header .toggle-icon {
  transition: transform 0.2s ease;
}

.filter-section.collapsed .filter-section-header .toggle-icon {
  transform: rotate(-90deg);
}

.filter-section.collapsed .filter-options {
  display: none;
}

.filter-options {
  margin-top: 12px;
}

.price-range-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-range-row input {
  width: 100%;
  min-width: 0;
  padding: 5px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.price-range-row .price-range-sep {
  font-size: 12px;
  color: var(--gray-color);
  white-space: nowrap;
}

.price-range-row .btn-small {
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.price-range-row .btn {
  border-radius: 6px;
}

.price-range-row .btn:hover {
  transform: none;
  box-shadow: none;
}

.price-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #ddd;
  color: var(--dark-color);
}

.price-preset {
  border-radius: 6px;
  cursor: pointer;
}

.price-preset:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.price-preset.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Sidebar ad: fit the standard 300×250 rectangle without clipping.
 * .sidebar-filters has padding:20px each side, so the column must be at least 340px
 * (300px ad + 40px padding). The grid column above is set to 340px accordingly.
 * max-width:300px matches the global slot-rectangle width; width:100% lets it shrink
 * if the column ever gets narrower. margin-top separates it from the price filter.
 * Scoped to .sidebar-filters so other slot-rectangle placements are unaffected. */
.sidebar-filters .placement-box.slot-rectangle {
  width: 100%;
  max-width: 300px;
  margin-top: 16px;
}

.results-area {
  position: relative;
}

.view-btn {
  border: 1px solid #ddd;
  background-color: white;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.view-btn.active {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-result-list {
  display: flex;
  gap: 20px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
}

.product-result-list .product-image {
  width: 170px;
  height: 170px;
  --product-image-max-size: 150px;
  background-color: #f5f5f5;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px;
  flex-shrink: 0;
}

.product-result-list .product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-result-list .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-result-list .product-image i {
  font-size: 80px;
  color: var(--primary-color);
}

.product-result-list .product-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 12px 0 8px;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Grid view styles */
.results-list.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.results-list.grid-view .product-result-list {
  flex-direction: column;
  padding: 16px;
}

.results-list.grid-view .product-result-list .product-image {
  --product-image-max-size: 150px;
  width: 100%;
  height: 170px;
  margin-bottom: 12px;
  padding: 10px;
}

.results-list.grid-view .product-result-list .product-image-link {
  width: 100%;
}

.results-list.grid-view .product-result-list .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.results-list.grid-view .product-result-list .product-info {
  width: 100%;
}

.results-list.grid-view .product-result-list .product-title {
  font-size: 14px;
  -webkit-line-clamp: 2;
  margin: 8px 0;
}

.results-list.grid-view .product-result-list .product-meta {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.results-list.grid-view .product-result-list .product-actions {
  width: 100%;
  flex-direction: column;
}

.results-list.grid-view .product-result-list .product-actions .btn {
  width: 100%;
  text-align: center;
}

/* Ad slots: span the full row so their fixed widths don't overflow a
   single grid track and overlap adjacent product cards */
.results-list.grid-view .placement-box {
  grid-column: 1 / -1;
}

/* Mobile banner: don't overflow very narrow viewports */
.results-list.grid-view .placement-box.slot-mobile-banner {
  max-width: 100%;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--secondary-color);
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 8px;
}

.product-category {
  font-size: 14px;
  color: var(--gray-color);
  margin-bottom: 6px;
}

.product-description {
  color: var(--gray-color);
  margin: 10px 0;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.product-price-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-retailers {
  font-size: 14px;
  color: var(--gray-color);
}

.product-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.product-result-list .product-image-link {
  display: block;
  flex-shrink: 0;
}

.product-result-list .product-title a {
  color: inherit;
  text-decoration: none;
}

.product-result-list .product-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.product-result-list .product-actions .btn-details {
  padding: 4px 14px;
  font-size: 26px;
  line-height: 1.2;
}

.view-on {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.view-on-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-color);
}

.view-on-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--border-radius);
  background-color: #ff9900;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
  transition: background-color 0.2s;
}

.view-on-icon:hover {
  background-color: #e68a00;
  text-decoration: none;
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.pagination-btn {
  border: 1px solid #ddd;
  background-color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  min-width: 40px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  cursor: default;
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

a.pagination-btn {
  text-decoration: none;
  color: inherit;
}

a.pagination-btn:hover {
  background-color: #f3f4f6;
  border-color: #bbb;
}

span.pagination-btn.active {
  cursor: default;
}

.search-recent {
  margin-top: 50px;
}

.search-recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.search-recent-header h2 {
  color: #1f2937;
  margin-bottom: 0;
}

.see-all-link {
  color: #3498db;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.see-all-link:hover {
  color: #2980b9;
}

.see-all-link i {
  font-size: 12px;
}

.search-recent h2 {
  color: #1f2937;
  margin-bottom: 16px;
}

.no-results {
  padding: 48px 32px;
  text-align: center;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.no-results-icon {
  font-size: 48px;
  color: var(--primary-color);
  display: block;
  margin-bottom: 20px;
}

.no-results-title {
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.no-results-subtitle {
  color: var(--gray-color);
  font-size: 15px;
  margin-bottom: 0;
}

.search-tips-inline {
  margin-top: 28px;
  text-align: left;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: var(--border-radius);
  padding: 20px 24px;
}

.search-tips-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-tips-list li {
  margin-bottom: 14px;
  color: #374151;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.search-tips-list li:last-child {
  margin-bottom: 0;
}

.search-tips-list strong {
  color: #1f2937;
  min-width: 140px;
  font-weight: 600;
}

.search-tips-list code {
  background: #f3f4f6;
  color: #1f2937;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  border: 1px solid #e5e7eb;
}

.search-recent .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 25px;
  margin: 0;
}

.search-recent .product-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s;
}

.search-recent .product-card:hover {
  transform: translateY(-5px);
}

.search-recent .product-image {
  --product-image-max-size: 150px;
  height: 170px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.search-recent .product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.search-recent .product-image i {
  font-size: 60px;
  color: #3498db;
}

.search-recent .product-info {
  padding: 16px;
}

.search-recent .product-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-recent .product-price {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}

.search-recent .product-price-change {
  font-size: 13px;
  margin-top: 4px;
}

.search-recent .product-price-change.negative {
  color: #10b981;
}

.search-recent .btn {
  width: 100%;
  margin-top: 15px;
}

@media (max-width: 1100px) {
  .search-results-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-filters {
    order: 2;
  }
}

@media (max-width: 900px) {
  .product-result-list {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-result-list .product-image-link {
    width: 100%;
  }

  .product-result-list .product-image {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .alerts-table th,
  .alerts-table td {
    padding: 15px;
  }

  .alerts-settings-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .account-header {
    align-items: flex-start;
  }

  .account-type {
    flex-direction: column;
    align-items: flex-start;
  }

  .account-panel-details,
  .account-panel-overview {
    flex: 1 1 320px;
    max-width: none;
  }
}

/* Retailers */
.retailers-page {
  margin: 40px auto 60px;
}

.retailers-hero {
  margin-bottom: 40px;
  padding: 60px 0;
}

.retailers-hero h1 {
  margin-bottom: 10px;
}

.retailers-section {
  margin-bottom: 30px;
}

.retailers-section-intro {
  margin-bottom: 30px;
  color: var(--gray-color);
}

.retailers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.retailer-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 25px;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.retailer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120px;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
}

.retailer-logo i {
  font-size: 48px;
}

.retailer-logo .fa-amazon {
  color: #ff9900;
}

.retailer-logo .fa-store,
.retailer-logo-text {
  color: #0046be;
}

.retailer-logo .fa-walmart {
  color: #0071ce;
}

.retailer-logo .fa-egg,
.retailer-logo-text-orange {
  color: #ff6600;
}

.retailer-logo-text {
  font-weight: 700;
  margin-top: 5px;
}

.retailer-info h3 {
  margin-bottom: 10px;
  color: var(--dark-color);
}

.retailer-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
  font-size: 14px;
  color: var(--gray-color);
}

.retailer-link {
  width: 100%;
  margin-top: 15px;
}

.retailer-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.category-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.category-section h3 i {
  color: var(--primary-color);
}

.retailer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retailer-list a {
  color: var(--dark-color);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: color 0.3s ease, padding-left 0.3s ease, background-color 0.3s ease;
}

.retailer-list a:hover {
  background-color: #f0f7ff;
  color: var(--primary-color);
  padding-left: 20px;
}

.retailer-stats-card {
  background-color: #f0f7ff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.stat-label {
  font-size: 16px;
  color: var(--gray-color);
}

.retailer-steps {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.retailer-step {
  flex: 1;
  min-width: 250px;
}

.retailer-step-number {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* Retailer Detail */
.retailer-detail-page {
  margin: 30px auto 60px;
}

.retailer-hero {
  background: linear-gradient(135deg, #ff9900, #ffd700);
  color: white;
}

.retailer-hero-content {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.retailer-hero-icon {
  flex-shrink: 0;
  font-size: 80px;
}

.retailer-hero-info h1 {
  color: white;
  margin-bottom: 10px;
}

.retailer-hero-info p {
  opacity: 0.9;
  margin-bottom: 15px;
}

.retailer-hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.retailer-hero-stat {
  font-size: 24px;
  font-weight: 700;
}

.retailer-hero-label {
  font-size: 14px;
  opacity: 0.9;
}

.retailer-detail-grid {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.retailer-detail-main {
  flex: 2;
  min-width: 300px;
}

.retailer-detail-sidebar {
  flex: 1;
  min-width: 250px;
}

.retailer-tracking {
  margin-top: 25px;
}

.retailer-tracking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.retailer-tracking-card {
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
}

.retailer-tracking-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.retailer-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.retailer-category {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--dark-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.retailer-category:hover {
  transform: translateY(-3px);
  box-shadow: var(--box-shadow);
}

.retailer-category-icon i {
  color: var(--primary-color);
}

.retailer-category-title {
  font-weight: 600;
}

.retailer-category-meta {
  font-size: 12px;
  color: var(--gray-color);
}

.retailer-product-grid {
  margin-top: 20px;
}

.retailer-product-grid .product-image i {
  font-size: 60px;
  color: #3498db;
}

.retailer-product-btn {
  width: 100%;
  margin-top: 15px;
}

.retailer-actions {
  background-color: #f0f7ff;
}

.retailer-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.retailer-links {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.retailer-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.retailer-links-list a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
}

.retailer-ad {
  margin: 20px 0;
}

.retailer-tips {
  margin-top: 15px;
  padding-left: 20px;
}

.retailer-tips li {
  margin-bottom: 10px;
}

.retailer-related {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.retailer-related a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--dark-color);
  transition: background-color 0.3s ease;
}

.retailer-related a:hover {
  background-color: #f0f7ff;
}

.retailer-related i {
  color: var(--primary-color);
}

.retailer-related-name {
  font-weight: 600;
}

.retailer-related-meta {
  font-size: 12px;
  color: var(--gray-color);
}

@media (max-width: 900px) {
  .retailer-hero-content {
    align-items: flex-start;
  }

  .retailer-detail-grid {
    flex-direction: column;
  }
}

/* Browser Extension */
.extension-page {
  margin: 30px auto 60px;
}

.extension-hero {
  margin-bottom: 40px;
}

.extension-hero-actions {
  margin-top: 30px;
}

.extension-hero-btn {
  font-size: 18px;
  padding: 15px 30px;
}

.extension-section {
  margin-bottom: 30px;
}

.extension-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.extension-feature {
  padding: 25px;
  background-color: #f0f7ff;
  border-radius: var(--border-radius);
}

.extension-feature-icon {
  font-size: 40px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.extension-steps {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.extension-step {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.extension-step-number {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
}

.extension-browsers {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.extension-browser {
  text-align: center;
}

.extension-browser i {
  font-size: 60px;
}

.extension-browser .fa-chrome { color: #4285f4; }
.extension-browser .fa-firefox { color: #ff7139; }
.extension-browser .fa-edge { color: #0078d7; }
.extension-browser .fa-safari { color: #000000; }

.extension-demo {
  background-color: #2c3e50;
  color: white;
}

.extension-demo h2,
.extension-demo h3 {
  color: white;
}

.extension-demo-grid {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.extension-demo-grid p,
.extension-demo-grid ul {
  opacity: 0.9;
}

.extension-demo-preview {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.extension-demo-mock {
  background-color: #1a2530;
  padding: 30px;
  border-radius: var(--border-radius);
  display: inline-block;
}

.extension-demo-mock i {
  font-size: 60px;
  color: #7f8c8d;
}

.extension-demo-mock .extension-demo-placeholder {
  width: 300px;
  height: 200px;
  background-color: #34495e;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.extension-demo-preview p {
  margin-top: 15px;
  opacity: 0.7;
}

.extension-faq {
  margin-top: 30px;
}

.extension-cta {
  text-align: center;
  background-color: #f0f7ff;
}

.extension-cta p {
  margin: 20px auto 30px;
  max-width: 600px;
}

.extension-cta-btn {
  font-size: 20px;
  padding: 15px 40px;
}

.extension-cta-note {
  margin-top: 20px;
  color: var(--gray-color);
  font-size: 14px;
}

@media (max-width: 900px) {
  .extension-demo-preview {
    width: 100%;
  }
}

/* Privacy & Terms Pages */
.privacy-page,
.terms-page {
  margin: 40px auto;
}

.policy-content,
.terms-content {
  margin-top: 30px;
}

.policy-section,
.terms-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}

.policy-section:last-child,
.terms-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.policy-section h2,
.terms-section h2 {
  margin-bottom: 15px;
  color: var(--dark-color);
}

.policy-section h3,
.terms-section h3 {
  margin: 20px 0 10px;
  color: var(--dark-color);
  font-size: 18px;
}

.policy-section p,
.terms-section p {
  margin-bottom: 15px;
  line-height: 1.7;
}

.policy-section ul,
.terms-section ul {
  margin: 15px 0 15px 20px;
}

.policy-section li,
.terms-section li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.policy-section address,
.terms-section address {
  font-style: normal;
  margin-top: 10px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
}

.legal-updated {
  margin-bottom: 30px;
  color: var(--gray-color);
}

/* Cookies Policy Table */
.cookies-page,
.affiliate-disclosure-page {
  margin: 40px auto;
}

.cookies-table-wrapper {
  overflow-x: auto;
}

.cookies-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}

.cookies-table thead tr {
  background-color: #f8f9fa;
}

.cookies-table th,
.cookies-table td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.cookies-table th {
  color: var(--dark-color);
}

.cookies-table-name {
  font-family: monospace;
  font-weight: 600;
  white-space: nowrap;
}

.cookies-table code {
  font-family: monospace;
  background-color: #f1f3f5;
  padding: 1px 4px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .policy-section,
  .terms-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
  }
}

/* ============================================== */
/* RESULTS BAR (Simplified) */
/* ============================================== */

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-bar-count {
  font-size: 14px;
  color: #555;
}

.results-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.results-bar-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.results-bar-btn:hover {
  background: #eee;
  border-color: #ccc;
}

.results-bar-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.results-bar-separator {
  width: 1px;
  height: 24px;
  background: #ddd;
}

.results-bar-view {
  display: flex;
  gap: 4px;
}

.results-bar-view .view-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  color: #666;
  transition: all 0.15s ease;
}

.results-bar-view .view-btn:hover {
  background: #eee;
}

.results-bar-view .view-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.results-bar-pagesize {
  padding: 8px 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  background: white;
}

.results-bar-pagesize:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Responsive for results bar */
@media (max-width: 768px) {
  .results-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .results-bar-left {
    justify-content: center;
  }
  
  .results-bar-right {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .results-bar-btn span {
    display: none;
  }
  
  .results-bar-btn {
    padding: 8px 12px;
  }
  
  .results-bar-separator {
    display: none;
  }
}


/* === Styles from style.css (overrides) === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark-color);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
}

.logo-text span {
    color: var(--primary-color);
}


.user-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-actions a {
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.user-actions a:hover {
    color: var(--primary-color);
}

nav ul {
    display: flex;
    list-style: none;
    padding: 15px 0;
}

nav li {
    margin-right: 25px;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('https://images.unsplash.com/photo-1556742049-0cfed4f6a45d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-search {
    max-width: 700px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #27ae60;
}

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

.btn-accent:hover {
    background-color: #c0392b;
}

/* Cards */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 30px;
}

.card h2 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: var(--dark-color);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.product-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
  --product-image-max-size: 200px;
    height: 200px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    /* Anchor .product-badge (position: absolute) to the image instead of
       the nearest positioned ancestor (the viewport). */
    position: relative;
}

.product-image img {
  width: auto;
  height: auto;
  max-width: min(100%, var(--product-image-max-size));
  max-height: min(100%, var(--product-image-max-size));
  object-fit: contain;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 44.8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.product-price-change {
    font-size: 14px;
    color: var(--gray-color);
}

.product-price-change.positive {
    color: var(--secondary-color);
}

.product-price-change.negative {
    color: var(--accent-color);
}

/* Ad Placeholders — legacy classes removed; see .placement-box above */

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Login / Account */
.login-page {
    margin: 40px auto;
}

.auth-card {
    max-width: 900px;
    margin: 0 auto 40px;
}

.auth-columns {
    display: flex;
    flex-wrap: wrap;
    min-height: 500px;
}

.auth-section {
    flex: 1;
    min-width: 280px;
    padding: 40px;
}

.auth-section-secondary {
    border-left: 1px solid #eee;
}

.auth-subtitle {
    margin-bottom: 30px;
    color: var(--gray-color);
}

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-submit {
    width: 100%;
    margin-top: 10px;
}

.auth-social {
    text-align: center;
    margin-top: 20px;
    color: var(--gray-color);
}

.auth-social-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.auth-social-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.form-hint {
    color: var(--gray-color);
}

.auth-premium {
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: var(--border-radius);
}

.auth-premium h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.auth-premium i {
    color: #FFD700;
}

.auth-benefits {
    max-width: 900px;
    margin: 0 auto 40px;
    text-align: center;
}

.auth-benefits-grid {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    flex-wrap: wrap;
}

.auth-benefit {
    text-align: center;
    flex: 1;
    min-width: 200px;
    padding: 20px;
}

.auth-benefit i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .auth-section-secondary {
        border-left: none;
        border-top: 1px solid #eee;
    }

    .auth-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        max-width: 100%;
        margin: 10px 0;
    }
    
    nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    nav li {
        margin: 0 10px 10px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .placement-box.slot-rectangle {
        width: 300px;
    }
}

/* SVG icon styling */
.logo-img {
    height: 40px;
    width: auto;
}

.icon-small {
    width: 24px;
    height: 24px;
}

.icon-medium {
    width: 48px;
    height: 48px;
}

.icon-large {
    width: 64px;
    height: 64px;
}

/* Make SVGs adopt text color */
.icon-fill {
    fill: currentColor;
}

/* Alert messages */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background-color: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Promo Placeholders — legacy classes removed; see .placement-box above */

/* === Product Identifiers & Brand/Model (Product Page) === */
.product-detail-main-image {
  width: min(100%, 320px);
  max-width: 320px;
  aspect-ratio: 1 / 1;
  max-height: 320px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 4px;
  overflow: hidden;
}

.product-detail-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-thumbnail-strip {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
}

.product-detail-thumbnail {
  width: 60px;
  height: 60px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.product-detail-thumbnail.active {
  border-color: var(--primary-color);
}

.product-detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-identifiers {
    color: var(--gray-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-id {
    display: inline;
}

.product-id-type {
    font-weight: 600;
    color: var(--text-dark);
}

.product-id-sep {
    color: #ccc;
    margin: 0 6px;
}

.product-brand-model {
    color: var(--gray-color);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.product-subtitle {
    color: var(--gray-color);
    margin: 4px 0 15px;
    font-size: 1rem;
    line-height: 1.5;
}

.product-brand,
.product-model-name {
    display: inline;
}

/* === Where to Buy Section (Product Page) === */
.where-to-buy-section {
    position: relative;
}

.where-to-buy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.where-to-buy-header h2 {
    margin-bottom: 5px;
}

.where-to-buy-header p {
    color: var(--gray-color);
    margin: 0;
}

.where-to-buy-expand {
    padding: 8px 12px;
}

.wtb-disclaimer {
    font-size: 12px;
    color: var(--gray-color);
    margin: 20px 0 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Tab Navigation */
.wtb-tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
    /* Hide scrollbar cross-browser while preserving scroll */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
}

.wtb-tabs::-webkit-scrollbar {
    display: none;                /* Chrome/Safari/Opera */
}

.wtb-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wtb-tab:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.wtb-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.wtb-tab i {
    font-size: 14px;
}

/* Tab Panels */
.wtb-panel {
    display: none;
}

.wtb-panel.active {
    display: block;
    height: 480px;
    overflow: hidden;
}

/* Table Styles */
.wtb-table-wrapper {
    height: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
}

.wtb-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f8f9fa;
}

.wtb-th-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.wtb-th-sortable:hover {
    color: var(--primary-color);
}

.wtb-sort-icon::after {
    content: '\2195'; /* ↕ */
    margin-left: 4px;
    opacity: 0.35;
    font-size: 11px;
}

.wtb-th-sorted-asc .wtb-sort-icon::after {
    content: '\2191'; /* ↑ */
    opacity: 1;
    color: var(--primary-color);
}

.wtb-th-sorted-desc .wtb-sort-icon::after {
    content: '\2193'; /* ↓ */
    opacity: 1;
    color: var(--primary-color);
}

.wtb-table {
    width: 100%;
    border-collapse: collapse;
}

.wtb-table th {
    padding: 12px 15px;
    text-align: left;
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wtb-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.wtb-table tr:hover {
    background-color: #fafafa;
}

/* Retailer Cell */
.wtb-retailer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wtb-retailer-logo {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: #ff9900;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.wtb-retailer-logo.wtb-logo-bestbuy {
    background-color: #0046be;
}

.wtb-retailer-logo.wtb-logo-walmart {
    background-color: #0071ce;
}

.wtb-retailer-logo.wtb-logo-target {
    background-color: #cc0000;
}

.wtb-retailer-info {
    flex: 1;
}

.wtb-retailer-name {
    font-weight: 600;
    color: #333;
}

.wtb-retailer-detail {
    font-size: 12px;
    color: var(--gray-color);
}

/* Price Cell */
.wtb-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--accent-color);
}

.wtb-total {
    font-weight: 600;
    color: #333;
}

/* Arrival Cell */
.wtb-arrival {
    white-space: nowrap;
}

/* Updated Cell */
.wtb-updated {
    white-space: nowrap;
    font-size: 12px;
    color: var(--gray-color);
}

.wtb-arrival-date {
    display: block;
    font-weight: 500;
}

.wtb-arrival-date.wtb-arrival-fast {
    color: var(--secondary-color);
}

.wtb-arrival-note {
    display: block;
    font-size: 12px;
    color: var(--secondary-color);
}

/* Icons Cell */
.wtb-icons {
    vertical-align: middle;
    white-space: nowrap;
}

.wtb-icons i {
    font-size: 16px;
    cursor: help;
    margin-right: 8px;
}

.wtb-icons i:last-child {
    margin-right: 0;
}

.wtb-icon-prime {
    color: #ff9900;
}

.wtb-icon-returns {
    color: var(--secondary-color);
}

.wtb-icon-sale {
    color: var(--accent-color);
}

.wtb-icon-plus {
    color: #0071ce;
}

/* Action Cell */
.wtb-action {
    text-align: right;
}

.wtb-action .btn {
    height: 40px;
    min-width: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 16px;
}

/* Best Price/Fastest Row Highlight */
.wtb-best-price,
.wtb-fastest {
    background-color: #f0fff4;
}

/* Badges */
.wtb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.wtb-badge-best {
    background-color: #d4edda;
    color: #155724;
}

.wtb-badge-fast {
    background-color: #cce5ff;
    color: #004085;
}

/* Speed Badges */
.wtb-speed-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.wtb-speed-fast {
    background-color: #d4edda;
    color: #155724;
}

.wtb-speed-medium {
    background-color: #fff3cd;
    color: #856404;
}

.wtb-speed-slow {
    background-color: #f8d7da;
    color: #721c24;
}

/* Sort Note */
.wtb-sort-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.wtb-sort-note i {
    color: var(--primary-color);
}

/* Local Tab Styles */
.wtb-local-header {
    margin-bottom: 20px;
}

.wtb-location-search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.wtb-location-input-group {
    display: flex;
    gap: 10px;
}

.wtb-location-input-group .form-control {
    flex: 1;
    max-width: 300px;
}

.wtb-detect-btn {
    padding: 10px 15px;
}

.wtb-local-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wtb-local-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.wtb-local-store {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: box-shadow 0.2s ease;
}

.wtb-local-store:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Left: store info block */
.wtb-store-info {
    flex: 1;
    min-width: 0;
}

/* Right: price + actions block */
.wtb-store-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.wtb-store-address {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wtb-store-distance {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 2px;
}

.wtb-store-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
}

.wtb-stock {
    font-weight: 500;
}

.wtb-in-stock {
    color: var(--secondary-color);
}

.wtb-low-stock {
    color: #f39c12;
}

.wtb-out-of-stock {
    color: var(--accent-color);
}

/* Store Phone */
.wtb-store-phone {
    font-size: 12px;
    margin-top: 3px;
}

.wtb-store-phone a {
    color: var(--primary-color);
    text-decoration: none;
}

.wtb-store-phone a:hover {
    text-decoration: underline;
}

.wtb-store-phone i {
    margin-right: 3px;
}

/* Hours */
.wtb-store-hours {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 12px;
    color: #555;
    position: relative;
}

.wtb-hours-today {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wtb-hours-closed {
    color: var(--accent-color);
}

.wtb-hours-toggle {
    background: none;
    border: none;
    padding: 0 2px;
    cursor: pointer;
    color: #999;
    font-size: 11px;
    line-height: 1;
}

.wtb-hours-toggle:hover {
    color: var(--primary-color);
}

.wtb-hours-popup {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 10;
    padding: 8px 12px;
    white-space: nowrap;
}

.wtb-hours-popup table {
    border-collapse: collapse;
    font-size: 12px;
}

.wtb-hours-popup td {
    padding: 2px 8px 2px 0;
    color: #444;
}

.wtb-hours-popup td:first-child {
    font-weight: 600;
    color: #222;
}

/* Store icons row */
.wtb-store-icons {
    display: flex;
    gap: 6px;
    align-items: center;
    min-height: 18px;
}

/* Order online button */
.wtb-order-btn {
    font-size: 12px;
    padding: 4px 10px;
    white-space: nowrap;
}

.wtb-hours {
    color: #666;
}

/* Compact Location Search */
.wtb-location-search-compact {
    display: flex;
    align-items: center;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    background: #fff;
}

.wtb-location-search-compact i.fa-map-marker-alt {
    padding: 0 12px;
    color: var(--primary-color);
    font-size: 16px;
}

.wtb-location-search-compact .form-control {
    flex: 1;
    border: none;
    height: 100%;
    padding: 0;
    font-size: 14px;
    outline: none;
    box-shadow: none;
}

.wtb-location-search-compact .form-control:focus {
    box-shadow: none;
    outline: none;
}

.wtb-location-search-compact .form-control:-webkit-autofill,
.wtb-location-search-compact .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: inherit;
}

.wtb-location-search-compact .form-control::placeholder {
    color: #b0b8c8;
    opacity: 1;
}

.wtb-locate-btn {
    height: 40px;
    width: 44px;
    border: none;
    border-left: 1px solid #ddd;
    border-radius: 0;
    background: #f8f9fa;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.wtb-locate-btn:hover {
    background: #e9ecef;
}

.wtb-location-btn {
    height: 40px;
    width: 44px;
    border: none;
    border-left: 1px solid #ddd;
    border-radius: 0;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.wtb-location-btn:hover {
    background: #2980b9;
}

/* Local Map */
.wtb-local-map {
    height: 420px;
    min-height: 420px;
    max-height: 420px;
}

#localMap {
    height: 100%;
    border-radius: 4px;
    z-index: 1;
}

#localMapModal {
    height: 400px;
    border-radius: 4px;
    z-index: 1;
}

/* Person marker for detect/search point on local map */
.wtb-person-marker {
    background: transparent !important;
    border: none !important;
    width: 34px !important;
    height: 41px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.wtb-person-marker i {
    color: #1a73e8;
    font-size: 36px;
    line-height: 1;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}

/* Custom Tab Message */
.wtb-custom-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.wtb-custom-message i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.wtb-custom-message h3 {
    margin-bottom: 10px;
    color: #333;
}

.wtb-custom-message p {
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal Styles */
.wtb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

.wtb-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.wtb-modal-content {
    background: white;
    border-radius: 4px;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.wtb-modal-header h2,
.wtb-modal-header .wtb-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: bold;
}

.wtb-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 5px;
    transition: color 0.2s ease;
}

.wtb-modal-close:hover {
    color: #333;
}

.wtb-modal-body {
    padding: 25px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Modal overrides for larger view */
.wtb-modal-body .wtb-local-content {
    grid-template-columns: 1fr 1.5fr;
}

.wtb-modal-body .wtb-local-list {
    height: 400px;
    min-height: 400px;
    max-height: 400px;
}

.wtb-modal-body .wtb-local-map {
    height: 400px;
    min-height: 400px;
    max-height: 400px;
}

.wtb-modal-body #localMapModal {
    height: 100%;
    min-height: 260px;
}

/* Responsive */
@media (max-width: 768px) {
    .wtb-tabs {
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .wtb-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .wtb-tab span {
        display: none;
    }

    /* Tab content: no fixed min-height on mobile to avoid excess whitespace */
    .wtb-tab-content {
        min-height: 0;
    }
    
    .wtb-local-content {
        grid-template-columns: 1fr;
    }

    /* Stacked: list auto-height, map shorter */
    .wtb-local-list {
        height: auto;
        max-height: 320px;
    }

    .wtb-local-map {
        height: 260px;
        min-height: 260px;
    }

    #localMap {
        height: 100%;
    }
    
    .wtb-local-store {
        flex-wrap: wrap;
    }
    
    .wtb-local-store .wtb-retailer {
        width: 100%;
    }
    
    .wtb-local-details {
        text-align: left;
    }
    
    .wtb-location-input-group {
        flex-wrap: wrap;
    }
    
    .wtb-location-input-group .form-control {
        max-width: none;
    }
    
    .wtb-modal-content {
        margin: 10px;
    }
    
    .wtb-modal-body .wtb-local-content {
        grid-template-columns: 1fr;
    }

    .wtb-modal-body .wtb-local-list {
        height: auto;
        max-height: 280px;
    }

    .wtb-modal-body .wtb-local-map {
        height: min(320px, calc(100vh - 220px));
        min-height: 220px;
    }

    .wtb-modal-body #localMapModal {
        height: 100%;
        min-height: 220px;
    }
}

/* Data-driven retailer pages (retailers.tmpl / retailer.tmpl) */

/* Visually hidden but still available to screen readers (form labels) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Retailer index: search form (input + button on one row) */
.retailers-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
}

.retailers-search .form-control {
  flex: 1 1 260px;
  width: auto;
}

.retailers-search .btn {
  flex: 0 0 auto;
}

/* Retailer logo: constrain <img> inside the fixed-size logo boxes */
.retailer-logo img,
.retailer-hero-icon img {
  max-height: 80px;
  max-width: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Initial fallback shown when a retailer has no logo image */
.retailer-logo-fallback {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-color);
  text-transform: uppercase;
  user-select: none;
}

/* Override on the gold hero gradient so the fallback stays readable */
.retailer-hero-icon .retailer-logo-fallback {
  font-size: 64px;
  color: white;
}

/* Retailer index: page indicator between prev/next */
.pagination-info {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--gray-color);
}

/* Pagination buttons render on the dark page background here, so pin the
   text to the same dark shade used on white surfaces elsewhere. */
.retailers-page .pagination-btn,
.retailer-detail-page .pagination-btn {
  color: #1f2937;
}

/* Retailer detail: back link above the hero */
.retailer-back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Retailer detail: product cards (white surface) */
.product-card .product-title {
  color: #1f2937;
}

.product-card .product-title a {
  color: inherit;
  text-decoration: none;
}

.product-card .product-title a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.retailer-product-store {
  font-size: 14px;
  color: var(--gray-color);
  margin-bottom: 15px;
}

/* Stacked full-width actions inside a product card */
.retailer-product-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.retailer-product-actions .btn {
  width: 100%;
  text-align: center;
}

@media (max-width: 480px) {
  .retailers-search {
    flex-direction: column;
    align-items: stretch;
  }

  .retailers-search .btn {
    width: 100%;
  }
}

/* Retailer store locator page */
.retailer-stores-page a { color: var(--dark-color); }
.retailer-stores-page a:hover { color: var(--primary-color); text-decoration: none; }

.retailer-stores-page .breadcrumbs {
    margin: 25px 0 10px;
    font-size: 14px;
    color: var(--gray-color);
}
.retailer-stores-page .breadcrumbs a { color: var(--gray-color); text-decoration: none; }
.retailer-stores-page .breadcrumbs a:hover { color: var(--primary-color); }
.retailer-stores-page .breadcrumbs span { margin: 0 6px; }

.retailer-stores-page .seller-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 15px 0 20px;
}
.retailer-stores-page .seller-logo {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}
.retailer-stores-page .seller-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.retailer-stores-page .seller-bar h1 { color: #fff; font-size: 24px; margin: 0; }
.retailer-stores-page .seller-bar .seller-meta { color: rgba(255,255,255,0.9); font-size: 14px; margin: 6px 0 0; }
.retailer-stores-page .seller-bar-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
}
.retailer-stores-page .seller-bar-main { display: flex; align-items: center; gap: 20px; min-width: 0; }
.retailer-stores-page .seller-bar-ad { flex-shrink: 0; }
.retailer-stores-page .seller-bar-ad .placement-box.slot-rectangle { margin: 0; }
.retailer-stores-page .seller-bar-ad .placement-box.slot-leaderboard { display: none; }

.retailer-stores-page .locator {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: stretch;
}
.retailer-stores-page .results-panel {
    display: flex;
    flex-direction: column;
    height: 560px;
    min-height: 560px;
    max-height: 560px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
}
.retailer-stores-page .results-panel h2, .retailer-stores-page .results-panel form { flex-shrink: 0; }
.retailer-stores-page .results-panel form { margin-bottom: 12px; }
.retailer-stores-page .results-list { overflow-y: auto; flex: 1; min-height: 0; scrollbar-gutter: stable; }
.retailer-stores-page .results-panel h2 {
    color: var(--dark-color);
    font-size: 18px;
    margin-bottom: 15px;
}
.retailer-stores-page .store-result {
    display: flex;
    gap: 14px;
    padding: 14px 12px;
    border-radius: var(--border-radius);
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.15s;
}
.retailer-stores-page .store-result:hover,
.retailer-stores-page .store-result.active { background: #eef6ff; }
.retailer-stores-page .store-result.active { box-shadow: inset 3px 0 0 var(--primary-color); }
.retailer-stores-page .store-result:last-child { border-bottom: none; }
.retailer-stores-page .store-result .store-pin {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #f0f7ff;
    color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.retailer-stores-page .store-result h3 { font-size: 16px; color: var(--dark-color); margin-bottom: 2px; }
.retailer-stores-page .store-result .store-addr { font-size: 13px; color: var(--gray-color); margin-bottom: 4px; }
.retailer-stores-page .store-result .store-dist { font-size: 13px; color: var(--secondary-color); font-weight: 600; }
.retailer-stores-page .store-result .store-links { margin-top: 6px; display: flex; gap: 14px; font-size: 13px; }
.retailer-stores-page .store-result .store-links a { color: var(--primary-color); }

.retailer-stores-page .map-panel {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}
.retailer-stores-page .map-panel .store-map {
    width: 100%;
    height: 560px;
    min-height: 560px;
    max-height: 560px;
}
.retailer-stores-page .store-pin-marker .map-pin {
    color: var(--primary-color);
    font-size: 30px;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.35);
    transform-origin: bottom center;
    transition: transform 0.15s, color 0.15s;
}
.retailer-stores-page .store-pin-marker .map-pin.active {
    color: var(--accent-color);
    transform: scale(1.3);
}
.retailer-stores-page .online-callout {
    margin: 0 0 20px;
    background: #e8f1fb;
    border: 1px solid #bcd7ef;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
}
.retailer-stores-page .online-callout h3 { color: var(--dark-color); font-size: 16px; margin-bottom: 6px; }
.retailer-stores-page .online-callout p { color: var(--dark-color); font-size: 14px; }
.retailer-stores-page .online-callout a { color: #1b6498; font-weight: 600; }
.retailer-stores-page .store-hours { font-size: 13px; margin-bottom: 4px; }
.retailer-stores-page .store-hours i { margin-right: 6px; }
.retailer-stores-page .store-hours.open { color: var(--secondary-color); }
.retailer-stores-page .store-hours.closing { color: #e67e22; }
.retailer-stores-page .store-hours.closed { color: var(--accent-color); }
.retailer-stores-page .store-phone { font-size: 13px; margin-bottom: 4px; }
.retailer-stores-page .store-phone a { color: var(--dark-color); }
.retailer-stores-page .store-phone i { margin-right: 6px; }
.retailer-stores-page .store-visit { font-size: 13px; margin-bottom: 4px; }
.retailer-stores-page .store-visit a { color: var(--primary-color); }
.retailer-stores-page .store-visit i { margin-right: 6px; }

@media (max-width: 900px) {
    .retailer-stores-page .locator { grid-template-columns: 1fr; }
    .retailer-stores-page .map-panel { order: -1; }
    .retailer-stores-page .map-panel .store-map { height: 320px; min-height: 320px; max-height: 320px; }
    .retailer-stores-page .seller-bar-layout { grid-template-columns: 1fr; }
    .retailer-stores-page .seller-bar-ad { margin: 0 auto; }
    .retailer-stores-page .seller-bar-ad .placement-box.slot-rectangle { display: none; }
    .retailer-stores-page .seller-bar-ad .placement-box.slot-leaderboard { display: block; }
}
@media (max-width: 819px) {
    .retailer-stores-page .seller-bar-ad .placement-box.slot-leaderboard { display: none; }
    .retailer-stores-page .seller-bar-ad .placement-box.slot-mobile-banner { display: block; margin: 20px auto; }
}
@media (max-width: 480px) {
    .retailer-stores-page .seller-bar-ad .placement-box.slot-mobile-banner { display: none; }
}

/* Retailer store detail */
.retailer-store-detail-page a { color: var(--dark-color); }
.retailer-store-detail-page a:hover { color: var(--primary-color); text-decoration: none; }

.retailer-store-detail-page .breadcrumbs {
    margin: 25px 0 10px;
    font-size: 14px;
    color: var(--gray-color);
}
.retailer-store-detail-page .breadcrumbs a { color: var(--gray-color); text-decoration: none; }
.retailer-store-detail-page .breadcrumbs a:hover { color: var(--primary-color); }
.retailer-store-detail-page .breadcrumbs span { margin: 0 6px; }

.retailer-store-detail-page .store-header {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin: 15px 0 30px;
}
.retailer-store-detail-page .store-header h1 { color: var(--dark-color); font-size: 30px; margin-bottom: 6px; }
.retailer-store-detail-page .store-header-body {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 30px;
    align-items: start;
}
.retailer-store-detail-page .store-info .row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-color);
    margin-bottom: 10px;
}
.retailer-store-detail-page .store-info .row i {
    color: var(--primary-color);
    width: 16px;
    margin-top: 4px;
    text-align: center;
}
.retailer-store-detail-page .store-info .muted { color: var(--gray-color); }
.retailer-store-detail-page .store-info .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}
.retailer-store-detail-page .store-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.retailer-store-detail-page .store-features .feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f7ff;
    color: var(--dark-color);
    border: 1px solid #d6e6f7;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
}
.retailer-store-detail-page .store-features .feature i { color: var(--primary-color); }
.retailer-store-detail-page .store-map iframe {
    width: 100%;
    height: 320px;
    border: 0;
    border-radius: var(--border-radius);
    display: block;
    background: #eef2f5;
}

.retailer-store-detail-page h2 {
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin: 40px 0 20px;
}

.retailer-store-detail-page .category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -5px 0 25px;
}
.retailer-store-detail-page .cat-filter {
    background: #fff;
    color: var(--dark-color);
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.retailer-store-detail-page .cat-filter:hover { border-color: var(--primary-color); color: var(--primary-color); }
.retailer-store-detail-page .cat-filter.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

.retailer-store-detail-page .product-card {
    display: flex;
    flex-direction: column;
}
.retailer-store-detail-page .product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.retailer-store-detail-page .product-info .btn {
    margin-top: auto;
    align-self: flex-start;
}
.retailer-store-detail-page .btn,
.retailer-store-detail-page .btn:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .retailer-store-detail-page .store-header-body { grid-template-columns: 1fr; }
}

/* Screen-reader-only utility (used by store locator form label) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Retailers index (branded-style layout, mirrors the Brands section) */
.retailers-page a { color: var(--dark-color); }
.retailers-page a:hover { color: var(--primary-color); text-decoration: none; }

.retailers-page .breadcrumbs {
    margin: 25px 0 10px;
    font-size: 14px;
    color: var(--gray-color);
}
.retailers-page .breadcrumbs a { color: var(--gray-color); text-decoration: none; }
.retailers-page .breadcrumbs a:hover { color: var(--primary-color); }
.retailers-page .breadcrumbs span { margin: 0 6px; }

.retailers-page .retailers-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 0;
    text-align: center;
}
.retailers-page .retailers-hero h1 { color: #fff; margin-bottom: 10px; }
.retailers-page .retailers-hero p { color: rgba(255,255,255,0.9); margin-bottom: 25px; }
.retailers-page .retailers-search {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.retailers-page .retailers-search input {
    flex: 1 1 260px;
    padding: 12px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
}
.retailers-page .retailers-search .btn { background: var(--dark-color); }
.retailers-page .retailers-search .btn:hover { background: #1a252f; }

.retailers-page .retailers-hero-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
}
.retailers-page .retailers-hero-main { min-width: 0; }
.retailers-page .retailers-hero-ad { flex-shrink: 0; }
.retailers-page .retailers-hero-ad .placement-box.slot-rectangle { margin: 0; }
.retailers-page .retailers-hero-ad .placement-box.slot-leaderboard { display: none; }

/* Fixed bottom bar slot — 320×50, shown only inside the <= 480px fixed bar.
   Deliberately retailers-scoped: the shared .placement-box.slot-* rules are
   global and other pages depend on their own sizes. */
.retailers-page .placement-box.slot-mobile-fixed {
    width: 320px;
    height: 50px;
    margin: 0 auto;
}

.retailers-page .retailers-fixed-ad { display: none; }

.retailers-page .retailers-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin: 30px 0 60px;
}
.retailers-page .retailers-sidebar {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    align-self: start;
}
.retailers-page .retailers-sidebar h2 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.retailers-page .retailers-sidebar ul { list-style: none; }
.retailers-page .retailers-sidebar li { margin-bottom: 4px; }
.retailers-page .retailers-sidebar a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
    text-decoration: none;
}
.retailers-page .retailers-sidebar a:hover { background: #f0f7ff; }
.retailers-page .retailers-sidebar a.active { background: var(--primary-color); color: #fff; font-weight: 600; }
.retailers-page .retailers-sidebar a.active i { color: #fff; }
.retailers-page .retailers-empty { grid-column: 1 / -1; text-align: center; color: var(--gray-color); padding: 40px 0; }

.retailers-page .retailers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin: 0;
    align-self: start;
}
.retailers-page .retailer-card {
    background: #fff;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s;
}
.retailers-page .retailer-card:hover { transform: translateY(-5px); }
.retailers-page .retailer-card-head { display: flex; align-items: center; gap: 15px; }
.retailers-page .retailer-logo {
    height: 48px;
    min-width: 48px;
    max-width: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
    flex-direction: row;
    margin: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.retailers-page .retailer-logo img { max-height: 48px; max-width: 60px; width: auto; height: auto; }
.retailers-page .retailer-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}
.retailers-page .retailer-card h3 { color: var(--dark-color); font-size: 18px; }
.retailers-page .retailer-card h3 a { text-decoration: none; }
.retailers-page .retailer-chips { display: flex; flex-wrap: wrap; gap: 6px; height: 54px; overflow: hidden; align-content: flex-start; align-items: flex-start; }
.retailers-page .retailer-chip {
    background: var(--light-color);
    color: var(--dark-color);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
}
.retailers-page .retailer-actions { display: flex; gap: 10px; margin-top: auto; }
.retailers-page .retailer-actions .btn { flex: 1; text-align: center; padding: 8px 10px; font-size: 13px; }

@media (max-width: 900px) {
    .retailers-page .retailers-hero-layout { grid-template-columns: 1fr; }
    .retailers-page .retailers-hero-ad { margin: 0 auto; }
    .retailers-page .retailers-layout { grid-template-columns: 1fr; }
    .retailers-page .retailers-hero-ad .placement-box.slot-rectangle { display: none; }
    .retailers-page .retailers-hero-ad .placement-box.slot-leaderboard { display: block; }
}

@media (max-width: 819px) {
    .retailers-page .retailers-hero-ad .placement-box.slot-leaderboard { display: none; }
    .retailers-page .retailers-hero-ad .placement-box.slot-mobile-banner { display: block; margin: 20px auto; }
}

@media (max-width: 480px) {
    .retailers-page .retailers-hero-ad .placement-box.slot-mobile-banner { display: none; }
    /* Fixed bottom bar (320×50 slot inside). z-index is raised above the
       sticky header (effective z-index 1000, see `header` at ~line 2501) and
       kept below the .wtb-modal overlay (z-index 2000) so modals still win. */
    .retailers-page .retailers-fixed-ad {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        align-items: center;
        justify-content: center;
        background: #fff;
        border-top: 1px solid #e5e7eb;
    }
    /* Intentional deviation from the reference site: 51px bar + 16px breathing
       room, so the bar never permanently covers the footer. */
    body:has(.retailers-page) { padding-bottom: 67px; }
}

/* Brands */
.brands-page a { color: var(--dark-color); }
.brands-page a:hover { color: var(--primary-color); text-decoration: none; }

.brands-page .breadcrumbs {
    margin: 25px 0 10px;
    font-size: 14px;
    color: var(--gray-color);
}
.brands-page .breadcrumbs a { color: var(--gray-color); text-decoration: none; }
.brands-page .breadcrumbs a:hover { color: var(--primary-color); }
.brands-page .breadcrumbs span { margin: 0 6px; }

.brands-page .brands-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 0;
    text-align: center;
}
.brands-page .brands-hero h1 { color: #fff; margin-bottom: 10px; }
.brands-page .brands-hero p { color: rgba(255,255,255,0.9); margin-bottom: 25px; }
.brands-page .brands-search {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.brands-page .brands-search input {
    flex: 1 1 260px;
    padding: 12px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
}
.brands-page .brands-search .btn { background: var(--dark-color); }
.brands-page .brands-search .btn:hover { background: #1a252f; }

.brands-page .brands-hero-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
}
.brands-page .brands-hero-main { min-width: 0; }
.brands-page .brands-hero-ad { flex-shrink: 0; }
.brands-page .brands-hero-ad .placement-box.slot-rectangle { margin: 0; }
.brands-page .brands-hero-ad .placement-box.slot-leaderboard { display: none; }

/* Fixed bottom bar slot — 320×50, shown only inside the <= 480px fixed bar.
   Deliberately brands-scoped: the shared .placement-box.slot-* rules are
   global and other pages depend on their own sizes. */
.brands-page .placement-box.slot-mobile-fixed {
    width: 320px;
    height: 50px;
    margin: 0 auto;
}

.brands-page .brands-fixed-ad { display: none; }

.brands-page .brands-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin: 30px 0 60px;
}
.brands-page .brands-sidebar {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    align-self: start;
}
.brands-page .brands-sidebar h2 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.brands-page .brands-sidebar ul { list-style: none; }
.brands-page .brands-sidebar li { margin-bottom: 4px; }
.brands-page .brands-sidebar a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
    text-decoration: none;
}
.brands-page .brands-sidebar a:hover { background: #f0f7ff; }
.brands-page .brands-sidebar a.active { background: var(--primary-color); color: #fff; font-weight: 600; }
.brands-page .brands-sidebar a.active i { color: #fff; }
.brands-page .brands-empty { grid-column: 1 / -1; text-align: center; color: var(--gray-color); padding: 40px 0; }

.brands-page .brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    align-self: start;
}
.brands-page .brand-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s;
}
.brands-page .brand-card:hover { transform: translateY(-5px); }
.brands-page .brand-card-head { display: flex; align-items: center; gap: 15px; }
.brands-page .brand-logo {
    height: 48px;
    min-width: 48px;
    max-width: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brands-page .brand-logo img { max-height: 48px; max-width: 60px; width: auto; height: auto; }
.brands-page .brand-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}
.brands-page .brand-card h3 { color: var(--dark-color); font-size: 18px; }
.brands-page .brand-card h3 a { text-decoration: none; }
.brands-page .brand-tagline { color: var(--gray-color); font-size: 14px; }
.brands-page .brand-chips { display: flex; flex-wrap: wrap; gap: 6px; height: 54px; overflow: hidden; align-content: flex-start; align-items: flex-start; }
.brands-page .brand-chip {
    background: var(--light-color);
    color: var(--dark-color);
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
}
.brands-page .brand-count { color: var(--gray-color); font-size: 13px; }
.brands-page .brand-actions { display: flex; gap: 10px; }
.brands-page .brand-actions .btn { flex: 1; text-align: center; padding: 8px 10px; font-size: 13px; }
.brands-page .brand-shop { display: flex; flex-direction: column; gap: 8px; }
.brands-page .brand-shop-label { color: var(--dark-color); font-size: 13px; }
.brands-page .brand-retailers { display: flex; flex-wrap: wrap; gap: 8px; }
.brands-page .brand-retailers .btn { text-align: center; padding: 8px 10px; font-size: 13px; }
.brands-page .brand-retailers .btn-amazon { background: #ff9900; }
.brands-page .brand-retailers .btn-amazon:hover { background: #e68a00; }

@media (max-width: 900px) {
    .brands-page .brands-layout { grid-template-columns: 1fr; }
    .brands-page .brands-hero-layout { grid-template-columns: 1fr; }
    .brands-page .brands-hero-ad { margin: 0 auto; }
    .brands-page .brands-hero-ad .placement-box.slot-rectangle { display: none; }
    .brands-page .brands-hero-ad .placement-box.slot-leaderboard { display: block; }
}

@media (max-width: 819px) {
    .brands-page .brands-hero-ad .placement-box.slot-leaderboard { display: none; }
    .brands-page .brands-hero-ad .placement-box.slot-mobile-banner { display: block; margin: 20px auto; }
}

@media (max-width: 480px) {
    .brands-page .brands-hero-ad .placement-box.slot-mobile-banner { display: none; }
    .brands-page .brands-fixed-ad {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        align-items: center;
        justify-content: center;
        background: #fff;
        border-top: 1px solid #e5e7eb;
    }
    body:has(.brands-page) { padding-bottom: 67px; }
}

/* Brand detail page */
.brand-detail-page a { color: var(--dark-color); }
.brand-detail-page a:hover { color: var(--primary-color); text-decoration: none; }

.brand-detail-page .breadcrumbs {
    margin: 25px 0 10px;
    font-size: 14px;
    color: var(--gray-color);
}
.brand-detail-page .breadcrumbs a { color: var(--gray-color); text-decoration: none; }
.brand-detail-page .breadcrumbs a:hover { color: var(--primary-color); }
.brand-detail-page .breadcrumbs span { margin: 0 6px; }

.brand-detail-page .brand-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 0;
}
.brand-detail-page .brand-header-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: center;
}
.brand-detail-page .brand-header-main {
    min-width: 0;
}
.brand-detail-page .brand-header h1 {
    color: #fff;
    font-size: 40px;
    margin: 0 0 10px;
    line-height: 1.2;
}
.brand-detail-page .brand-header h1 img {
    max-height: 110px;
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
}
.brand-detail-page .brand-header-ad {
    flex-shrink: 0;
}
.brand-detail-page .brand-header-ad .placement-box.slot-rectangle { margin: 0; }
.brand-detail-page .brand-header-ad .placement-box.slot-leaderboard { display: none; }
.brand-detail-page .brand-header-info {
    margin-top: 20px;
}
.brand-detail-page .brand-header-info .tagline {
    color: rgba(255,255,255,0.9);
    font-size: 20px;
    margin-bottom: 12px;
}

.brand-detail-page .prose { color: rgba(255,255,255,0.9); line-height: 1.8; }
.brand-detail-page .prose p { margin-bottom: 18px; }

.brand-detail-page h2 {
    color: var(--dark-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin: 40px 0 20px;
}

.brand-detail-page .category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -5px 0 25px;
}
.brand-detail-page .cat-filter {
    display: inline-block;
    background: #fff;
    color: var(--dark-color);
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.brand-detail-page .cat-filter:hover { border-color: var(--primary-color); color: var(--primary-color); }
.brand-detail-page .cat-filter.active { background: var(--primary-color); border-color: var(--primary-color); color: #fff; }

.brand-detail-page .retailer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.brand-detail-page .retailer-card {
    width: 200px;
    max-width: 100%;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s;
}
.brand-detail-page .retailer-card:hover { transform: translateY(-4px); }
.brand-detail-page .retailer-card img { width: 100%; max-width: 160px; height: auto; }
.brand-detail-page .retailer-card .retailer-card-name { color: var(--dark-color); font-weight: 600; }
.brand-detail-page .retailer-card-icon {
    font-size: 48px;
    color: #ff9900;
    display: block;
    margin-bottom: 8px;
}
.brand-detail-page .retailer-card-name {
    color: var(--dark-color);
    font-weight: 600;
}

@media (max-width: 900px) {
    .brand-detail-page .brand-header-layout { grid-template-columns: 1fr; }
    .brand-detail-page .brand-header-ad { margin: 0 auto; }
    .brand-detail-page .brand-header-ad .placement-box.slot-rectangle { display: none; }
    .brand-detail-page .brand-header-ad .placement-box.slot-leaderboard { display: block; }
}
@media (max-width: 819px) {
    .brand-detail-page .brand-header-ad .placement-box.slot-leaderboard { display: none; }
    .brand-detail-page .brand-header-ad .placement-box.slot-mobile-banner { display: block; margin: 20px auto; }
}
