/**
 * Feed page styles — Simpsons Pop Art comic design.
 * Thick black borders, yellow accents, halftone dots, comic bursts.
 */

/* ─── Pop Art Background ─── */
.feed-page-wrap {
  background: #FFF8DC;
  min-height: 100vh;
  position: relative;
}

/* Halftone dot overlay */
.feed-page-wrap::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* ─── Shipping Banner ─── */
.shipping-banner {
  background: #111;
  color: #FFD90F;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 3px solid #FFD90F;
  position: relative;
  z-index: 2;
}
.shipping-banner svg { opacity: 0.9; stroke: #FFD90F; }

/* ─── Feed Header ─── */
.feed-header-comic {
  text-align: center;
  padding: 28px 16px 8px;
  position: relative;
  z-index: 1;
}
.feed-header-comic h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-shadow: 3px 3px 0 #FFD90F;
  margin: 0;
}
.feed-header-comic p {
  font-size: 0.85rem;
  color: #555;
  font-weight: 600;
  margin-top: 6px;
}

/* ─── Category Filter Bar ─── */
.feed-filters {
  background: transparent;
  border-bottom: none;
  padding: 14px 16px 0;
  position: sticky;
  top: 0;
  z-index: 5;
}
.filter-row-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #555;
  margin-bottom: 6px;
  padding-left: 4px;
}
.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 6px;
  border: 2.5px solid #111;
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.filter-pill:hover {
  background: #FFF3B0;
  transform: translateY(-1px);
}
.filter-pill.active {
  background: #FFD90F;
  color: #111;
  border-color: #111;
  box-shadow: 3px 3px 0 #111;
}

/* ─── Shopping Mode Pills ─── */
.mode-filters {
  padding: 8px 16px 14px;
  position: sticky;
  top: 52px;
  z-index: 4;
}
.mode-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mode-scroll::-webkit-scrollbar { display: none; }

.mode-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  border: 2px solid #111;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #111;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.mode-pill:hover {
  background: #FFF3B0;
}
.mode-pill.active {
  background: #111;
  color: #FFD90F;
  border-color: #111;
}

/* ─── Feed Grid ─── */
.feed-main {
  padding: 16px 16px 100px;
  position: relative;
  z-index: 1;
}
.feed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 520px) {
  .feed-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .feed-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

/* ─── Product Card — Comic Pop Art ─── */
.product-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid #111;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  box-shadow: 4px 4px 0 #111;
}
.product-card:hover {
  transform: rotate(-1deg) scale(1.02);
  box-shadow: 6px 6px 0 #111;
}

/* Card image area */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid #111;
}
.card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #F5F5DC;
}

/* Discount badge — comic starburst */
.card-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #DC2626;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 10px;
  border: 2px solid #111;
  border-radius: 4px;
  transform: rotate(-3deg);
  z-index: 2;
  letter-spacing: 0.02em;
}
.card-discount::before {
  content: '%';
}

/* Trending badge — starburst shape via clip-path */
.card-trending-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #FFD90F;
  color: #111;
  font-size: 10px;
  font-weight: 900;
  padding: 6px 10px;
  border: 2px solid #111;
  border-radius: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-trending-badge svg {
  width: 12px;
  height: 12px;
}

/* Save button — comic heart */
.card-save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fff;
  border: 2.5px solid #111;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.15s, background 0.15s;
}
.card-save-btn:hover {
  transform: scale(1.12);
  background: #FFF3B0;
}
.card-save-btn svg { width: 18px; height: 18px; }
.card-save-btn.saved {
  background: #FEE2E2;
  border-color: #DC2626;
}
.card-save-btn.saved svg {
  fill: #DC2626;
  stroke: #DC2626;
}

/* Card body */
.card-body {
  padding: 14px;
  background: #fff;
}

/* Category pill */
.card-cat {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
  font-weight: 700;
  margin-bottom: 6px;
  background: #FFF3B0;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1.5px solid #111;
}

/* Product name */
.card-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #111;
  line-height: 1.3;
  text-decoration: none;
  margin-bottom: 8px;
}
.card-name:hover { color: #333; }

/* Price row */
.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
}
.card-price {
  font-size: 20px;
  font-weight: 900;
  color: #B8860B;
  letter-spacing: -0.01em;
}
.card-compare {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
  font-weight: 500;
}

/* Add to Cart button — yellow comic style */
.card-actions {
  display: flex;
  gap: 6px;
}
.card-add-btn {
  flex: 1;
  padding: 10px;
  background: #FFD90F;
  color: #111;
  border: 2.5px solid #111;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-add-btn:hover {
  background: #FFC700;
  box-shadow: 2px 2px 0 #111;
  transform: translateY(-1px);
}
.card-add-btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.card-add-btn:disabled {
  background: #E5E5E5;
  color: #999;
  cursor: not-allowed;
  border-color: #999;
  box-shadow: none;
  transform: none;
}
.card-add-btn.added {
  background: #16a34a;
  color: #fff;
  border-color: #111;
}

/* ─── Card entry animation ─── */
@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.product-card {
  animation: cardSlideIn 0.35s ease-out both;
}
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }

/* ─── Cart pop animation ─── */
@keyframes cartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.nav-cart-badge.pop {
  animation: cartPop 0.3s ease;
}

/* ─── Feed States ─── */
.feed-state {
  text-align: center;
  padding: 32px;
  position: relative;
  z-index: 1;
}
.feed-loading {
  color: #555;
  font-size: 14px;
  font-weight: 700;
}
.feed-end {
  color: #555;
  font-size: 14px;
  font-weight: 700;
  padding: 24px;
  background: #fff;
  border: 3px solid #111;
  border-radius: 8px;
  display: inline-block;
  box-shadow: 3px 3px 0 #111;
}
.feed-empty {
  text-align: center;
  padding: 60px 0;
  color: #555;
  font-weight: 700;
}

/* ─── Feed Nav overrides ─── */
body .feed-nav {
  background: #FFD90F;
  border-bottom: 3px solid #111;
}
body .feed-nav .feed-logo {
  font-weight: 900;
  color: #111;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}
body .feed-nav .nav-link {
  color: #111;
  font-weight: 700;
}
body .feed-nav .nav-icon-btn {
  color: #111;
}
body .feed-nav .nav-icon-btn:hover {
  background: rgba(0,0,0,0.1);
}
body .feed-nav .account-trigger {
  border-color: #111;
  background: #fff;
}
body .feed-nav .account-avatar {
  background: #111;
}
body .feed-nav .nav-cart-badge {
  background: #DC2626;
  color: #fff;
}

/* ─── Mobile Bottom Nav pop art ─── */
body .mobile-bottom-nav {
  background: #FFD90F;
  border-top: 3px solid #111;
}
body .mobile-nav-item {
  color: #111;
}
body .mobile-nav-item.active {
  color: #111;
  font-weight: 800;
}
body .mobile-cart-badge {
  background: #DC2626;
  color: #fff;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .feed-header-comic h1 {
    font-size: 1.5rem;
    text-shadow: 2px 2px 0 #FFD90F;
  }
  .feed-main {
    padding: 12px 12px 100px;
  }
  .feed-grid {
    gap: 14px;
  }
  .product-card {
    box-shadow: 3px 3px 0 #111;
  }
  .card-body {
    padding: 10px;
  }
  .card-price {
    font-size: 17px;
  }
  .card-add-btn {
    font-size: 12px;
    padding: 12px 8px;
    min-height: 44px;
  }
  .filter-pill {
    padding: 6px 12px;
    font-size: 12px;
  }
  .mode-pill {
    padding: 5px 10px;
    font-size: 10px;
  }
}
