/* =========================================
   Adjoy Multi-Page Architect v3.1
   Stylesheet: Mobile-First Bento Theme
   ========================================= */

:root {
  /* Dynamic Theme Colors mapped from config.js */
  --primary: #002366;
  --secondary: #FFD700;
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  
  /* Bento UI Variables */
  --bento-radius: 24px;
  --bento-shadow: 0 8px 24px rgba(0, 35, 102, 0.08);
  --nav-height: 72px;
  --spacing: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  padding-bottom: calc(var(--nav-height) + var(--spacing)); /* Space for Thumb-Zone Nav */
  -webkit-font-smoothing: antialiased;
}

/* Typography & Headers */
header {
  padding: var(--spacing) 24px;
  text-align: center;
}

h1, h2, h3 {
  color: var(--primary);
  margin-bottom: 8px;
}

/* Bento Grid Layout (Mobile First) */
.bento-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing);
  padding: 0 var(--spacing);
  max-width: 1200px;
  margin: 0 auto;
}

.bento-box {
  background-color: var(--surface);
  border-radius: var(--bento-radius);
  padding: 24px;
  box-shadow: var(--bento-shadow);
  overflow: hidden;
  position: relative;
}

/* Search Bar */
.search-bar {
  width: 100%;
  padding: 16px 24px;
  border: 2px solid transparent;
  border-radius: 50px;
  background-color: var(--surface);
  box-shadow: var(--bento-shadow);
  font-size: 16px;
  outline: none;
  transition: border 0.3s ease;
}
.search-bar:focus {
  border-color: var(--secondary);
}

/* Product Cards */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
}
.product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Buttons */
.btn {
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  flex: 1;
  transition: transform 0.1s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background-color: var(--primary); color: var(--surface); }
.btn-secondary { background-color: var(--secondary); color: var(--primary); }

/* Lite-Load YouTube Embed */
.yt-lite {
  background-color: #000;
  position: relative;
  display: block;
  contain: content;
  background-position: center center;
  background-size: cover;
  cursor: pointer;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  margin-bottom: 12px;
}
.yt-lite::before {
  content: '▶';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 40px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
}

/* Thumb-Zone Navigation (Bottom Fixed) */
.thumb-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 400px;
  height: var(--nav-height);
  background-color: var(--primary);
  border-radius: 50px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 12px 32px rgba(0, 35, 102, 0.4);
  z-index: 1000;
}
.thumb-nav a {
  color: var(--surface);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.thumb-nav a.active, .thumb-nav a:hover {
  opacity: 1;
  color: var(--secondary);
}

/* Tablet & Desktop Adjustments */
@media (min-width: 768px) {
  .bento-container { grid-template-columns: repeat(2, 1fr); }
  .thumb-nav { max-width: 600px; }
}



/* =========================================
   Checkout Modal (Bottom Sheet for Thumb-Zone)
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 35, 102, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: flex-end; /* Aligns modal to the bottom */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--surface);
  width: 100%;
  max-width: 600px;
  border-radius: var(--bento-radius) var(--bento-radius) 0 0;
  padding: 32px 24px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.bank-toggle-container {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.bank-btn {
  white-space: nowrap;
  background: var(--bg);
  color: var(--text);
  border: 2px solid transparent;
}

.bank-btn.active {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

.bank-details-box {
  background: var(--bg);
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px dashed var(--primary);
}