/* =============================================================================
   Del Plaza — storefront
   Seller Storefront page — business identity, open/closed status, product grid
   DESIGN_BIBLE-aligned palette, Univers typography, civic grid discipline.
   ============================================================================= */

/* =============================================================================
   Storefront Page — /storefront.php
   DESIGN_BIBLE §3 (Civic Grid Systems), §7 (Color Architecture),
   §8 (Button Geometry), §11 (Wayfinding), §2 (Provenance Mandate)
   ============================================================================= */
.storefront-page {
  padding-top: 2.25rem; /* 36px — overrides .main-content top padding */
}

/* ---- Breadcrumb ---- */
.storefront-breadcrumb {
  padding: var(--spacing-xs) 0 var(--spacing-xxs);
}

.storefront-breadcrumb .breadcrumb {
  margin-bottom: 0;
}

.storefront-breadcrumb .breadcrumb-item {
  font-family: var(--font-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: normal;
}

.storefront-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: var(--cognac);
  content: "\203A";
}

.storefront-breadcrumb .breadcrumb-item a {
  color: var(--color-content-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.storefront-breadcrumb .breadcrumb-item a:hover {
  color: var(--cognac);
}

.storefront-breadcrumb .breadcrumb-item.active {
  color: var(--color-content-heading);
  font-weight: 600;
}

/* =============================================================================
   Seller Identity Avenue — Full seller branding section
   DESIGN_BIBLE §3 (Avenues), §7 (Palette)
   ============================================================================= */
.seller-identity {
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border-primary);
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease-out);
}

.seller-identity:hover {
  box-shadow: var(--shadow-light);
}

/* ---- Primary Row: Logo, Name & Status ---- */
.seller-identity__primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xxs);
  padding: var(--spacing-sm) var(--spacing-xs);
  background-color: var(--color-surface-header-tint);
  border-bottom: 1px solid var(--color-border-primary);
}

.seller-identity__brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-xxs);
}

.seller-identity__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid var(--color-border-primary);
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.seller-identity__avatar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-light);
}

.seller-identity__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seller-identity__titles {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-quark);
}

.seller-identity__name {
  font-family: 'Univers Condensed', var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  color: var(--color-content-heading);
  margin-bottom: 0;
  line-height: 1.1;
}

.seller-identity__market-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-nano);
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 500;
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--color-content-muted);
  letter-spacing: normal;
}

.seller-identity__flag {
  display: block;
  width: auto;
  height: 14px;
  flex-shrink: 0;
  border-radius: 1px;
}

/* ---- Status Column ---- */
.seller-identity__status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--spacing-nano);
}

.seller-identity__since {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.75rem;
  color: var(--color-content-muted);
  white-space: nowrap;
}

/* =============================================================================
   Store Status Indicator — Open / Closed
   Open: Imperial Plum dot with matching label
   Closed: Muted dot with muted label
   ============================================================================= */
.store-status {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-nano);
  padding: var(--spacing-quark) var(--spacing-nano);
  border-radius: 0 0 3px 3px;
  transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.store-status--open {
  background-color: var(--imperial-plum);
  border: 1px solid var(--cognac);
}

.store-status--closed {
  background-color: rgba(148, 150, 147, 0.06);
  border: 1px solid var(--ash-grey);
}

.store-status__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background-color 0.3s var(--ease-out);
}

.store-status--open .store-status__dot {
  background-color: var(--golden-milk);
  box-shadow: 0 0 0 2px rgba(236, 217, 172, 0.3);
}

.store-status--closed .store-status__dot {
  background-color: var(--ash-grey);
  box-shadow: 0 0 0 2px rgba(148, 150, 147, 0.2);
}

.store-status__label {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: normal;
  transition: color 0.2s var(--ease-out);
}

.store-status--open .store-status__label {
  color: #ffffff;
  margin-top: 2px;
  font-family: 'Univers ExtraBlack Extended Oblique', var(--font-primary);
  font-weight: 900;
}

