/* BUYZZY photo-reference v15
   Final isolated homepage layer based on the user's supplied reference. */

:root{
  --pr-ink:#1d2c3d;
  --pr-muted:#858b93;
  --pr-line:#e1e5ea;
  --pr-blue:#347aa9;
  --pr-pink:#c83472;
}

/* ---------- MOBILE: target the supplied photo ---------- */
@media(max-width:760px){
  body:has(#store:not([hidden])){background:#f7f8fa!important}

  #store{
    width:100%!important;
    margin:0 auto!important;
    padding:0 12px 96px!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#f8f9fb!important;
    overflow:visible!important;
  }
  #store:before,#store:after{display:none!important}

  #store .category-heading,
  #store .home-trust-strip{display:none!important}

  /* category strip: five items visible + next item teaser */
  #store #categoryTiles.category-grid.collection-grid{
    display:flex!important;
    flex-wrap:nowrap!important;
    grid-template-columns:none!important;
    gap:6px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    margin:0 0 13px!important;
    padding:5px 6px 8px!important;
    background:#fff!important;
    border-top:1px solid var(--pr-line)!important;
    border-bottom:1px solid var(--pr-line)!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  #store #categoryTiles::-webkit-scrollbar{display:none!important}

  #store #categoryTiles .collection-card{
    flex:0 0 64px!important;
    width:64px!important;
    min-width:64px!important;
    max-width:64px!important;
    height:72px!important;
    min-height:72px!important;
    max-height:72px!important;
    padding:4px 3px 5px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    border:2px solid transparent!important;
    border-radius:12px!important;
    background:transparent!important;
    color:var(--pr-ink)!important;
    box-shadow:none!important;
    scroll-snap-align:start!important;
  }
  #store #categoryTiles .collection-card>.category-icon{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    max-width:38px!important;
    max-height:38px!important;
    padding:7px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:12px!important;
    border:1px solid rgba(48,68,95,.08)!important;
    box-shadow:none!important;
  }
  #store #categoryTiles .collection-card>.category-icon svg{
    width:23px!important;
    height:23px!important;
    stroke-width:1.7!important;
  }
  #store #categoryTiles .collection-card>.collection-card-copy{
    width:auto!important;
    min-width:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    text-align:center!important;
  }
  #store #categoryTiles .collection-card>.collection-card-copy strong{
    display:block!important;
    font-size:10px!important;
    line-height:1!important;
    font-weight:800!important;
    color:var(--pr-ink)!important;
    white-space:nowrap!important;
  }
  #store #categoryTiles .collection-card>.collection-card-copy small,
  #store #categoryTiles .collection-card>.collection-arrow{display:none!important}

  #store #categoryTiles .collection-card.active{
    border-color:var(--pr-blue)!important;
    outline:0!important;
    background:#fff!important;
    box-shadow:none!important;
  }

  #store #categoryTiles .collection-card:nth-child(6n+1)>.category-icon{background:#f1e6f0!important;color:#243d53!important}
  #store #categoryTiles .collection-card:nth-child(6n+2)>.category-icon{background:#e7f0f5!important;color:#2d7398!important}
  #store #categoryTiles .collection-card:nth-child(6n+3)>.category-icon{background:#f8e8ec!important;color:#a74865!important}
  #store #categoryTiles .collection-card:nth-child(6n+4)>.category-icon{background:#f7ecd9!important;color:#987028!important}
  #store #categoryTiles .collection-card:nth-child(6n+5)>.category-icon{background:#e7f1ef!important;color:#277f79!important}
  #store #categoryTiles .collection-card:nth-child(6n+6)>.category-icon{background:#eee8f7!important;color:#7353a0!important}

  /* section shell */
  #featuredSection,#newSection{
    margin:0 0 13px!important;
    padding:0!important;
    background:#fff!important;
    border-top:1px solid var(--pr-line)!important;
    border-bottom:1px solid var(--pr-line)!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }

  #featuredSection .discovery-head,
  #newSection .discovery-head{
    min-height:83px!important;
    padding:14px 12px 12px!important;
    border:0!important;
    border-bottom:1px solid var(--pr-line)!important;
    border-radius:0!important;
    background:#fff!important;
    backdrop-filter:none!important;
  }
  #featuredSection .discovery-head small,
  #newSection .discovery-head small{
    font-size:8px!important;
    line-height:1!important;
    letter-spacing:.16em!important;
    font-weight:800!important;
  }
  #featuredSection .discovery-head small{color:#a25776!important}
  #newSection .discovery-head small{color:#b77b42!important}
  #featuredSection .discovery-head h2,
  #newSection .discovery-head h2{
    margin:6px 0 0!important;
    font-size:20px!important;
    line-height:1.08!important;
    letter-spacing:-.035em!important;
    color:#242027!important;
  }
  #featuredSection .discovery-head>span,
  #newSection .discovery-head>span{display:none!important}

  /* 2 full cards + visible third teaser */
  #store #featuredProducts.discovery-grid,
  #store #newProducts.discovery-grid{
    display:flex!important;
    flex-wrap:nowrap!important;
    grid-template-columns:none!important;
    gap:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-snap-type:x proximity!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    margin:0!important;
    padding:0 0 12px!important;
  }
  #store #featuredProducts::-webkit-scrollbar,
  #store #newProducts::-webkit-scrollbar{display:none!important}

  #featuredProducts .shelf-product,
  #newProducts .shelf-product{
    flex:0 0 clamp(118px,32.5vw,128px)!important;
    width:clamp(118px,32.5vw,128px)!important;
    min-width:clamp(118px,32.5vw,128px)!important;
    max-width:128px!important;
    scroll-snap-align:start!important;
    border:0!important;
    border-right:1px solid var(--pr-line)!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
    overflow:hidden!important;
  }

  #featuredProducts .shelf-photo,
  #newProducts .shelf-photo{
    position:relative!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:1/1.02!important;
    border:0!important;
    border-radius:0!important;
    background:#f5f6f7!important;
    overflow:hidden!important;
  }
  #featuredProducts .shelf-photo img,
  #newProducts .shelf-photo img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    padding:7px!important;
  }
  #featuredProducts .shelf-wish,
  #newProducts .shelf-wish{
    width:28px!important;
    height:28px!important;
    top:7px!important;
    right:7px!important;
    border-radius:50%!important;
    background:#fff!important;
    border:1px solid #e1e5e8!important;
    box-shadow:0 3px 9px rgba(22,42,68,.08)!important;
    color:#aeb7b4!important;
    font-size:16px!important;
  }

  #featuredProducts .shelf-copy,
  #newProducts .shelf-copy{
    min-height:140px!important;
    padding:8px 8px 9px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    background:#fff!important;
  }
  #featuredProducts .shelf-copy small,
  #newProducts .shelf-copy small{
    font-size:8px!important;
    line-height:1.2!important;
    color:#858a90!important;
  }
  #featuredProducts .shelf-copy h3,
  #newProducts .shelf-copy h3{
    margin:4px 0 2px!important;
    min-height:31px!important;
    font-size:11px!important;
    line-height:1.3!important;
    font-weight:800!important;
    color:#1d2c3e!important;
    overflow:hidden!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
  }
  #featuredProducts .shelf-variant,
  #newProducts .shelf-variant{
    min-height:13px!important;
    margin:0!important;
    font-size:8px!important;
    line-height:1.2!important;
    color:#878d94!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  #featuredProducts .shelf-price,
  #newProducts .shelf-price{
    display:flex!important;
    align-items:baseline!important;
    gap:5px!important;
    min-height:20px!important;
  }
  #featuredProducts .shelf-price strong,
  #newProducts .shelf-price strong{
    font-size:14px!important;
    line-height:1.2!important;
    color:#142235!important;
  }
  #featuredProducts .shelf-price del,
  #newProducts .shelf-price del{
    font-size:8px!important;
    color:#92979d!important;
  }
  #featuredProducts .shelf-cta,
  #newProducts .shelf-cta{
    width:100%!important;
    min-height:34px!important;
    margin-top:auto!important;
    padding:6px 5px!important;
    border:0!important;
    border-radius:8px!important;
    background:linear-gradient(135deg,#a73b78,#d23976)!important;
    color:#fff!important;
    font-size:9px!important;
    line-height:1!important;
    font-weight:800!important;
    box-shadow:none!important;
  }
  #featuredProducts .shelf-cta:disabled,
  #newProducts .shelf-cta:disabled{
    background:#bfc3c8!important;
    color:#fff!important;
  }

  /* All Products remains compact, not huge */
  #store #productsSection{
    margin-top:12px!important;
    padding:9px!important;
    background:#fff!important;
    border:1px solid var(--pr-line)!important;
    border-radius:11px!important;
    box-shadow:none!important;
  }
  #store #productsSection #allProducts.product-grid,
  #store #productsSection.jeans-view #allProducts.product-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #allProducts .product-card{
    border:1px solid var(--pr-line)!important;
    border-radius:9px!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  #allProducts .product-card .photo,
  #productsSection.jeans-view .product-card .photo{
    aspect-ratio:1/1!important;
    min-height:0!important;
    background:#f5f6f7!important;
  }
  #allProducts .product-card .photo img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    padding:6px!important;
  }
  #allProducts .product-body,
  #productsSection.jeans-view .product-body{padding:8px!important;gap:5px!important}
  #allProducts .product-body>small{font-size:8px!important}
  #allProducts .product-body h3,
  #productsSection.jeans-view .product-body h3{
    font-size:11px!important;
    line-height:1.3!important;
    min-height:29px!important;
  }
  #allProducts .prices strong,
  #productsSection.jeans-view .prices strong{font-size:14px!important}
  #allProducts .prices del{font-size:9px!important}
}

