/* =============================================
   BUT DOES IT HAVE POCKETS? — Storefront Styles
   ============================================= */

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

:root {
  --pink:        #E8567A;
  --pink-light:  #FDE8EF;
  --pink-dark:   #C03560;
  --teal:        #2ABFA3;
  --teal-light:  #E0F7F3;
  --amber:       #F5A623;
  --amber-light: #FEF3DC;
  --green:       #3DAA6E;
  --green-light: #E4F5EC;
  --gray-50:     #FAFAF9;
  --gray-100:    #F3F1EE;
  --gray-200:    #E5E2DC;
  --gray-400:    #9E9A93;
  --gray-600:    #5C5852;
  --gray-900:    #1A1916;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-hover:0 8px 28px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
}

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
}

/* --- HEADER --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Admin dropdown */
.admin-dropdown {
  position: relative;
}

.admin-toggle {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1;
}
.admin-toggle:hover { border-color: var(--pink); background: var(--pink-light); }
.admin-toggle[aria-expanded="true"] { border-color: var(--pink); background: var(--pink-light); }

.admin-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  padding: 1rem;
  z-index: 200;
}
.admin-panel.open { display: block; }

.admin-panel-title {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
}

.admin-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #DC2626;
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}

.admin-password-input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  outline: none;
  transition: border-color 0.15s;
}
.admin-password-input:focus { border-color: var(--pink); }

.admin-signin-btn {
  width: 100%;
  padding: 0.5rem;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.admin-signin-btn:hover { background: var(--pink-dark); }
.admin-signin-btn:disabled { opacity: 0.6; cursor: default; }

.admin-panel-link {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: var(--gray-900);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.15s;
}
.admin-panel-link:hover { color: var(--pink); }
.admin-panel-link--muted { color: var(--gray-400); font-size: 0.8rem; margin-top: 0.25rem; }
.admin-panel-link--muted:hover { color: var(--gray-600); }

.site-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-main {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--pink);
  letter-spacing: -0.02em;
}

.logo-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-400);
  font-weight: 300;
  margin-top: 2px;
}

.header-stats {
  font-size: 0.85rem;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.stat-divider { opacity: 0.4; }

/* --- FILTERS BAR --- */
.filters-bar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 65px;
  z-index: 90;
}

.filters-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* Depth buttons */
.depth-buttons { display: flex; gap: 4px; }

.depth-btn {
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--gray-200);
  background: white;
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  color: var(--gray-600);
}

.depth-btn:hover { border-color: var(--pink); color: var(--pink); }
.depth-btn.active { background: var(--pink); border-color: var(--pink); color: white; font-weight: 500; }

/* Price range */
.price-range { display: flex; align-items: center; gap: 8px; }

#price-slider {
  width: 100px;
  accent-color: var(--pink);
  cursor: pointer;
}

#price-label {
  font-size: 0.82rem;
  color: var(--gray-600);
  min-width: 70px;
}

/* Selects */
select {
  padding: 5px 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--font-body);
  color: var(--gray-600);
  background: white;
  cursor: pointer;
  outline: none;
}

select:focus { border-color: var(--pink); }

/* --- MAIN CONTENT --- */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
}

/* --- PRODUCT GRID --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* --- PRODUCT CARD --- */
.product-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

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

.card-image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--gray-100);
  display: block;
}

.card-image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Pocket depth badge */
.depth-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

.depth-1 { background: var(--amber-light);  color: #7A5000; }
.depth-2 { background: var(--pink-light);   color: var(--pink-dark); }
.depth-3 { background: var(--green-light);  color: #1E6640; }
.depth-unknown { background: var(--gray-100); color: var(--gray-400); }

/* Confidence badge */
.confidence-badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--teal-light);
  color: #0A6B5A;
  white-space: nowrap;
}

/* Retailer badge */
.retailer-badge {
  font-size: 0.70rem;
  padding: 3px 8px;
  border-radius: 99px;
  background: var(--gray-100);
  color: var(--gray-600);
}

.card-title {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--gray-900);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gray-900);
}

.card-pocket-note {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-style: italic;
}

.card-cta {
  display: block;
  margin-top: auto;
  padding: 8px 14px;
  background: var(--pink);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s;
}

.card-cta:hover { background: var(--pink-dark); }

/* --- EMPTY / LOADING STATES --- */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--gray-400);
}

.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { font-family: var(--font-display); color: var(--gray-600); margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }
.empty-state a { color: var(--pink); }

.loading-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--gray-400);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- FOOTER --- */
.site-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  color: var(--gray-400);
  font-size: 0.82rem;
  line-height: 1.7;
  border-top: 1px solid var(--gray-200);
  margin-top: 3rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .header-inner { padding: 0.75rem 1rem; }
  .filters-inner { padding: 0.75rem 1rem; gap: 1rem; }
  .main-content { padding: 1rem; }
  .logo-main { font-size: 1.1rem; }
  .header-stats { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
}
