/* Shop pages: the product tile and grid (also used on the main page rows), the category masthead, sort bar and pager.
   Ported from the approved Category B mockup. IGSHOP Shop Kit prints the photo box, size pills, sale % pill,
   "Sale ends in" panel and sold bar; the rules below only give them the yellow/black look. */

/* ---------- product grid + tile (Studio Sweep photo, small gender line, name, price) ---------- */
.y-grid,ul.products.y-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:34px 18px;list-style:none;margin:0;padding:0}
ul.products.y-grid::before,ul.products.y-grid::after{content:none}
.y-cell-w{position:relative;display:flex;flex-direction:column;list-style:none;margin:0;padding:0;float:none;width:auto}
/* WooCommerce's own layout sheet gives tiles a 22% width and a right margin; the grid sets the size here */
.opt-m4 ul.products.y-grid li.y-cell-w{width:auto;margin:0;float:none}
.y-cell-w .y-cell{flex:1}
/* the cream strip under each photo (WooCommerce's 1em image margin, set here on purpose); the size boxes' overlay below starts under the image so it ends at the bottom of the photo box */
.y-cell-w{--y-img-gap:15px}
.opt-m4 ul.products li.y-cell-w .y-cell-img img{margin:0 0 var(--y-img-gap)}
.y-cell{display:flex;flex-direction:column;align-items:center;text-align:center}
.y-cell-img{position:relative;display:block;width:100%;background:var(--sweep);isolation:isolate;overflow:hidden;
  --qav-pill-bg:rgba(255,255,255,.96);--qav-pill-border:1.5px solid var(--k);--qav-pill-color:var(--k);--qav-pill-font:12px;--qav-pill-gap:6px;--qav-pill-pad:0 10px;--qav-inset:14px}
