/* Bao An Tailor Shop: single catalogue UI backed by public/data/shop-catalog.json */

.shop37-heading{display:flex;align-items:end;justify-content:space-between;gap:26px;margin-bottom:30px}
.shop37-heading>div{max-width:740px}
.shop37-heading h2{margin-bottom:12px}
.shop37-heading p:not(.eyebrow){color:#62584d;margin-bottom:0}
.shop37-action-primary{display:flex;align-items:center;justify-content:space-between;gap:7px;width:100%}

/* Responsive catalogue cards: all source photos are converted to 640 x 800 WebP,
   retaining full garment and padded by a soft background when aspect ratios differ. */
.shop39-catalogue{padding:76px 0 94px}

.shop39-pricing{border-left:2px solid #b38e57;padding:5px 0 5px 15px;margin:0 0 25px;color:#675746;font-size:.82rem;line-height:1.6}
.shop39-controls{margin:18px 0 19px}
.shop39-search-label{display:block;color:#745635;font-weight:700;font-size:.71rem;letter-spacing:.07em;margin:0 0 8px}
.shop39-search{background:#fffdf9;border:1px solid #d4c4a9;border-radius:10px;outline:none;color:#30271e;padding:13px 16px;font:400 .9rem/1.3 'DM Sans',sans-serif;width:min(540px,100%);min-height:48px}
.shop39-search:focus-visible{outline:3px solid #d6b06e;outline-offset:2px}
.shop39-categories{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 20px}
.shop39-filter{appearance:none;border:1px solid #d0bda0;border-radius:100px;padding:10px 14px;color:#5f4c34;background:#fffaf2;font:600 .72rem/1.2 'DM Sans',sans-serif;cursor:pointer;transition:background .16s ease}
.shop39-filter[aria-pressed="true"]{background:#2d281f;border-color:#2d281f;color:#ffedcd}
.shop39-filter:hover{border-color:#9b703d}
.shop39-filter:focus-visible{outline:3px solid #b89455;outline-offset:2px}
.shop39-status{color:#796b5b;font-size:.77rem;margin:0 0 17px}
.shop39-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:19px 17px;min-height:120px}
.shop39-card{min-width:0;min-height:100%;display:flex;flex-direction:column;border:1px solid #e0d4c0;background:#fffdf9;overflow:hidden;box-shadow:0 8px 20px #30271e0c;border-radius:10px}
.shop39-media{width:100%;aspect-ratio:4/5;position:relative;overflow:hidden;background:#e8dece;flex:none}
.shop39-photo{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.shop39-photo[hidden],.shop39-image-error[hidden]{display:none!important}
.shop39-image-error{position:absolute;inset:0;display:grid;place-items:center;text-align:center;color:#7c644b;font-size:.72rem;letter-spacing:.06em}
.shop39-price-tag{position:absolute;top:12px;right:12px;z-index:1;min-width:70px;padding:7px 12px;border-radius:5px;background:#c3944d;color:#231a11;box-shadow:0 4px 14px #0003;text-align:center;font:700 1.14rem/1.2 'DM Sans',sans-serif}
.shop39-price-ask{background:#fffaf1;color:#60462b;border:1px solid #d7c4a4;font-size:.68rem;letter-spacing:.06em}
.shop39-card-body{display:flex;flex:1;flex-direction:column;min-width:0;padding:18px 17px 17px}
.shop39-meta{display:flex;gap:6px;justify-content:space-between;align-items:baseline;margin:0 0 8px}
.shop39-category-label{color:#a07947;font-size:.63rem;font-weight:700;line-height:1.4;letter-spacing:.035em;margin:0}
.shop39-ref{font-size:.6rem;color:#8e847a;white-space:nowrap}
.shop39-name{font:500 clamp(1.35rem,1.7vw,1.75rem)/1.18 'Cormorant Garamond',Georgia,serif;color:#32271e;margin:0 0 8px;overflow-wrap:anywhere;text-transform:capitalize}
.shop39-quote-note{color:#847464;font-size:.68rem;line-height:1.5;margin:auto 0 13px;padding-top:6px}
.shop39-card-cta{width:100%}
.shop39-error{border:1px solid #bf9564;background:#f9f0e5;color:#483523;padding:20px;margin:20px 0}
.shop39-error[hidden]{display:none!important}
.shop39-error button{padding:10px 16px;background:#2d281f;color:white;border:0;cursor:pointer;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06)}
.shop39-empty{grid-column:1/-1;padding:25px;background:#f4ecdf;color:#654e32}
.shop39-noscript{font-size:.9rem;color:#734e2b;margin-top:20px}

.shop37-explore{background:#2a241e;color:#f8efe0;padding:88px 0 94px}
.shop37-explore .shop37-heading p:not(.eyebrow){color:#dac8af}
.shop37-collections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.shop37-collection{position:relative;min-height:345px;overflow:hidden;background:#44382c;display:flex;align-items:end;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06)}
.shop37-collection:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#211a13de,transparent 70%)}
.shop37-collection img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.shop37-collection:hover img{transform:scale(1.03)}
.shop37-collection>span{position:relative;z-index:2;padding:24px}
.shop37-collection strong{display:block;font:500 2.15rem 'Cormorant Garamond',Georgia,serif}
.shop37-collection small{display:block;margin-top:10px;color:#ebcf9e;font-size:.64rem;font-weight:700;letter-spacing:.12em}
.shop37-contact{padding:92px 0 100px}
.shop37-contact .shop37-contact-intro{max-width:780px;margin-bottom:28px}
.shop37-contact-intro p:not(.eyebrow){color:#625749;line-height:1.65}
.shop37-contact-intro .ba-btn{margin-top:9px}
.shop37-contact-panels{display:grid;grid-template-columns:minmax(0,1fr);max-width:820px;gap:clamp(16px,2.8vw,34px);align-items:stretch}
.shop37-contact-card{border:1px solid #d8c6a9;background:#fffaf3;padding:clamp(20px,3vw,30px);box-shadow:0 4px 14px #30271e10;border-radius:14px;min-width:0}
.shop37-contact-label{color:#725a3c;font:700 .79rem/1.4 'DM Sans',sans-serif;letter-spacing:.085em;margin:0 0 17px}
.shop37-contact-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(max-width:720px){.shop37-contact-panels{grid-template-columns:1fr}}
@media(max-width:1180px){.shop39-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.shop39-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.shop39-catalogue,.shop37-explore,.shop37-contact{padding:55px 0 64px}.shop37-heading{flex-direction:column;align-items:start;gap:15px}.shop37-contact-panels{grid-template-columns:1fr}.shop37-collections{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.shop39-card-body{padding:12px 11px}.shop39-name{font-size:1.35rem}.shop39-meta{flex-direction:column;align-items:start;gap:4px}.shop39-price-tag{top:8px;right:8px;min-width:60px;padding:6px 9px;font-size:1rem}.shop39-card-cta{font-size:.58rem;line-height:1.5;padding:10px 9px;min-height:47px}.shop39-quote-note{font-size:.61rem}.shop37-collections{grid-template-columns:1fr}.shop37-collection{min-height:300px}.shop37-contact-card{padding:22px}.shop37-contact-item{font-size:.8rem}}
@media(max-width:345px){.shop39-grid{grid-template-columns:1fr}.shop39-name{font-size:1.65rem}.shop39-card-body{padding:18px}}
@media(prefers-reduced-motion:reduce){.shop37-collection img,.shop39-filter{transition:none}}

.shop39-card{border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06)}
.shop39-card-body{gap:0}
.shop39-category-label{font-size:.76rem;color:#684d32;letter-spacing:.025em;line-height:1.5}
.shop39-ref{font-size:.73rem;color:#66594a}
.shop39-name{font-size:clamp(1.55rem,2vw,1.9rem);line-height:1.12;text-transform:none;margin:0 0 10px}
.shop39-description{font-size:.875rem;line-height:1.65;color:#594e41;margin:0 0 20px;flex:1}
.shop39-card-cta{font-size:.75rem;min-height:46px;line-height:1.3}
.shop39-price-tag{border-radius:7px}
.shop39-search-label{font-size:.81rem;color:#684d32}
.shop39-status{font-size:.87rem;color:#554a3d}
/* Keep HTML-first cards filterable even when API fetch is offline. */
.shop39-card[hidden]{display:none!important}

.shop39-filter{min-height:44px;font-size:max(.75rem,12px)}
.shopx-category-label,.shopx-category-select{display:none}
.shop39-category-label{color:#684d32}
.shop39-ref{color:#66594a}
@media(max-width:767px){
  .shop39-catalogue{padding:35px 0 56px}
  .shop37-heading{gap:10px;margin-bottom:12px}
  .shop37-heading h2{font-size:clamp(2rem,7vw,3rem);margin:0}
  
  .shop39-pricing{margin:0 0 14px;font-size:.83rem}
  .shop39-controls{margin:14px 0 13px}
  .shop39-search{width:100%;min-height:48px}
  .shop39-status{font-size:.85rem;margin:10px 0 16px}
  .shop37-explore,.shop37-contact{padding:48px 0 56px}
}
@media(max-width:540px){
  .shopx-category-label{display:block;font-weight:700;color:#5f4c34;font-size:.85rem;margin:0 0 6px}
  .shopx-category-select{display:block;width:100%;min-height:48px;border:1px solid #bba47e;
      border-radius:10px;background:#fffdf9;color:#2d261e;padding:10px 13px;font:600 .92rem/1.35 'DM Sans',sans-serif}
  .shopx-category-select:focus-visible{outline:3px solid #b89455;outline-offset:3px}
  .shop39-categories{display:none}
  .shop39-grid{grid-template-columns:1fr;gap:15px}
  .shop39-card{border-radius:10px}
  .shop39-media{height:clamp(190px,58vw,295px);aspect-ratio:auto;display:flex;justify-content:center;align-items:center}
  .shop39-photo{width:100%;height:100%;object-fit:contain;object-position:center}
  .shop39-card-body{padding:14px 16px 16px}
  .shop39-meta{margin-bottom:5px;gap:7px}
  .shop39-name{font-size:clamp(1.55rem,6vw,1.88rem);margin:0 0 7px;line-height:1.11}
  .shop39-description{font-size:.91rem;line-height:1.48;margin:0 0 12px}
  .shop39-card-cta{min-height:46px;padding:12px 13px;font-size:.77rem}
  .shop39-price-tag{font-size:.98rem}
}
@media(min-width:480px) and (max-width:540px){
  .shop39-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
  .shop39-media{height:clamp(165px,42vw,220px)}
  .shop39-card-body{padding:12px}
  .shop39-name{font-size:1.52rem}
  .shop39-description{font-size:.84rem;line-height:1.42}
  .shop39-ref{font-size:.68rem}
  .shop39-meta{align-items:flex-start;flex-direction:column}
  .shop39-card-cta{font-size:.7rem}
}

@media(max-width:540px){
  .shop39-catalogue{padding-top:19px}
  .shop39-catalogue .shop37-heading{display:flex;flex-direction:row;align-items:center;margin:0 0 9px}
  .shop39-catalogue .shop37-heading .eyebrow,
  .shop39-catalogue .shop37-heading h2{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
  
  
  .shop39-pricing{margin-bottom:10px;line-height:1.4}
  .shop39-controls{margin:10px 0}
  .shop39-status{margin:8px 0 12px}
}

.shop39-catalogue .shop37-heading .eyebrow,.shop39-catalogue .shop37-heading h2{
 position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}
.shop39-catalogue .shop37-heading{display:flex;flex-direction:row;align-items:center;margin:0 0 10px;}

.shop39-price-tag:not(.shop39-price-ask){display:flex;flex-direction:column;align-items:center;gap:2px;}

@media(max-width:540px){}

/* Same atelier cards as the Home page: the Locations component is shared. */
#shop-contact + .locations{padding-top:72px}
@media(max-width:720px){
  .shop37-contact-actions{grid-template-columns:1fr}
  #shop-contact + .locations{padding-top:48px}
}
