/* ── Gallery page ─────────────────────────────────────────────────── */

.gallery-page {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

/* Sidebar */
.gallery-sidebar {
  padding-right: 2rem;
}

@media (min-width: 768px) {
  .gallery-sidebar {
    position: sticky;
    top: 1.5rem;
    align-self: flex-start;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
  }
}

.filter-form {
  padding-bottom: 1rem;
}

.filter-section {
  margin-bottom: 1.75rem;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.6rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #444;
  cursor: pointer;
  padding: 0.2rem 0;
}

.filter-option input[type="radio"] {
  accent-color: #111;
}

.filter-option.active {
  color: #111;
  font-weight: 500;
}

.price-input {
  max-width: 120px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.875rem;
}

.clear-filters-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #888;
  text-decoration: underline;
}

.clear-filters-link:hover {
  color: #111;
}

/* Gallery header */
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.gallery-count {
  font-size: 0.8rem;
  color: #999;
  margin: 0;
  letter-spacing: 0.04em;
}

/* Product cards */
.product-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.product-card:hover .product-image-placeholder {
  opacity: 0.88;
}

.product-image-wrap {
  width: 100%;
  /* Preserve native aspect ratio of each artwork rather than forcing 1:1.
     Cards become masonry-ish; a generous max-height keeps grid alignment usable
     while letting portraits/landscapes/cinematic show without crop or stretch.
     Square images are unaffected. */
  max-height: 480px;
  overflow: hidden;
  background: #f5f5f5;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.product-image-placeholder {
  width: 100%;
  /* aspect-ratio kept here so empty cards stay 1:1 even though real artworks
     now display at native ratio. Placeholder only renders when no image. */
  aspect-ratio: 1 / 1;
  max-height: 480px;
  background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #e8e8e8 100%);
  transition: opacity 0.2s ease;
}

.product-info {
  padding: 0 0.1rem;
}

.product-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111;
  margin: 0 0 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 0.8rem;
  color: #777;
  margin: 0;
}

.product-price--soon {
  color: #bbb;
  font-style: italic;
}

/* Inline price + Order CTA row.
   Desktop: price left, Order button right.
   Mobile: wraps to two rows if the card gets too narrow. */
.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

/* Visual CTA — inherits the parent <a class="product-card"> so clicking it
   goes to the product page. Styled as a button: thin black border, white bg,
   black text, smooth invert on hover. */
.btn-order {
  display: inline-block;
  padding: 0.32rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #111;
  background-color: #fff;
  border: 1px solid #111;
  border-radius: 8px;
  text-transform: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.product-card:hover .btn-order,
.btn-order:hover {
  background-color: #111;
  color: #fff;
}

/* ── Product card badges (Phase 4 F) ── */
.product-image-wrap { position: relative; }
.product-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 0.18rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: #fff;
  pointer-events: none;
}
.product-card-badge--popular_this_week { background: rgba(220, 38, 38, 0.92); }
.product-card-badge--trending          { background: rgba(17, 17, 17, 0.92); }

