/*
 * Barbara Rizzi website: the shop. The product card (listings, "Complete your look", the home page's "Featured
 * pieces"), the archive pages (/shop/, /product-category/…, /product-tag/…: #brarc) and /shop-new/ (#brsc).
 * Ported from the WordPress theme (woocommerce/archive-product.php, page-shop-new.php, the [br_featured_products]
 * shortcode in functions.php); differences in docs/phases/06-website/06c-shop.md.
 */

/* Product card (components/product/card.php): the listings' look; --featured and --related as on WordPress */
.product-card { background: #ffffff; position: relative; overflow: hidden; }
.product-card__image { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #f0ede8; }
.product-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.7s ease;
}
.product-card:hover .product-card__photo:first-child { transform: scale(1.04); }
.product-card__photo--hover { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.5s ease; }
.product-card:hover .product-card__photo--hover { opacity: 1; }
.product-card__action {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px;
  background: linear-gradient(transparent, rgba(26, 24, 22, 0.65));
  opacity: 0;
  transition: opacity 0.3s;
}
.product-card:hover .product-card__action, .product-card:focus-within .product-card__action { opacity: 1; }
.product-card__button {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: #1a1816;
  background: #ffffff;
  transition: background 0.2s;
}
.product-card__button:hover { background: #b8923a; color: #ffffff; }
.product-card__info { padding: 14px 16px 18px; }
.product-card__label { font-size: 8px; letter-spacing: 0.2em; text-transform: uppercase; color: #b8923a; margin-bottom: 5px; }
.product-card__name {
  display: block;
  font-family: var(--br-font-serif);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.3;
  color: #1a1816;
  margin-bottom: 7px;
}
.product-card__name:hover { color: #b8923a; }
.product-card__price { font-size: 12px; letter-spacing: 0.06em; color: #1a1816; }

/* Home page "Featured pieces": the second gallery photo, the main image on hover (no fade, as on WordPress) */
.product-card--featured .product-card__photo { object-position: center; }
.product-card--featured .product-card__photo--hover { transition: none; }
.product-card--featured .product-card__action {
  top: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(transparent 60%, rgba(26, 24, 22, 0.55));
}
.product-card--featured .product-card__button { padding: 10px 14px; }
.product-card--featured .product-card__label { font-size: 7.5px; letter-spacing: 0.22em; }
.product-card--featured .product-card__name { font-size: 15px; }
.product-card--featured .product-card__price { letter-spacing: 0.05em; }

/* "Complete your look": the main image only, the collection; the whole card is a link (as on WordPress) */
.product-card--related .product-card__photo { object-position: center; }
.product-card--related .product-card__info { padding: 12px 14px 16px; }
.product-card--related .product-card__label { letter-spacing: 0.18em; margin-bottom: 3px; }
.product-card--related .product-card__name { font-size: 14px; line-height: 1.6; margin-bottom: 5px; }
.product-card--related .product-card__name::after { content: ''; position: absolute; inset: 0; }
.product-card--related .product-card__name:hover { color: #1a1816; }
.product-card--related .product-card__price { letter-spacing: normal; }

/* Featured pieces section (#br-featured), shown on the home page */
#br-featured { font-family: var(--br-font-sans); background: #faf8f5; }
#br-featured .brv-head { padding: 48px 40px 28px; display: flex; align-items: flex-end; justify-content: space-between; }
#br-featured .brv-eye { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: #b8923a; display: block; margin-bottom: 8px; }
#br-featured .brv-title { font-family: var(--br-font-serif); font-size: 32px; font-weight: 300; color: #1a1816; }
#br-featured .brv-title em { font-style: italic; color: #b8923a; }
#br-featured .brv-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
#br-featured .brv-count {
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: #f0ede8;
  color: #8a8580;
  padding: 4px 10px;
  border: 0.5px solid #e2ddd6;
}
#br-featured .brv-viewall { font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #b8923a; }
#br-featured .brv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 0 2px 2px; }
#br-featured .brv-foot { padding: 28px 40px 36px; text-align: right; }
#br-featured .brv-btn {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 13px 32px;
  background: #1a1816;
  color: #ffffff;
  transition: background 0.3s;
}
#br-featured .brv-btn:hover { background: #b8923a; }

/* Archive pages (#brarc): /shop/, /product-category/<slug>/, /product-tag/<slug>/ */
#brarc { font-family: var(--br-font-sans); background: #faf8f5; }
#brarc .hero { position: relative; height: 260px; overflow: hidden; background: #1a1816; display: flex; align-items: flex-end; }
#brarc .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 0.28; }
#brarc .hero-ov { position: absolute; inset: 0; background: linear-gradient(to right, rgba(26, 24, 22, 0.7) 0%, rgba(26, 24, 22, 0.2) 60%, transparent 100%); }
#brarc .hero-cnt { position: relative; z-index: 3; padding: 0 60px 44px; }
#brarc .hero-lbl { font-size: 9px; letter-spacing: 0.35em; text-transform: uppercase; color: #b8923a; display: block; margin-bottom: 10px; }
#brarc .hero-ttl { font-family: var(--br-font-serif); font-size: clamp(34px, 4.5vw, 58px); font-weight: 300; color: #faf8f5; line-height: 1.05; letter-spacing: 0.02em; }
#brarc .hero-desc { font-size: 10px; color: rgba(250, 248, 245, 0.5); max-width: 480px; letter-spacing: 0.04em; line-height: 1.7; margin-top: 8px; }
#brarc .toolbar {
  background: #ffffff;
  border-bottom: 0.5px solid #e2ddd6;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  flex-wrap: wrap;
}
#brarc .bc { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8580; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; }
#brarc .bc a { color: #8a8580; transition: color 0.2s; }
#brarc .bc a:hover { color: #b8923a; }
#brarc .bc .sep { color: #d0cbc4; }
#brarc .sort-wrap { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 0.12em; color: #8a8580; padding: 10px 0; }
#brarc .sort-wrap label { text-transform: uppercase; white-space: nowrap; }
#brarc .sort-wrap select {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #1a1816;
  border: 0.5px solid #d0cbc4;
  border-radius: 0;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b8923a'/%3E%3C/svg%3E") no-repeat right 8px center;
  padding: 4px 28px 4px 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
#brarc .shop-wrap { display: grid; grid-template-columns: 220px 1fr; max-width: 1400px; margin: 0 auto; min-height: 60vh; }
/* Sticky under the fixed header (WordPress: top 0, under the header, and its wrapper's overflow stopped it) */
#brarc .filters {
  padding: 40px 28px;
  background: #ffffff;
  border-right: 0.5px solid #e2ddd6;
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  scrollbar-width: none;
}
#brarc .filters::-webkit-scrollbar { display: none; }
#brarc .filter-title { font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; color: #b8923a; display: block; padding-bottom: 10px; border-bottom: 0.5px solid #e2ddd6; margin: 28px 0 14px; }
#brarc .filter-title:first-of-type { margin-top: 0; }
#brarc .filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 7px 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #5a5650;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 0.5px solid #f5f2ee;
  cursor: pointer;
  transition: all 0.2s;
}
#brarc .filter-link:hover { color: #b8923a; padding-left: 3px; }
#brarc .filter-link.on { color: #1a1816; font-weight: 500; }
#brarc .filter-count { font-size: 9px; color: #a8a8a2; }
#brarc .filter-clear { display: none; font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: #b8923a; background: none; border: none; cursor: pointer; padding: 14px 0 0; text-align: left; }
#brarc .filter-clear.show { display: block; }
#brarc .content { padding: 40px 40px 80px; }
#brarc .shead { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; padding-bottom: 18px; border-bottom: 0.5px solid #e2ddd6; }
#brarc .seye { font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; color: #b8923a; margin-bottom: 8px; display: block; }
#brarc .stitle { font-family: var(--br-font-serif); font-size: 34px; font-weight: 300; color: #1a1816; }
#brarc .stitle em { font-style: italic; color: #b8923a; }
#brarc .scnt { font-size: 9px; letter-spacing: 0.14em; color: #8a8580; text-transform: uppercase; }
#brarc .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
#brarc .grid .product-card[hidden] { display: none; }
#brarc .empty-msg { text-align: center; padding: 80px 20px; grid-column: 1 / -1; font-family: var(--br-font-serif); font-size: 22px; font-weight: 300; color: #8a8580; font-style: italic; }
#brarc .mob-filter-btn, #brarc .mob-header { display: none; }
/* The mobile filter drawer and its overlay cover the fixed header (WordPress: under it, its close button hidden) */
#brarc-overlay { position: fixed; inset: 0; background: rgba(26, 24, 22, 0.5); z-index: 10000000; }
#brarc-overlay[hidden] { display: none; }

/* /shop-new/ (#brsc): hero, strip, tabs, sidebar and grid */
#brsc { font-family: var(--br-font-sans); background: #faf8f5; }
#brsc .hero { position: relative; height: 92vh; min-height: 580px; overflow: hidden; background: #1a1816; }
#brsc .hero-img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
#brsc .hov { position: absolute; inset: 0; z-index: 2; background: linear-gradient(to right, rgba(26, 24, 22, 0.72) 0%, rgba(26, 24, 22, 0.2) 55%, transparent 100%); }
#brsc .hb { position: absolute; bottom: 80px; left: 80px; z-index: 3; max-width: 480px; }
#brsc .hsub { font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase; color: #ffffff; display: block; margin-bottom: 16px; }
#brsc .ht { font-family: var(--br-font-serif); font-size: clamp(42px, 5.5vw, 68px); font-weight: 300; line-height: 1.02; color: #ffffff; margin-bottom: 32px; }
#brsc .ht em { font-style: italic; color: rgba(255, 255, 255, 0.65); }
#brsc .hcta {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 13px 34px;
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  transition: all 0.3s;
}
#brsc .hcta:hover { background: #b8923a; border-color: #b8923a; }
#brsc .hbadge {
  position: absolute;
  top: 48px;
  right: 80px;
  z-index: 3;
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b8923a;
  border: 0.5px solid rgba(184, 146, 58, 0.4);
  padding: 6px 14px;
  background: rgba(26, 24, 22, 0.5);
  backdrop-filter: blur(4px);
}
#brsc .strip { background: #1a1816; padding: 16px 40px; display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; }
#brsc .strip span { font-size: 8px; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(250, 248, 245, 0.35); }
#brsc .strip b { font-size: 8px; letter-spacing: 0.26em; text-transform: uppercase; color: #b8923a; font-weight: 400; }
/* Sticky under the fixed header (WordPress: top 0, under the header, and its wrapper's overflow stopped it) */
#brsc .tbar { background: #ffffff; border-bottom: 0.5px solid #e2ddd6; position: sticky; top: 92px; z-index: 100; }
#brsc .tinner { display: flex; overflow-x: auto; scrollbar-width: none; max-width: 1400px; margin: 0 auto; padding: 0 40px; align-items: stretch; }
#brsc .tinner::-webkit-scrollbar { display: none; }
#brsc .tab {
  font-size: 8.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  padding: 17px 22px;
  color: #8a8580;
  background: none;
  border: none;
  border-bottom: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
