/* ============================================================
   assets/css/store.css — Public Store Storefront Styles
   (Works with CSS variables injected per-store via PHP)
   ============================================================ */

/* ── Store Navbar ─────────────────────────────────────────── */
.store-nav {
  background: var(--store-primary, #2d6a4f);
  padding: .6rem 0;
  transition: box-shadow .3s ease;
}
.store-nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.2); }

.store-nav-brand { text-decoration: none; }
.store-nav-logo {
  width: 38px; height: 38px;
  border-radius: .5rem;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.25);
}
.store-nav-logo-placeholder {
  width: 38px; height: 38px;
  border-radius: .5rem;
  background: rgba(255,255,255,.2);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .95rem;
  flex-shrink: 0;
}
.store-nav-name {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: var(--store-font, 'Inter', sans-serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-nav-brand { min-width: 0; flex-shrink: 1; }
.store-nav-badge {
  color: rgba(255,255,255,.75);
  font-size: .75rem;
  font-weight: 500;
  display: flex; align-items: center; gap: .35rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: .75rem;
}

/* ── Store Hero (when no banner) ──────────────────────────── */
.store-hero {
  background: linear-gradient(135deg, var(--store-primary, #2d6a4f) 0%, var(--store-accent, #52b788) 100%);
}
.store-hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.6rem;
}

.store-hero-title {
  font-family: var(--store-font, 'Playfair Display', serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  /* color: #fff; */
  margin-bottom: .5rem;
}

.store-hero-tag {
  color: rgba(0, 0, 0, 0.8);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Store Banner ─────────────────────────────────────────── */
.store-banner-wrap {
  position: relative;
  height: 300px;
  overflow: hidden;
}
.store-banner-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.store-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.75) 0%, rgba(0,0,0,.55) 100%);
  display: flex; align-items: center;
  padding: 1.5rem 0;
}
@media (max-width: 575px) {
  .store-banner-wrap { height: 150px; }
}

/* ── Store About ──────────────────────────────────────────── */
.store-about { background: #fff; }
.store-about-text {
  color: #4b5563;
  font-size: .95rem;
  line-height: 1.75;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

/* ── Category Filter Buttons ──────────────────────────────── */
.store-cat-btn {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  border: 1.5px solid #e5e7eb;
  border-radius: 2rem;
  font-size: .82rem;
  font-weight: 500;
  padding: .35rem .9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
}
.store-cat-btn:hover {
  background: var(--store-primary, #2d6a4f);
  color: #fff;
  border-color: var(--store-primary, #2d6a4f);
}
.store-cat-active {
  background: var(--store-primary, #2d6a4f) !important;
  color: #fff !important;
  border-color: var(--store-primary, #2d6a4f) !important;
}

/* ── Product Cards ────────────────────────────────────────── */
.product-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s ease;
}
.product-card:hover {
  transform: translateY(-8px);
}

.product-cover-wrap {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: #f0f7f2;
}
.product-cover-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-cover-img { transform: scale(1.05); }

.product-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  color: #b7e4c7;
  background: linear-gradient(135deg, #f0faf4, #d8f3dc);
}

.product-cover-placeholder-lg {
  height: 360px;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  color: #b7e4c7;
  background: linear-gradient(135deg, #f0faf4, #d8f3dc);
}

.product-badge {
  position: absolute;
  top: .75rem; left: .75rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .65rem;
  border-radius: 2rem;
}

.presale-badge {
  left: auto;
  right: .75rem;
  background: #f59e0b;
  color: #fff;
}

.presale-note {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .8rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: .6rem;
  padding: .6rem .85rem;
}

.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
  backdrop-filter: blur(2px);
}
.product-card:hover .product-overlay { opacity: 1; }

.product-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--store-accent, #52b788);
  display: block;
  margin-bottom: .35rem;
}
.product-title {
  font-family: var(--store-font, 'Playfair Display', serif);
  font-size: .98rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin-bottom: .3rem;
}
.product-author {
  color: #6b7280;
  font-size: .8rem;
  margin-bottom: .4rem;
}
.product-desc {
  color: #6b7280;
  font-size: .82rem;
  line-height: 1.55;
  flex: 1;
  margin-bottom: .75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f3f4f6;
  padding-top: .75rem;
  margin-top: auto;
}
.store-price {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--store-font, 'Playfair Display', serif);
}

/* ── Product Detail Page ──────────────────────────────────── */
.product-detail-title {
  font-family: var(--store-font, 'Playfair Display', serif);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: #111827;
  line-height: 1.2;
}
.badge-cat {
  background: #f0faf4;
  color: var(--store-primary, #2d6a4f);
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .3rem .8rem;
  border-radius: 2rem;
  display: inline-block;
}
.trust-row {
  display: flex; align-items: center;
  font-size: .85rem; color: #6b7280;
  padding: .3rem 0;
  border-bottom: 1px dashed #f3f4f6;
}
.trust-row:last-child { border-bottom: none; }
.product-full-desc { margin-top: 1.5rem; }
.product-full-desc h5 {
  font-family: var(--store-font, 'Playfair Display', serif);
  color: #1a3a2a;
  margin-bottom: .75rem;
}
.desc-body { color: #374151; font-size: .95rem; line-height: 1.8; }
.desc-body p { margin-bottom: .9rem; }
.desc-body ul { padding-left: 1.4rem; margin-bottom: .9rem; }
.desc-body li { margin-bottom: .35rem; }
.desc-body img { max-width: 100%; height: auto; border-radius: 6px; margin: .5rem 0; display: block; }

/* ── Checkout page ────────────────────────────────────────── */
.checkout-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 1rem;
}

/* ── Thank You / Success animation ───────────────────────── */
.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-miterlimit: 10;
  animation: stroke .6s cubic-bezier(.65,0,.45,1) forwards;
}
.checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke .3s cubic-bezier(.65,0,.45,1) .6s forwards;
}
@keyframes stroke { 100% { stroke-dashoffset: 0; } }

/* ── Store Footer ─────────────────────────────────────────── */
.store-footer {
  background: #1a3a2a;
  border-top: 1px solid rgba(255,255,255,.08);
}
.store-footer-text {
  color: rgba(255,255,255,.5);
  font-size: .82rem;
}
.store-footer-powered {
  color: rgba(255,255,255,.3);
  font-size: .75rem;
  margin: 0;
}
.store-footer-powered a {
  color: rgba(255,255,255,.45);
  text-decoration: none;
}
.store-footer-powered a:hover { color: #fff; }

/* ── Store 404 ────────────────────────────────────────────── */
.store-404 { min-height: 60vh; display: flex; align-items: center; justify-content: center; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 767px) {
  .product-cover-wrap { height: 180px; }
  .store-banner-wrap  { height: 140px; }
  .product-detail-title { font-size: 1.6rem; }
}
@media (max-width: 575px) {
  .product-cover-placeholder-lg { height: 220px; font-size: 3rem; }
}