.y-cell-img img{width:100%;aspect-ratio:1/1;object-fit:cover;mix-blend-mode:multiply;transition:transform .7s cubic-bezier(.2,.7,.2,1)}
.y-cell:hover .y-cell-img img{transform:scale(1.045)}
.y-cell-g{margin-top:14px;font-size:10.5px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:#8A6B12}
.y-cell-n{margin-top:5px;font-size:13.5px;font-weight:600;letter-spacing:.06em}
.y-cell-p{margin-top:4px;font-size:13.5px;font-weight:500;color:#45433E;font-variant-numeric:tabular-nums}
.y-cell-p del{margin-right:8px;color:var(--sale);font-size:12.5px;text-decoration-thickness:1px}
.y-cell-p ins{text-decoration:none;font-weight:700}

/* sale % pill (Shop Kit turns Woo's "Sale!" flag into "-N%"), printed inside the photo box */
.y-cell-img .onsale{position:absolute;top:10px;right:10px;left:auto;margin:0;min-width:0;min-height:0;z-index:3;
  padding:4px 9px;border-radius:0;background:var(--y);color:var(--k);font-size:12px;font-weight:700;line-height:1.4;letter-spacing:.02em}
.y-cell-w.qav-flash-sale .onsale{background:var(--flash);color:#fff}
.y-cell-w.qav-flash-sale .y-cell-p ins,.y-cell-w.qav-flash-sale .y-cell-p del{color:var(--flash)}
/* "Sale ends in" panel over the bottom of the photo (flash sales turn red) */
.y-cell-img .archive-countdown-wrapper{bottom:8px;left:8px;right:8px;padding:0}
.y-cell-img .archive-countdown-wrapper .wc-sale-countdown{--qav-cd-accent:var(--k);padding:7px 8px;border-radius:0;background:rgba(253,227,6,.92)}
.y-cell-img .archive-countdown-wrapper .wc-sale-countdown.flash-sale{--qav-cd-accent:#fff;background:rgba(224,0,0,.94)}
.y-cell-img .archive-countdown-wrapper .countdown-label{font-size:9px;font-weight:700;letter-spacing:.14em;text-transform:uppercase}
.y-cell-img .archive-countdown-wrapper .countdown-num{font-size:13px;font-weight:700}
.y-cell-img .archive-countdown-wrapper .countdown-txt{font-size:7px;letter-spacing:.08em;text-transform:uppercase}
/* units-sold bar (flash sales) */
.y-cell .qav-sold-bar{width:100%;max-width:190px;margin:8px auto 0}
/* sold out: photo dimmed, a small dark tag in the corner */
.y-cell-img .qav-soldout{position:absolute;inset:auto;top:10px;right:10px;left:auto;bottom:auto;transform:none;z-index:3;
  padding:4px 9px;border-radius:0;background:var(--k-2);color:#fff;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:none}
.y-cell-w.outofstock .y-cell-img img{opacity:.62}
.y-cell-w.outofstock .y-cell-p{color:var(--grey)}

/* Add to cart under every tile: outlined so it never competes with the black button on the product page.
   Simple + in stock = "Add to cart" (Woo's own AJAX button); variable + in stock = "Add to cart" too, a <button> that opens the
   size picker below; sold out = "Read more" (Woo's own label). */
.opt-m4 ul.products li.y-cell-w .y-cell-add.button{font-family:inherit;align-self:center;display:inline-flex;align-items:center;justify-content:center;margin:12px 0 0;min-height:40px;padding:0 26px;
  border:1.5px solid var(--k);border-radius:999px;background:transparent;color:var(--k);font-size:11.5px;font-weight:700;letter-spacing:.14em;
  line-height:1;text-transform:uppercase;cursor:pointer;transition:background .18s,color .18s}
.opt-m4 ul.products li.y-cell-w .y-cell-add.button:hover{background:var(--k);color:var(--y)}
.opt-m4 ul.products li.y-cell-w .y-cell-add.button.loading{opacity:.6}
.opt-m4 ul.products li.y-cell-w .y-cell-add.button.loading::after,.opt-m4 ul.products li.y-cell-w .y-cell-add.button.added::after{content:none}
/* ---------- size picker: one dialog shared by every variable product's Add to cart (assets/shop.js fills it) ----------
   A card in the middle on a computer, a sheet from the bottom on a phone. Selectors start "dialog.y-pick" so a parent
   theme's plain button:hover colours cannot reach them. */
dialog.y-pick{width:min(400px,calc(100vw - 32px));max-height:calc(100dvh - 32px);margin:auto;padding:0;border:0;background:#fff;color:var(--k);box-shadow:0 24px 60px rgba(18,18,18,.28);overflow:auto}
dialog.y-pick::backdrop{background:rgba(18,18,18,.55)}
body:has(dialog.y-pick[open]){overflow:hidden}
.y-pick-box{position:relative;padding:26px 24px 24px}
dialog.y-pick .y-pick-x{position:absolute;top:6px;right:6px;display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;background:none;color:var(--k);font-size:28px;line-height:1}
dialog.y-pick .y-pick-x:hover{background:none;color:var(--k);opacity:.6}
.y-pick-head{display:flex;align-items:center;gap:14px;padding-right:36px}
.y-pick-img{flex:none;width:64px;height:64px;object-fit:cover;background:var(--sweep)}
.y-pick-title{margin:0;font-size:13.5px;font-weight:600;letter-spacing:.06em}
.y-pick-set{min-width:0;margin:22px 0 0;padding:0;border:0}
.y-pick-legend{padding:0;font-size:10.5px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:#8A6B12}
.y-pick-opts{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.y-pick-opt{position:relative;display:block}
.y-pick-opt input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.y-pick-opt input + span{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border:1.5px solid var(--k);border-radius:0;font-size:13px;font-weight:600;line-height:1;transition:background .18s,color .18s}
.y-pick-opt del{font-weight:400;opacity:.6}
.y-pick-opt ins{text-decoration:none}
.y-pick-opt input:hover + span{background:var(--bone)}
.y-pick-opt input:checked + span{background:var(--k);color:var(--y)}
.y-pick-opt input:focus-visible + span{outline:2px solid var(--k);outline-offset:3px}
.y-pick-msg{min-height:1.4em;margin:14px 0 0;font-size:12.5px;line-height:1.4;color:var(--sale);text-align:center}
dialog.y-pick .y-pick-add,dialog.y-pick .y-pick-more{display:flex;align-items:center;justify-content:center;width:max-content;min-height:46px;margin:8px auto 0;padding:0 32px;border:1.5px solid var(--k);border-radius:999px;background:var(--k);color:var(--y);font-size:11.5px;font-weight:700;letter-spacing:.14em;line-height:1;text-decoration:none;text-transform:uppercase;transition:background .18s,color .18s,opacity .18s}
dialog.y-pick .y-pick-add:hover{background:var(--k-2);color:var(--y)}
dialog.y-pick .y-pick-add:disabled{opacity:.35;cursor:not-allowed}
dialog.y-pick .y-pick-add.loading{opacity:.6;cursor:progress}
dialog.y-pick .y-pick-more{background:transparent;color:var(--k)}
dialog.y-pick .y-pick-more:hover{background:var(--k);color:var(--y)}
.y-pick-done{padding:14px 0 4px;text-align:center}
.y-pick-ok{margin:0 0 20px;font-size:16px;font-weight:600}
.y-pick-row{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
.y-pick-row .y-pick-add,.y-pick-row .y-pick-more{margin:0}
@media (max-width:640px){
  dialog.y-pick{width:100%;max-width:none;max-height:88dvh;margin:auto 0 0}
  .y-pick-box{padding:24px 18px calc(22px + env(safe-area-inset-bottom))}
}
.opt-m4 ul.products li.y-cell-w a.added_to_cart{align-self:center;margin-top:8px;font-size:12px;font-weight:600;text-decoration:underline;text-underline-offset:3px}

/* ---------- category page ---------- */
.cat{--pad:clamp(16px,4vw,56px);padding-bottom:88px}
/* banner masthead: collection imagery on the left, name + description centred */
.c-mast{position:relative;display:grid;grid-template-columns:43% 57%;align-items:center;
  aspect-ratio:1856/576;max-height:460px;min-height:300px;overflow:hidden;isolation:isolate;text-align:center}
.c-mast-photo{position:absolute;inset:0;z-index:-1}
.c-mast-photo img{width:100%;height:100%;object-fit:cover;object-position:0% 50%}
.c-mast-copy{grid-column:2;padding:clamp(20px,3vw,40px) clamp(16px,3vw,48px);max-width:560px;margin-inline:auto}
.c-mast h1{margin-top:0;line-height:1.04;font-size:clamp(38px,5.6vw,80px);font-weight:500;letter-spacing:.015em;text-transform:uppercase}
.c-lead{margin:18px auto 0;max-width:62ch;font-size:16px;line-height:1.7}
.c-lead p{margin:0}
.c-notices{max-width:1240px;margin:20px auto 0;padding:0 var(--pad)}
.c-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:1240px;margin:30px auto 22px;padding:0 var(--pad)}
.c-bar .woocommerce-result-count{margin:0;font-size:13px;color:var(--grey)}
.c-bar .woocommerce-ordering{margin:0}
.c-bar select.orderby{appearance:auto;border:0;background:transparent;padding:6px 4px;font-size:13px;color:var(--k);cursor:pointer}
.cat ul.products.y-grid{max-width:1240px;margin-inline:auto;padding:0 var(--pad);row-gap:44px}
.c-empty{max-width:1240px;margin:56px auto;padding:0 var(--pad);text-align:center}
.cat .woocommerce-pagination{margin:54px auto 0}
.cat .woocommerce-pagination ul.page-numbers{display:flex;justify-content:center;align-items:center;gap:26px;border:0;margin:0;padding:0;list-style:none}
.cat .woocommerce-pagination ul.page-numbers li{border:0;margin:0;padding:0;float:none;overflow:visible}
.cat .woocommerce-pagination .page-numbers a,.cat .woocommerce-pagination .page-numbers span{display:grid;place-items:center;min-width:12px;height:26px;
  padding:0;background:none;font-size:14px;color:var(--grey);font-variant-numeric:tabular-nums}
.cat .woocommerce-pagination .page-numbers a:hover{color:var(--k);background:none}
.cat .woocommerce-pagination .page-numbers .current{color:var(--k);font-weight:600;box-shadow:inset 0 -1.5px 0 var(--k);background:none}

/* mood: For Him (night) */
.cat--him .c-mast{color:#fff;background:linear-gradient(0deg,#000 0%,#121214 24%,#34343A 56%,#5E5E67 80%,#8C8C95 100%)}
/* the supplied photo fades to flat black on its own; mask it off so the band's gradient shows instead */
.cat--him .c-mast-photo img{-webkit-mask-image:linear-gradient(90deg,#000 0%,#000 30%,transparent 58%);mask-image:linear-gradient(90deg,#000 0%,#000 30%,transparent 58%)}
.cat--him .c-lead{color:#C9C7C1;font-weight:300}
.cat--him .y-cell-n{letter-spacing:.1em;font-weight:600}

/* mood: For Her (light) */
.cat--her .c-mast{background:linear-gradient(180deg,#FDF8D0 0%,#FFF1A8 45%,#FBE764 100%)}
.cat--her .c-lead{color:var(--k-2);font-weight:300;max-width:52ch}
.cat--her ul.products.y-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:48px 26px;max-width:1040px}
.cat--her .y-cell-n{font-weight:500;letter-spacing:.08em}

/* mood: Merchandise (bone). The band lines the pieces up, shot on white and multiplied onto the bone ground. */
.cat--merch .c-mast{background:linear-gradient(180deg,#FFFDF4 0%,#F8F4E8 54%,#EDE8D8 100%)}
.cat--merch .c-mast-photo{position:relative;inset:auto;z-index:auto;grid-column:1;display:flex;align-items:center;justify-content:center;
  gap:clamp(0px,.6vw,10px);height:100%;padding:clamp(6px,1.2vw,16px) 0 clamp(6px,1.2vw,16px) clamp(4px,1.4vw,22px)}
.cat--merch .c-mast-photo img{flex:1 1 0;min-width:0;width:auto;height:auto;max-height:100%;object-fit:contain;mix-blend-mode:multiply}
.cat--merch .c-mast-photo img:first-child{flex-grow:1.32}
.cat--merch .c-mast-photo img:last-child{flex-grow:.86}
.cat--merch .c-lead{color:var(--k-2);font-weight:300;max-width:52ch}

/* mood: any other category, the shop root, search. No photo: a centred bone band with the name. */
.cat--plain .c-mast{display:block;aspect-ratio:auto;max-height:none;min-height:0;background:linear-gradient(180deg,#FFFDF4 0%,#F8F4E8 54%,#EDE8D8 100%)}
.cat--plain .c-mast-copy{max-width:760px;padding:clamp(34px,4.4vw,64px) var(--pad)}
.cat--plain .c-mast h1{font-size:clamp(34px,4.6vw,64px)}
.cat--plain .c-lead{color:var(--k-2);font-weight:300;max-width:56ch}

/* size pills over the photo (Shop Kit): bottom centre, square boxes like the approved mockup.
   The plugin already pins them bottom centre (qav-sizes--bottom-center); only the box size is set here. */
/* WooCommerce's list margin (1em, ".woocommerce .products ul") sat under the row and pushed it up; the plugin's own negative margin is put back */
.opt-m4 .y-cell-img .qav-sizes{margin-bottom:calc(var(--qav-pill-gap) * -1)}
.y-cell-img .qav-size{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:34px;font-weight:700;letter-spacing:.04em;line-height:1}
/* a sale with a countdown owns the bottom of the photo, so the sizes sit just above it */
.y-cell-img:has(.archive-countdown-wrapper) .qav-sizes{bottom:calc(var(--qav-inset) + 52px)}

/* Clickable sizes on a variable product's tile (emajie_card_sizes(), assets/shop.js): square boxes with a 1px ink border, at the
   bottom centre of the photo (Ain, 29 Oct 2026: "center bottom of the product image, not top left"). The row is a sibling of the
   tile's link, so it is an overlay the size of the photo (the photo is always square) with its boxes pushed to the bottom centre;
   the overlay lets taps through to the link and only the buttons take them. Shop Kit's decorative pills (and their screen-reader
   sentence) are hidden. A little larger than the mockup's 26x22 boxes so a finger or mouse can hit them. A sale with a countdown
   owns the bottom of the photo, so the boxes sit just above it, like Shop Kit's own pills do. */
.y-cell-w:has(.y-sizes) .qav-sizes,.y-cell-w:has(.y-sizes) .qav-sr{display:none}
.y-sizes{position:absolute;top:var(--y-img-gap);left:0;z-index:4;box-sizing:border-box;display:flex;flex-wrap:wrap;align-content:flex-end;justify-content:center;gap:4px;width:100%;aspect-ratio:1/1;padding:0 10px 14px;pointer-events:none}
.y-cell-w:has(.archive-countdown-wrapper) .y-sizes{padding-bottom:66px}
.opt-m4 .y-sizes .y-size{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;min-width:30px;min-height:26px;padding:0 7px;border:1px solid var(--k);border-radius:0;background:rgba(255,255,255,.94);color:var(--k);font-family:inherit;font-size:11px;font-weight:600;letter-spacing:.04em;line-height:1;font-variant-numeric:tabular-nums;cursor:pointer;transition:background .18s,color .18s}
.opt-m4 .y-sizes .y-size:hover{background:var(--bone);color:var(--k)}
.opt-m4 .y-sizes .y-size[aria-pressed=true]{background:var(--k);color:var(--y)}
.opt-m4 .y-sizes .y-size:focus-visible{outline:2px solid var(--k);outline-offset:2px;box-shadow:0 0 0 4px #fff}

@media (max-width:900px){
  .y-grid,ul.products.y-grid{grid-template-columns:1fr 1fr;gap:26px 10px}
  .y-cell-n{font-size:12.5px}
  .opt-m4 ul.products li.y-cell-w .y-cell-add.button{min-height:36px;padding:0 16px;font-size:10.5px;letter-spacing:.1em}
  .c-mast{display:block;aspect-ratio:auto;max-height:none;min-height:0}
  .c-mast-photo{position:static;height:300px}
  .cat--him .c-mast-photo img{object-position:4% 50%;-webkit-mask-image:none;mask-image:none}
  .cat--her .c-mast-photo img{object-position:0% 50%}
  .cat--her .c-mast{background:#FBE764}
  .c-mast-copy{padding:26px 20px 32px;max-width:none}
  .c-lead{font-size:14.5px;margin-top:14px}
  .c-mast h1{font-size:38px}
  .c-bar{margin:20px auto 16px;padding:0 16px}
  .c-bar .woocommerce-result-count{font-size:12px}
  .cat ul.products.y-grid,.cat--her ul.products.y-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:30px 10px;padding-inline:16px}
  .cat--merch .c-mast-photo{height:215px;padding:14px 10px}
  .y-cell-img .onsale,.y-cell-img .qav-soldout{top:7px;right:7px;font-size:10.5px;padding:3px 7px}
  .y-cell-img{--qav-inset:8px;--qav-pill-gap:4px;--qav-pill-pad:0 6px;--qav-pill-font:11px}
  .y-cell-img .qav-size{min-width:32px;min-height:28px}
  .y-cell-img:has(.archive-countdown-wrapper) .qav-sizes{bottom:calc(var(--qav-inset) + 46px)}
  .y-sizes{gap:2px;padding:0 8px 8px}
  .y-cell-w:has(.archive-countdown-wrapper) .y-sizes{padding-bottom:54px}
  .opt-m4 .y-sizes .y-size{min-width:28px;min-height:28px;padding:0 5px;font-size:10px}
  .y-cell-img .archive-countdown-wrapper{left:5px;right:5px;bottom:5px}
  .y-cell-img .archive-countdown-wrapper .wc-sale-countdown{padding:5px 6px;gap:6px}
  .y-cell-img .archive-countdown-wrapper .countdown-label{font-size:7.5px;letter-spacing:.1em}
  .y-cell-img .archive-countdown-wrapper .countdown-num{font-size:11px}
  .y-cell-img .archive-countdown-wrapper .countdown-txt{font-size:6px}
  .y-cell-p del{font-size:11.5px}
  .cat{padding-bottom:56px}
  .cat .woocommerce-pagination{margin-top:34px}
  .cat .woocommerce-pagination ul.page-numbers{gap:20px}
}