/* ── Phase 6 D — orientation pill (top-right) ── */
.product-card-orientation {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 0.12rem 0.45rem;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
@media (max-width: 575.98px) {
  .product-card-orientation { font-size: 0.58rem; padding: 0.1rem 0.4rem; }
}

/* ── Discovery sections (Featured / Top Viewed / Top Sales / Recently Added) ── */
.discovery-section {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.discovery-section-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #111;
}

/* ── Empty state when filters return zero ── */
.gallery-empty-state {
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  background: #fafafa;
}

/* ── Order tracking timeline ── */
.order-timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.order-timeline-step {
  position: relative;
  padding-left: 32px;
  padding-bottom: 1.25rem;
  min-height: 36px;
}
.order-timeline-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  bottom: -4px;
  width: 2px;
  background: #e3e3e3;
}
.order-timeline-step.is-done:not(:last-child)::before,
.order-timeline-step.is-current:not(:last-child)::before { background: #111; }

.order-timeline-dot {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d0d0d0;
  display: block;
}
.order-timeline-step.is-done .order-timeline-dot   { background: #111; border-color: #111; }
.order-timeline-step.is-current .order-timeline-dot { background: #fff; border-color: #111; box-shadow: 0 0 0 4px rgba(17,17,17,.12); }

.order-timeline-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: #111;
}
.order-timeline-step.is-pending .order-timeline-label { color: #888; font-weight: 400; }
.order-timeline-step.is-current .order-timeline-label { font-weight: 600; }

/* ── Footer nav (trust links) ── */
/* 2026-06-20 — footer sits on a dark (#111) background; links are now white with
   strong contrast and an animated white underline that grows on hover/focus
   (the underline is a 1px gradient sized 0%→100% so the text colour never
   changes). Keyboard focus is covered via :focus-visible for accessibility. */
.site-footer-nav { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; font-size: 0.78rem; }
.site-footer-link {
  color: #ffffff;
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.2s ease;
}
.site-footer-link:hover,
.site-footer-link:focus-visible { color: #ffffff; background-size: 100% 1px; }

/* Contact page details list */
.contact-details dt { font-weight: 600; margin-top: 0.75rem; }
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd { margin: 0 0 0.25rem; }

/* ── Trust / info pages ── */
.info-page { max-width: 760px; }
.info-page-title { font-size: 1.75rem; font-weight: 600; letter-spacing: 0.01em; color: #111; margin-bottom: 0.5rem; }
.info-page-intro { font-size: 1rem; line-height: 1.6; margin-bottom: 1.25rem; }
.info-page-section-heading { font-size: 1.1rem; font-weight: 600; color: #111; margin: 1.25rem 0 0.5rem; letter-spacing: 0.01em; }
.info-page-section-body { font-size: 0.95rem; line-height: 1.65; color: #333; }

/* ── Mobile polish ── */
@media (max-width: 575.98px) {
  /* Cards: tighter spacing on phones, prevent the Order button from cramping */
  .product-info { padding: 0; }
  .product-title { font-size: 0.85rem; }
  .product-price { font-size: 0.78rem; }
  /* Order button: larger tap target on mobile (≥44px height per Apple/Google HIG) */
  .btn-order {
    padding: 0.45rem 1rem;
    font-size: 0.78rem;
    min-height: 36px;
  }
  /* Filter sidebar collapses above the grid on mobile — give the radios more
     vertical room so they're not crammed below the cards. */
  .gallery-sidebar { margin-bottom: 1rem; }
  .filter-option { padding: 0.4rem 0; min-height: 36px; display: flex; align-items: center; }

  /* Discovery section titles smaller on phones */
  .discovery-section-title { font-size: 0.85rem; }
}

/* Pagination */
.gallery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.pagination-link {
  font-size: 0.875rem;
  color: #111;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.pagination-link:hover {
  color: #555;
}

.pagination-info {
  font-size: 0.8rem;
  color: #999;
}

/* ── Phase 5 — homepage hero block ─────────────────────────────── */
.gallery-hero {
  margin: 0 0 1.5rem;
  padding: 0.5rem 0 1rem;
}
.gallery-hero-title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  color: #111;
  margin: 0 0 0.4rem;
}
.gallery-hero-sub {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
  max-width: 600px;
}
@media (max-width: 575.98px) {
  .gallery-hero-title { font-size: 1.25rem; }
  .gallery-hero-sub   { font-size: 0.88rem; }
}

/* ── Phase 5 — trust strip below product grid ──────────────────── */
.gallery-trust-strip {
  margin: 2rem 0 1rem;
  padding: 1rem 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.gallery-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  font-size: 0.85rem;
  color: #333;
}
.gallery-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.gallery-trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
@media (max-width: 575.98px) {
  .gallery-trust-row { gap: 0.75rem; font-size: 0.78rem; }
}

/* ── Mobile filter offcanvas (Hotfix 6) ──────────────────────────────
   Below md (<768px): the .gallery-sidebar <aside> is converted to a Bootstrap
   responsive offcanvas drawer. The "Filters" button in <main> toggles it.
   At md+: same DOM renders as normal sidebar — desktop unchanged. */

.gallery-mobile-filter-trigger {
  margin: 0 0 1rem;
}
.gallery-mobile-filter-trigger .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-weight: 500;
}
.gallery-mobile-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

/* Mobile drawer width — slightly wider than Bootstrap default for the
   five-filter form. Header padding matches the existing filter-form's
   padding so the layout looks consistent when switching breakpoints. */
@media (max-width: 767.98px) {
  #galleryFiltersOffcanvas.offcanvas-md {
    --bs-offcanvas-width: 320px;
  }
  #galleryFiltersOffcanvas .offcanvas-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
  }
  #galleryFiltersOffcanvas .offcanvas-body {
    padding: 1rem 1.25rem;
  }
  /* On mobile, the sticky-top behavior set on .gallery-sidebar at md+ is
     irrelevant inside the offcanvas. Reset it so the drawer scrolls cleanly. */
  .gallery-sidebar.offcanvas-md {
    position: fixed;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}

/* At md+: trigger button is hidden via Bootstrap's d-md-none. Offcanvas
   classes become no-ops; .gallery-sidebar renders its existing sticky-top
   sidebar exactly as before. */
@media (min-width: 768px) {
  #galleryFiltersOffcanvas .offcanvas-header { display: none; }
  /* Bootstrap unwraps responsive offcanvas at the breakpoint — body padding
     is on the inner .offcanvas-body which now sits inside the existing
     .gallery-sidebar wrapper. Zero out the extra padding so desktop layout
     is byte-identical to the pre-hotfix CSS. */
  #galleryFiltersOffcanvas .offcanvas-body { padding: 0; }
}