/* ---------- DESKTOP/TABLET: clean grid, no giant empty rail ---------- */
@media(min-width:761px){
  #store{
    background:#f8fafc!important;
    box-shadow:none!important;
  }
  #store:before,#store:after{display:none!important}
  #store #categoryTiles{
    background:#fff!important;
    border:1px solid var(--pr-line)!important;
    box-shadow:none!important;
  }
  #featuredSection,#newSection,#productsSection{
    background:#fff!important;
    box-shadow:none!important;
  }
  #store #featuredProducts.discovery-grid,
  #store #newProducts.discovery-grid{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:12px!important;
    overflow:visible!important;
    padding:0 14px 16px!important;
  }
  #featuredProducts .shelf-product,
  #newProducts .shelf-product{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    flex:none!important;
  }
  #featuredProducts .shelf-cta,
  #newProducts .shelf-cta{
    width:100%;
    min-height:38px;
    margin-top:10px;
    border:0;
    border-radius:9px;
    background:linear-gradient(135deg,#a73b78,#d23976);
    color:#fff;
    font-weight:800;
  }
}

@media(prefers-reduced-motion:reduce){
  #store *{scroll-behavior:auto!important}
}

/* v16 mobile edge/overflow fix */
html,body{max-width:100%;overflow-x:hidden}
@media(max-width:760px){
  #store,#featuredSection,#newSection,#productsSection{
    max-width:100%!important;
    overflow-x:hidden!important;
    box-sizing:border-box!important;
  }
  #store #featuredProducts.discovery-grid,
  #store #newProducts.discovery-grid{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding-left:10px!important;
    padding-right:10px!important;
    gap:10px!important;
  }
  #featuredProducts .shelf-product,
  #newProducts .shelf-product{
    border:1px solid #e1e5ea!important;
    border-radius:10px!important;
    overflow:hidden!important;
  }
}

