/* ====================================================== */
/* MASTER PROMPTS — 100% FULLY RESPONSIVE DESIGN SYSTEM   */
/* ====================================================== */

:root {
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border2: #cbd5e1;
  --text: #0f172a;
  --text2: #334155;
  --text3: #64748b;
  --text4: #94a3b8;
  --primary: #0f172a;
  --primary-hover: #1e293b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.07);
}

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

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Merriweather', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  font-size: 14px;
}

/* ====================================================== */
/* TOP NAVBAR                                             */
/* ====================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  width: 100%;
}

.site-nav-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text);
  flex-shrink: 0;
}

.brand-avatar-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  border: 1px solid #fde68a;
  flex-shrink: 0;
}

.nav-auth-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.top-nav-signup-btn {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #0f172a;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform .15s, background .15s;
}

.top-nav-signup-btn:hover {
  background: #1e293b;
}

/* WhatsApp Nav Button */
.nav-whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all .15s ease;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
  white-space: nowrap;
}

.nav-whatsapp-btn:hover {
  background: #1eb856;
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all .15s ease;
  width: 100%;
  box-sizing: border-box;
}

.btn-whatsapp-cta:hover {
  background: #1eb856;
  color: #ffffff;
}

/* User Profile Nav Chip */
.user-nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 4px 10px 4px 5px;
  border-radius: 50px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-nav-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.user-nav-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout-small {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-logout-small:hover {
  color: var(--danger);
}

/* ====================================================== */
/* CONTAINERS                                             */
/* ====================================================== */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

.container-sm {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* ====================================================== */
/* HEADER                                                 */
/* ====================================================== */
.store-header {
  padding-top: 24px;
  padding-bottom: 16px;
  text-align: center;
}

.store-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.store-subtitle {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  color: var(--text3);
  line-height: 1.4;
}

/* ====================================================== */
/* SEARCH & CATEGORY PILLS                                */
/* ====================================================== */
.search-input-box {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text4);
  font-size: 15px;
  pointer-events: none;
}

.search-input-box input {
  width: 100%;
  padding: 12px 40px 12px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  /* 16px prevents iOS Safari auto-zoom */
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color .2s;
  -webkit-appearance: none;
}

.search-input-box input:focus {
  border-color: #94a3b8;
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text4);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.category-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Hide scrollbar on Firefox */
  padding-bottom: 4px;
  margin-bottom: 18px;
}

.category-scroll-wrapper::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar on Chrome/Safari */
}

.category-scroll {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  padding: 2px 0;
}

.cat-pill {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all .15s ease;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.cat-pill:hover,
.cat-pill:active {
  background: #f1f5f9;
}

.cat-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ====================================================== */
/* PRODUCTS LIST & ROW CARDS                              */
/* ====================================================== */
.products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.product-row-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.product-row-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-thumb {
  width: 130px;
  height: 95px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-info {
  flex: 1;
  min-width: 0;
  /* Prevents text overflow in flexbox */
}

.product-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.35;
  word-break: break-word;
}

.product-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .84rem;
  color: var(--text3);
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.4;
}

.badge-paid {
  background: #fef3c7;
  color: #b45309;
}

.badge-free {
  background: #d1fae5;
  color: #065f46;
}

.badge-cat {
  background: #f1f5f9;
  color: #475569;
}

.product-action {
  flex-shrink: 0;
}

.btn-access {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: .84rem;
  font-weight: 700;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #1e293b;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  transition: all .15s;
  white-space: nowrap;
}

.btn-access:hover {
  background: #1e293b;
}

/* ====================================================== */
/* DETAIL VIEW (Full Responsive)                          */
/* ====================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  color: var(--text3);
  margin-bottom: 16px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  cursor: pointer;
}

.back-link:hover {
  color: var(--text);
}

.detail-cover-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 18px;
  max-height: 320px;
  object-fit: cover;
  display: block;
}

.detail-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: 800;
  margin-bottom: 10px;
  color: #0f172a;
  line-height: 1.3;
  word-break: break-word;
}

.product-platforms-detail {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: .78rem;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Master Prompt Content Card */
.prompt-box-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.prompt-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.prompt-box-label {
  font-size: .9rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.prompt-box-arrow {
  color: #f59e0b;
  font-weight: 900;
  font-family: monospace;
  font-size: 1.05rem;
}

.btn-copy-prompt {
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
  font-size: .82rem;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-copy-prompt:hover {
  background: #1e293b;
}

.prompt-code-body {
  background: #0f172a;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  line-height: 1.6;
  padding: 14px;
  border-radius: 6px;
  max-height: 480px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}

/* ====================================================== */
/* GOOGLE LOGIN GATE CARD                                 */
/* ====================================================== */
.login-gate-box {
  background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  padding: 24px 16px;
  text-align: center;
}

.login-gate-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fef3c7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #d97706;
  margin-bottom: 10px;
}

.login-gate-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  font-family: 'Merriweather', serif;
}

