/* ==========================================
   BOOKLET / MAGAZINE STYLING (COSTCO & AUTOZONE STYLE)
   ========================================== */

:root {
  --booklet-bg: #0f172a;           /* Dark premium auto store slate */
  --booklet-card-bg: #1e293b;      /* Sleek dark container */
  --booklet-accent: #ff551f;       /* Brand orange */
  --booklet-accent-hover: #e04616;
  --booklet-yellow: #f59e0b;       /* Bright discount yellow */
  --booklet-red: #ef4444;          /* Offer badge red */
  --booklet-green: #10b981;        /* WhatsApp green */
  --booklet-green-hover: #059669;
  --booklet-text: #f8fafc;
  --booklet-muted: #94a3b8;
  --booklet-border: #334155;
  --booklet-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body.booklet-theme {
  background-color: #f8fafc;
  color: #1e293b;
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.booklet-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Top Booklet Strip */
.booklet-top-strip {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--booklet-accent);
}

.top-strip-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.strip-scarcity {
  color: #f59e0b;
  font-weight: 800;
}

/* Header Cover (Static - Non Sticky) */
.booklet-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: static;
  padding: 1.1rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-brand-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.header-subbrand {
  display: flex;
  flex-direction: column;
  border-left: 2px solid #e2e8f0;
  padding-left: 1rem;
}

.subbrand-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.subbrand-legal {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.subbrand-legal strong {
  color: #334155;
}

.text-yellow { color: var(--booklet-yellow); }
.text-orange { color: var(--booklet-accent); }
.text-brand-orange { color: #ff551f; }

.header-wa-btn {
  background-color: var(--booklet-green);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.header-wa-btn:hover {
  background-color: var(--booklet-green-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

/* Hero Section (Printed Catalog Style) */
.booklet-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 2.5rem 0 2.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-cover-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  margin-bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #0f172a;
  text-transform: uppercase;
  background: none;
  -webkit-text-fill-color: initial;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  color: #64748b;
  max-width: 680px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* 4 Core Value Propositions Grid */
.value-props-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 1150px;
  margin: 1.5rem 0 2rem 0;
  text-align: left;
}

.value-prop-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.value-prop-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 85, 31, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.value-icon {
  background: rgba(255, 85, 31, 0.1);
  color: var(--booklet-accent);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.value-content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.value-content p {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

.booklet-search-bar {
  width: 100%;
  max-width: 600px;
}

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

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
}

.clear-search-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
}

.clear-search-btn:hover { color: #0f172a; }

#stock-search-input {
  width: 100%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #0f172a;
  padding: 0.9rem 3rem 0.9rem 3rem;
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

#stock-search-input::placeholder {
  color: #94a3b8;
}

#stock-search-input:focus {
  border-color: var(--booklet-accent);
  box-shadow: 0 0 0 4px rgba(255, 85, 31, 0.15);
}

/* Booklet Main Grid (Dark Catalog Showcase) */
.booklet-main {
  flex: 1;
  background-color: #0f172a;
  padding: 2.5rem 0 3.5rem 0;
}

.booklet-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--booklet-border);
}

.booklet-edition-info {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-counter {
  color: var(--booklet-muted);
  font-size: 0.9rem;
}

/* Booklet Masonry-Style Fluid Grid (AutoZone Booklet feel) */
.booklet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  align-items: start;
}

/* Product Card - Magazine / Booklet Spec */
.booklet-card {
  background-color: var(--booklet-card-bg);
  border: 1px solid var(--booklet-border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--booklet-shadow);
}

.booklet-card:hover {
  transform: translateY(-4px);
  border-color: var(--booklet-accent);
  box-shadow: 0 14px 30px -5px rgba(255, 85, 31, 0.2), 0 10px 15px -5px rgba(0, 0, 0, 0.5);
}

/* Offer Ribbon Sticker */
.card-offer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.card-save-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--booklet-yellow);
  color: #0f172a;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

/* Image Container */
.card-image-area {
  position: relative;
  width: 100%;
  height: 240px;
  background-color: #0b1120;
  overflow: hidden;
  cursor: pointer;
}

.main-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.booklet-card:hover .main-product-img {
  transform: scale(1.04);
}

/* Photo Gallery Thumbnails Bar */
.card-thumbs-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.thumb-item {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  border: 2px solid transparent;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.thumb-item.active, .thumb-item:hover {
  opacity: 1;
  border-color: var(--booklet-accent);
}

/* Card Body */
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.product-description {
  color: var(--booklet-muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
  flex: 1;
  white-space: pre-line;
}

/* Pricing Tag (AutoZone Booklet style) */
.card-price-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px dashed var(--booklet-border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.price-labels {
  display: flex;
  flex-direction: column;
}

.normal-price-strike {
  text-decoration: line-through;
  color: var(--booklet-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.offer-price-highlight {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--booklet-yellow);
  line-height: 1;
}

.offer-price-currency {
  font-size: 1.1rem;
  font-weight: 700;
}

.buy-wa-btn {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.buy-wa-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.5);
}

/* Default Empty State Banner (Costco/AutoZone Promo Card) */
.booklet-empty-banner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 2px dashed rgba(255, 85, 31, 0.4);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--booklet-shadow);
}

.empty-mascot-img {
  width: 140px;
  height: auto;
  margin-bottom: 0.5rem;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
}

.empty-message {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--booklet-yellow);
  max-width: 650px;
  line-height: 1.5;
  background: rgba(245, 158, 11, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.empty-subtext {
  color: var(--booklet-muted);
  max-width: 550px;
  font-size: 0.95rem;
}

.empty-cta-btn {
  background: var(--booklet-accent);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(255, 85, 31, 0.4);
}

.empty-cta-btn:hover {
  background: var(--booklet-accent-hover);
  transform: translateY(-2px);
}

/* Loading & Lightbox */
.booklet-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--booklet-accent);
  font-size: 2.5rem;
}

.booklet-loading p {
  font-size: 1rem;
  color: var(--booklet-muted);
  margin-top: 1rem;
  font-family: var(--font-body);
}

/* Lightbox Modal */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ffffff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-caption {
  margin-top: 1rem;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Footer (White & Light Theme for Mascot prominence) */
.booklet-footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2.5rem 1.25rem;
}

.footer-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: #64748b;
  font-size: 0.85rem;
}

.footer-legal-badge {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #ff551f;
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #334155;
  margin-top: 0.85rem;
  display: inline-block;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.footer-legal-badge strong {
  color: #0f172a;
}

.footer-mascot-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-mascot-img {
  height: 125px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(255, 85, 31, 0.18));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-mascot-img:hover {
  transform: translateY(-6px) scale(1.08);
}

.footer-info p {
  color: #1e293b;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 1.1rem 0;
}

.copyright-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.back-home-link {
  color: #ff551f;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.back-home-link:hover {
  text-decoration: underline;
}

/* Responsive queries */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  .header-badges {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
  }
  .stock-badge-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
  .header-wa-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
  }
  .booklet-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}