/* v17 mobile fullscreen + fast paint + product actions */
:root,
body,
button,
input,
select,
textarea{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;
}
img{
  image-rendering:auto!important;
  filter:none!important;
  opacity:1!important;
}
.product-actions,
.shelf-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  width:100%;
  margin-top:10px;
}
.product-actions button,
.shelf-actions button{
  min-height:38px;
  border-radius:9px;
  padding:7px 9px;
  font-size:11px;
  line-height:1.15;
  font-weight:800;
  cursor:pointer;
}
.card-add,
.shelf-add{
  border:1px solid #c93d75;
  background:#fff;
  color:#b42f68;
}
.card-buy,
.shelf-buy{
  border:1px solid #bd2e67;
  background:linear-gradient(135deg,#b83270,#dc3b79);
  color:#fff;
}
.product-actions button:disabled,
.shelf-actions button:disabled{
  cursor:not-allowed;
  background:#e4e7eb!important;
  border-color:#d5d9de!important;
  color:#8a9098!important;
}
.product-actions .just-added,
.shelf-actions .just-added{
  background:#19704f!important;
  border-color:#19704f!important;
  color:#fff!important;
}

@media(max-width:760px){
  html,
  body{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:clip!important;
  }
  body{
    margin:0!important;
    padding:0!important;
  }
  #store.store.container{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0 0 calc(96px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
  }
  #store #categoryTiles.category-grid.collection-grid,
  #featuredSection,
  #newSection,
  #store #productsSection{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
  }
  #store #categoryTiles.category-grid.collection-grid{
    padding-left:8px!important;
    padding-right:8px!important;
  }
  #store #productsSection{
    padding:10px 12px 14px!important;
  }
  #store #productsSection #allProducts.product-grid,
  #store #productsSection.jeans-view #allProducts.product-grid{
    width:100%!important;
    max-width:100%!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
  #allProducts .product-card,
  #featuredProducts .shelf-product,
  #newProducts .shelf-product{
    min-width:0!important;
    max-width:100%!important;
  }
  #allProducts .product-body{
    display:flex!important;
    flex-direction:column!important;
  }
  #allProducts .product-actions{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin-top:auto!important;
    padding-top:7px!important;
  }
  #allProducts .product-actions button{
    min-height:36px!important;
    padding:6px 4px!important;
    border-radius:7px!important;
    font-size:9.5px!important;
  }
  #featuredProducts .shelf-actions,
  #newProducts .shelf-actions{
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin-top:auto!important;
  }
  #featuredProducts .shelf-actions button,
  #newProducts .shelf-actions button{
    min-height:34px!important;
    padding:5px 4px!important;
    border-radius:7px!important;
    font-size:9px!important;
  }
  input,
  select,
  textarea,
  .search input{
    font-size:16px!important;
  }
  .product-card .photo img,
  .shelf-photo img,
  .detail-photo,
  .gallery-main-image{
    transform:none!important;
    image-rendering:auto!important;
    filter:none!important;
  }
}