.login-gate-box p {
  font-size: .84rem;
  color: #64748b;
  max-width: 400px;
  line-height: 1.45;
  margin: 0 auto 14px;
}

.btn-google-cta {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 700;
  font-size: .84rem;
  padding: 9px 18px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all .15s;
}

/* ====================================================== */
/* PAGINATION                                             */
/* ====================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 18px 0 50px;
  flex-wrap: wrap;
}

.page-nav-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--shadow);
}

.page-nav-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-numbers-wrap {
  display: flex;
  gap: 4px;
}

.page-item-btn {
  width: 34px;
  height: 34px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}

.page-item-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* ====================================================== */
/* TOAST & FOOTER                                         */
/* ====================================================== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  max-width: 420px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid var(--border);
}

.close-modal-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text4);
  cursor: pointer;
  line-height: 1;
}

.close-modal-btn:hover {
  color: var(--text);
}

.auth-modal-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fef2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.auth-modal-title {
  font-family: 'Merriweather', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.auth-modal-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  color: var(--text3);
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: var(--text4);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 10px;
}

.toast-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  max-width: 90vw;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .84rem;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border: 1px solid #334155;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.footer {
  margin-top: auto;
  padding: 20px 16px;
  text-align: center;
  font-size: .78rem;
  color: var(--text4);
  border-top: 1px solid var(--border);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.hidden {
  display: none !important;
}

/* ====================================================== */
/* 📱 ULTRA MOBILE OPTIMIZATIONS (<= 640px)               */
/* ====================================================== */
@media (max-width: 640px) {
  .site-nav-container {
    padding: 0 12px;
  }

  .site-nav-brand span {
    font-size: .92rem;
  }

  .brand-avatar-box {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .top-nav-signup-btn {
    padding: 6px 10px;
    font-size: 12px;
    gap: 4px;
  }

  .nav-whatsapp-btn {
    padding: 6px 8px;
    font-size: 13px;
  }
  .nav-whatsapp-btn span {
    display: none;
  }

  .container,
  .container-sm {
    padding: 0 12px;
  }

  .store-header {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .search-input-box {
    margin-bottom: 10px;
  }

  .category-scroll-wrapper {
    margin-bottom: 14px;
  }

  .cat-pill {
    padding: 5px 12px;
    font-size: 11.5px;
  }

  /* Product Card Mobile Row */
  .products-list {
    gap: 10px;
  }

  .product-row-card {
    padding: 10px;
    gap: 10px;
    align-items: center;
  }

  .product-thumb {
    width: 80px;
    height: 64px;
    border-radius: 6px;
  }

  .product-title {
    font-size: .88rem;
    margin-bottom: 2px;
    line-height: 1.25;
  }

  .product-desc {
    display: none;
    /* Hide snippet on mobile just like GetMasterPrompts */
  }

  .badge {
    font-size: .68rem;
    padding: 2px 6px;
  }

  .btn-access {
    padding: 6px 10px;
    font-size: .75rem;
    gap: 4px;
  }

  /* Detail View Mobile */
  .detail-cover-img {
    max-height: 200px;
    margin-bottom: 14px;
  }

  .detail-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .product-platforms-detail {
    gap: 6px;
    margin-bottom: 14px;
  }

  .platform-pill {
    padding: 3px 8px;
    font-size: .72rem;
  }

  .prompt-box-card {
    padding: 12px;
  }

  .prompt-box-label {
    font-size: .84rem;
  }

  .btn-copy-prompt {
    padding: 5px 10px;
    font-size: .75rem;
  }

  .prompt-code-body {
    padding: 10px;
    font-size: .78rem;
    max-height: 380px;
  }

  /* Toast Mobile: Center at bottom */
  .toast-notification {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
  }
}

/* ====================================================== */
/* 📱 EXTRA NARROW MOBILE (<= 380px e.g. iPhone SE)       */
/* ====================================================== */
@media (max-width: 380px) {
  .site-nav-brand span {
    font-size: .84rem;
  }

  .top-nav-signup-btn span {
    display: none;
    /* Show only Google icon on ultra-narrow screens */
  }

  .product-thumb {
    width: 68px;
    height: 56px;
  }

  .product-title {
    font-size: .82rem;
  }

  .btn-access span {
    display: none;
    /* Show icon only if screen is tiny */
  }
}