.store-status--closed .store-status__label {
  color: var(--ash-grey);
}

/* ---- Pulse animation for open status (subtle, alive indicator) ---- */
.store-status--open .store-status__dot {
  animation: storeStatusPulse 2s var(--ease-out) infinite;
}

@keyframes storeStatusPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(236, 217, 172, 0.3);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(236, 217, 172, 0.1);
  }
}

/* =============================================================================
   Seller Details Grid — Location, products, provenance, delivery
   ============================================================================= */
.seller-identity__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxs);
  padding: var(--spacing-xs);
  border-bottom: 1px solid var(--color-border-primary);
}

@media (min-width: 660px) {
  .seller-identity__details {
    grid-template-columns: repeat(4, 1fr);
  }
}

.seller-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-nano);
  padding: var(--spacing-nano);
  border-radius: 0 0 3px 3px;
  transition: background-color 0.2s var(--ease-out);
}

.seller-detail:hover {
  background-color: var(--color-surface-header-tint);
}

.seller-detail__icon {
  font-size: 1.25rem;
  color: var(--tawny-umber);
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

.seller-detail__content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-quark);
  min-width: 0;
}

.seller-detail__label {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 500;
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--color-content-muted);
  letter-spacing: normal;
}

.seller-detail__value {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-content-primary);
  line-height: 1.4;
  white-space: nowrap;
}

.seller-detail__value--certified {
  color: var(--deep-navy);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-quark);
}

.seller-detail__value--certified i {
  font-size: 0.75rem;
  color: var(--deep-navy);
}

/* =============================================================================
   Seller Bio — Brand story & provenance badge
   ============================================================================= */
.seller-identity__bio {
  padding: var(--spacing-xs);
  border-bottom: 1px solid var(--color-border-primary);
}

.seller-identity__bio-text {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-content-primary);
  margin-bottom: var(--spacing-xxs);
  max-width: 720px;
}

.seller-identity__bio-text strong {
  font-weight: 600;
  color: var(--color-content-heading);
}

/* ---- Provenance badge inside bio — elevated positioning ---- */
.seller-identity__bio .provenance-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-quark);
  padding: var(--spacing-quark) var(--spacing-nano);
  background-color: var(--cognac);
  color: #ffffff;
  font-size: clamp(0.6875rem, 1vw, 0.8125rem);
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--border-radius-sticker);
  position: relative;
  overflow: hidden;
}

.seller-identity__bio .provenance-badge i {
  font-size: 0.75rem;
}

/* =============================================================================
   Store Hours — Market-dependent schedule
   ============================================================================= */
.seller-identity__hours {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-nano);
  padding: var(--spacing-xs);
  background-color: var(--color-surface-header-tint);
}

.seller-hours__icon {
  font-size: 1.125rem;
  color: var(--tawny-umber);
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

.seller-hours__info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-quark);
}

.seller-hours__label {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 500;
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--color-content-muted);
  letter-spacing: normal;
}

.seller-hours__value {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.8125rem;
  color: var(--color-content-primary);
  line-height: 1.5;
}

.seller-hours__value strong {
  font-weight: 600;
  color: var(--color-content-heading);
}

.seller-hours__active {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--deep-navy);
  letter-spacing: normal;
}

/* =============================================================================
   Products Header — Section title + count
   ============================================================================= */
.storefront-products-header {
  display: flex;
  align-items: baseline;
  gap: var(--spacing-nano);
  margin-bottom: var(--spacing-xs);
  padding-bottom: var(--spacing-xxs);
  border-bottom: 1px solid var(--color-border-primary);
}

.storefront-products-header__title {
  font-family: 'Univers Condensed', var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  color: var(--color-content-heading);
  margin-bottom: 0;
  line-height: 1.15;
}

.storefront-products-header__count {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.875rem;
  color: var(--color-content-muted);
}