#brsc .tab:hover { color: #1a1816; }
#brsc .tab.on { color: #1a1816; border-bottom-color: #1a1816; }
#brsc .tsep { width: 0.5px; background: #e2ddd6; margin: 10px 0; flex-shrink: 0; }
#brsc .shop-wrap { display: grid; grid-template-columns: 220px 1fr; max-width: 1400px; margin: 0 auto; min-height: 60vh; scroll-margin-top: 92px; }
#brsc .filters {
  padding: 40px 28px;
  background: #ffffff;
  border-right: 0.5px solid #e2ddd6;
  position: sticky;
  top: 145px;
  align-self: start;
  max-height: calc(100vh - 145px);
  overflow-y: auto;
  scrollbar-width: none;
}
#brsc .filters::-webkit-scrollbar { display: none; }
#brsc .filter-title { font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; color: #b8923a; display: block; padding-bottom: 10px; border-bottom: 0.5px solid #e2ddd6; margin: 28px 0 14px; }
#brsc .filter-title:first-of-type { margin-top: 0; }
#brsc .filter-subtitle { font-size: 7.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #a8a8a2; display: block; margin: 12px 0 6px; }
#brsc .filter-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 7px 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #5a5650;
  background: none;
  border: none;
  border-bottom: 0.5px solid #f5f2ee;
  cursor: pointer;
  transition: all 0.2s;
}
#brsc .filter-link:hover { color: #b8923a; padding-left: 3px; }
#brsc .filter-link.on { color: #1a1816; font-weight: 500; }
#brsc .filter-link.indent { padding-left: 10px; font-size: 9.5px; }
#brsc .filter-link.indent:hover { padding-left: 14px; }
#brsc .filter-count { font-size: 9px; color: #a8a8a2; }
#brsc .filter-clear { display: none; font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: #b8923a; background: none; border: none; cursor: pointer; padding: 12px 0 0; text-align: left; }
#brsc .filter-clear.show { display: block; }
#brsc .content { padding: 40px 40px 80px; }
#brsc .shead { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 36px; padding-bottom: 18px; border-bottom: 0.5px solid #e2ddd6; }
#brsc .seye { font-size: 8px; letter-spacing: 0.3em; text-transform: uppercase; color: #b8923a; margin-bottom: 8px; display: block; }
#brsc .stitle { font-family: var(--br-font-serif); font-size: 34px; font-weight: 300; color: #1a1816; }
#brsc .stitle em { font-style: italic; color: #b8923a; }
#brsc .scnt { font-size: 9px; letter-spacing: 0.14em; color: #8a8580; text-transform: uppercase; }
#brsc .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
#brsc .grid .product-card[hidden] { display: none; }
#brsc .empty { text-align: center; padding: 80px 20px; font-family: var(--br-font-serif); font-size: 22px; font-weight: 300; color: #8a8580; font-style: italic; grid-column: 1 / -1; }
#brsc .mob-filter-btn, #brsc .filter-mob-close { display: none; }

/* Shared by both listings */
.mob-filter-btn {
  align-items: center;
  gap: 8px;
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 18px;
  background: none;
  border: 0.5px solid #e2ddd6;
  color: #1a1816;
  cursor: pointer;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  #brarc .grid, #brsc .grid { grid-template-columns: repeat(2, 1fr); }
  #brarc .shop-wrap { grid-template-columns: 190px 1fr; }
  #brsc .shop-wrap { grid-template-columns: 180px 1fr; }
  #br-featured .brv-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  #brarc .filters { top: 64px; max-height: calc(100vh - 64px); }
  #brsc .tbar { top: 64px; }
  #brsc .filters { top: 117px; max-height: calc(100vh - 117px); }
  #brsc .shop-wrap { scroll-margin-top: 64px; }
}
@media (max-width: 768px) {
  #br-featured .brv-grid { grid-template-columns: repeat(2, 1fr); }
  #br-featured .brv-head { padding: 32px 20px 20px; flex-direction: column; gap: 12px; align-items: flex-start; }
  #br-featured .brv-foot { padding: 20px 20px 32px; }

  #brarc .hero-cnt { padding: 0 24px 32px; }
  #brarc .toolbar { padding: 0 16px; }
  #brarc .shop-wrap { display: block; }
  #brarc .filters {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    max-height: 100vh;
    z-index: 10000001;
    padding: 24px 24px 40px;
    border-right: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    visibility: hidden;
  }
  #brarc .filters.open { left: 0; visibility: visible; }
  #brarc .mob-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
  #brarc .mob-header span { font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; color: #1a1816; }
  #brarc .mob-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    font-size: 20px;
    line-height: 1;
    color: #ffffff;
    background: #1a1816;
    border: none;
    border-radius: 50%;
    cursor: pointer;
  }
  #brarc .mob-filter-btn { display: flex; }
  #brarc .content { padding: 20px 16px 60px; }
  #brarc .grid { grid-template-columns: 1fr 1fr; gap: 1px; }

  #brsc .shop-wrap { grid-template-columns: 1fr; }
  #brsc .filters { display: none; position: fixed; inset: 0; z-index: 10000001; max-height: 100vh; padding: 24px 24px 40px; border-right: none; background: #ffffff; }
  #brsc .filters.open { display: block; }
  #brsc .filter-mob-close { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: #1a1816; }
  #brsc .filter-mob-close button { background: none; border: none; font-size: 22px; line-height: 1.6; cursor: pointer; color: #1a1816; padding: 0; }
  #brsc .mob-filter-btn { display: flex; }
  #brsc .grid { grid-template-columns: 1fr 1fr; gap: 1px; }
  #brsc .content { padding: 20px 16px 60px; }
  #brsc .hb { left: 24px; bottom: 60px; max-width: calc(100% - 48px); }
  #brsc .ht { font-size: 36px; }
  #brsc .hbadge { display: none; }
  #brsc .tinner { padding: 0 16px; }
}
@media (max-width: 480px) {
  #br-featured .brv-grid { grid-template-columns: 1fr 1fr; gap: 1px; }
}