/* =============================================================================
   Product Card — Reused from shop.php pattern (DESIGN_BIBLE §10)
   Extended with provenance badge overlay on image
   ============================================================================= */

/* ---- Product Card Wrapper ---- */
.product-card {
  position: relative;
  background-color: var(--color-surface-card);
  border: 1px solid var(--color-border-primary);
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

/* ---- Card Link (full card clickable) ---- */
.product-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__link:hover {
  color: inherit;
  text-decoration: none;
}

/* ---- Image Wrapper ---- */
.product-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: var(--alabaster);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

.product-card:hover .product-card__image {
  transform: scale(1.05);
}

/* ---- Provenance Badge Overlay (on product card image) ---- */
.product-card__provenance {
  position: absolute;
  top: var(--spacing-nano);
  left: var(--spacing-nano);
  z-index: 2;
  font-size: 0.625rem !important;
  padding: 2px 6px !important;
  line-height: 1.3;
  opacity: 0.9;
  transition: opacity 0.2s var(--ease-out);
}

.product-card:hover .product-card__provenance {
  opacity: 1;
}

/* ---- Sale / Exclusive Badges (top right) ---- */
.product-card__badge {
  position: absolute;
  top: var(--spacing-nano);
  right: var(--spacing-nano);
  z-index: 2;
  display: inline-block;
  padding: 2px 8px;
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 700;
  font-size: 0.5625rem;
  text-transform: uppercase;
  border-radius: var(--border-radius-sticker);
  line-height: 1.4;
}

.product-card__badge--sale {
  background-color: var(--cognac);
  color: #ffffff;
}

.product-card__badge--exclusive {
  background-color: var(--imperial-plum);
  color: #ffffff;
}

/* ---- Card Body ---- */
.product-card__body {
  padding: var(--spacing-xxs);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card__name {
  font-family: 'Univers Condensed', var(--font-primary);
  font-weight: 700;
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  color: var(--color-content-heading);
  margin-bottom: var(--spacing-nano);
  line-height: 1.2;
  flex: 1;
}

/* ---- Price ---- */
.product-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--spacing-quark);
}

.product-card__price-currency {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--cognac);
}

.product-card__price-amount {
  font-family: 'Univers Extended', var(--font-primary);
  font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--cognac);
}

.product-card__price-amount--original {
  text-decoration: line-through;
  color: var(--color-content-muted);
  font-size: 0.8125rem;
}

.product-card__price-sale {
  display: inline-flex;
  align-items: baseline;
  gap: var(--spacing-quark);
}

.product-card__price-sale .product-card__price-currency,
.product-card__price-sale .product-card__price-amount {
  color: var(--deep-navy);
}

/* ---- Wishlist Button ---- */
.product-card__wishlist {
  position: absolute;
  top: var(--spacing-nano);
  right: var(--spacing-nano);
  z-index: 6;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--muted-silver);
  color: var(--slate-charcoal);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 0 0 6px 6px;
  transition: all 0.25s var(--ease-out);
  backdrop-filter: blur(4px);
  padding: 0;
}

/* Wishlist heart glyph — slight margin-top for optical centring within the button */
.product-card__wishlist i {
  margin-top: var(--spacing-tiny);
}

.product-card__wishlist:hover {
  background-color: var(--golden-milk);
  color: var(--imperial-plum);
  border-color: var(--imperial-plum);
}

.product-card__wishlist:active {
  transform: translateY(1px);
  background-color: var(--imperial-plum);
  color: var(--golden-milk);
  border-color: var(--golden-milk);
}

.product-card__wishlist.is-wished {
  background-color: var(--imperial-plum);
  color: var(--golden-milk);
  border-color: var(--golden-milk);
}

.product-card__wishlist.is-wished:hover {
  background-color: var(--imperial-plum);
  color: var(--golden-milk);
  border-color: var(--golden-milk);
}

@media (max-width: 575.98px) {
  .product-card__wishlist {
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
  }
}

/* =============================================================================
   delPlaza Guarantee Strip — Seller trust section
   DESIGN_BIBLE §2 (USP), §7 (Palette)
   ============================================================================= */
.storefront-guarantee {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.storefront-guarantee__inner {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xxs);
  padding: var(--spacing-xs);
  background-color: var(--deep-navy);
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  transition: box-shadow 0.3s var(--ease-out);
}

.storefront-guarantee__inner:hover {
  box-shadow: var(--shadow-medium);
}

.storefront-guarantee__icon {
  font-size: 1.75rem;
  color: var(--golden-milk);
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

.storefront-guarantee__content {
  flex: 1;
  min-width: 0;
}

.storefront-guarantee__title {
  font-family: 'Univers Condensed', var(--font-primary);
  font-weight: 700;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  color: var(--golden-milk);
  margin-bottom: var(--spacing-quark);
  line-height: 1.15;
}

.storefront-guarantee__text {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-content-on-dark);
  margin-bottom: 0;
}

.storefront-guarantee__text strong {
  font-weight: 600;
  color: #ffffff;
}

/* =============================================================================
   Concierge Note — mirrors account/auth pattern
   ============================================================================= */
.storefront-concierge {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-xxs);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-xxs) var(--spacing-xs);
  background-color: var(--color-surface-secondary);
  border: 1px solid var(--color-border-primary);
  border-radius: 0 0 9px 9px;
}

.storefront-concierge i {
  font-size: 1.25rem;
  color: var(--cognac);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.storefront-concierge p {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.8125rem;
  color: var(--color-content-primary);
  line-height: 1.6;
  margin-bottom: 0;
}

.storefront-concierge a {
  color: var(--deep-navy);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease-out);
}

.storefront-concierge a:hover {
  color: var(--cognac);
}

/* =============================================================================
   Storefront Page — Responsive
   ============================================================================= */
@media (max-width: 991.98px) {
  .seller-identity__primary {
    padding: var(--spacing-xs);
  }

  .seller-identity__name {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
  }

  .seller-identity__avatar {
    width: 6rem;
    height: 6rem;
  }
}

@media (max-width: 767.98px) {
  .seller-identity__primary {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xxs);
  }

  .seller-identity__status {
    align-items: flex-start;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding-top: var(--spacing-nano);
    border-top: 1px solid var(--color-border-primary);
  }

  .seller-identity__details {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-nano);
    padding: var(--spacing-xxs);
  }

  .seller-detail {
    padding: var(--spacing-quark) var(--spacing-nano);
  }

  .seller-detail__value {
    white-space: normal;
  }

  .seller-identity__bio {
    padding: var(--spacing-xxs);
  }

  .seller-identity__hours {
    padding: var(--spacing-xxs);
  }

  .storefront-guarantee__inner {
    flex-direction: column;
    gap: var(--spacing-xxs);
    padding: var(--spacing-xxs);
  }

  .storefront-concierge {
    padding: var(--spacing-xxs);
  }
}

@media (max-width: 575.98px) {
  .seller-identity__details {
    grid-template-columns: 1fr 1fr;
  }
}

/* =============================================================================
   Grid Gutters — Responsive (from shop.css pattern)
   Needed for product card vertical spacing on storefront
   ============================================================================= */
/* Mobile (< 660px): gap-xxs (16px) */
.mb-xxs {
  margin-bottom: var(--spacing-xxs);
}

/* Tablet (≥ 660px): gap-xs (20px) */
@media (min-width: 660px) {
  .mb-xs--tablet {
    margin-bottom: var(--spacing-xs);
  }
}

/* Desktop (≥ 1024px): gap-sm (24px) */
@media (min-width: 1024px) {
  .mb-sm--desktop {
    margin-bottom: var(--spacing-sm);
  }
}

/* =============================================================================
   Reduced Motion — Accessibility
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  .store-status--open .store-status__dot {
    animation: none;
  }
}
