/* ============================================================
   LACE — Shop / Product archive
   Hero + product search rendered via woocommerce_before_shop_loop
   in integrations/woocommerce-shop.php. Clean cards, no hover.
   Responsive grid: 4-up desktop (tidy image size), 2-up on
   tablet/mobile (left + right).

   NOTE: a few !important rules below override WooCommerce core's
   `.columns-N li.product { width: % ; float: left }` defaults, which
   carry higher specificity than our grid rules.
   ============================================================ */

/* ---- Hero (full-bleed) ---- */
.shop-hero {
  position: relative;
  min-height: clamp(420px, 56vh, 620px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin: 0 0 var(--space-section);
  padding: clamp(150px, 16vw, 220px) clamp(24px, 5vw, 64px) clamp(56px, 7vw, 88px);
}
.shop-hero__media {
  position: absolute; inset: 0; z-index: 0;
  background: url('https://lovelivelace.com/wp-content/uploads/2026/05/ChatGPT-Image-May-13-2026-01_41_07-PM.webp') center 28% / cover no-repeat;
}
.shop-hero__scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(26,23,20,.55) 0%, rgba(26,23,20,.3) 45%, rgba(26,23,20,.6) 100%);
}
.shop-hero__inner { position: relative; z-index: 2; width: 100%; max-width: 760px; }
.shop-hero__eyebrow {
  display: block; font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase; color: rgba(254,252,250,.8); margin: 0 0 18px;
}
.shop-hero__title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(46px, 7vw, 92px);
  line-height: 1.02; letter-spacing: -0.015em; color: var(--warm-white); margin: 0;
}
.shop-hero__sub {
  font-family: var(--sans); font-size: clamp(14px, 1.4vw, 16px); line-height: 1.7;
  color: rgba(254,252,250,.82); margin: 18px auto 0; max-width: 440px;
}
.shop-search {
  display: flex; align-items: center; max-width: 440px; margin: 32px auto 0;
  background: rgba(254,252,250,.1); border: 1px solid rgba(254,252,250,.4);
}
.shop-search__input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  padding: 15px 18px; font-family: var(--sans); font-size: 14px; color: var(--warm-white);
}
.shop-search__input::placeholder { color: rgba(254,252,250,.65); }
.shop-search__btn {
  flex-shrink: 0; width: 52px; height: 52px; border: 0; cursor: pointer;
  background: var(--warm-white); color: var(--charcoal);
  display: inline-flex; align-items: center; justify-content: center;
}
.shop-search__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---- Notices ---- */
.woocommerce-page .woocommerce-notices-wrapper { padding: 0 clamp(20px, 4vw, 56px); margin: 0 0 24px; }
.woocommerce-page .woocommerce-notices-wrapper:empty { display: none; }

/* ---- Product grid: full width; 4-up desktop, 2-up tablet/mobile ---- */
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 1.8vw, 30px);
  width: 100%;
  margin: 0 0 var(--space-section);
  padding: 0 clamp(20px, 4vw, 56px);
  list-style: none;
}
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { content: none; display: none; }

/* ---- Product card (no hover) ---- */
.woocommerce-page ul.products li.product {
  width: 100% !important; margin: 0 !important; padding: 0 !important; float: none !important;
  list-style: none;
  display: flex; flex-direction: column;
  background: var(--warm-white);
  border: 1px solid var(--rule);
  overflow: hidden;
  text-align: left;
}
.woocommerce-page ul.products li.product .woocommerce-LoopProduct-link {
  display: block; text-decoration: none; color: var(--charcoal);
}
/* Media frame (4/5). Placeholder watermark only when no real image. */
.woocommerce-page ul.products li.product .woocommerce-LoopProduct-link::before {
  content: "L A C E"; display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 4 / 5;
  background: linear-gradient(150deg, var(--sand-light) 0%, var(--sand) 60%, var(--warm-grey) 100%);
  font-family: var(--serif); font-size: 14px; letter-spacing: 10px; color: rgba(26,23,20,.18);
}
.woocommerce-page ul.products li.product .woocommerce-LoopProduct-link:has(img:not([src*="woocommerce-placeholder"]))::before { display: none; }
.woocommerce-page ul.products li.product .woocommerce-LoopProduct-link img { display: none !important; }
.woocommerce-page ul.products li.product .woocommerce-LoopProduct-link img:not([src*="woocommerce-placeholder"]) {
  display: block !important; width: 100% !important; height: auto !important; aspect-ratio: 4 / 5; object-fit: cover !important; margin: 0 !important;
}
/* Card body */
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--serif) !important; font-weight: 500 !important; font-size: clamp(18px, 1.3vw, 22px) !important;
  color: var(--charcoal) !important; line-height: 1.3 !important; letter-spacing: 0 !important; text-transform: none !important;
  margin: 0 !important; padding: 16px 18px 0 !important; text-align: left !important;
}
.woocommerce-page ul.products li.product .price {
  font-family: var(--serif) !important; font-size: 17px !important; color: var(--burgundy) !important; font-weight: 400 !important;
  margin: 0 !important; padding: 5px 18px 0 !important; display: block;
}
.woocommerce-page ul.products li.product .price .amount,
.woocommerce-page ul.products li.product .price bdi { color: inherit !important; background: none !important; font: inherit !important; }
/* Button — simple, static (no hover) */
.woocommerce-page ul.products li.product .button,
.woocommerce-page ul.products li.product .add_to_cart_button {
  align-self: flex-start;
  display: inline-block; margin: 16px 18px 18px;
  background: transparent; color: var(--charcoal); border: 1px solid var(--charcoal);
  padding: 11px 22px; font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; text-decoration: none; border-radius: 0;
  white-space: nowrap;
}
.woocommerce-page ul.products li.product .added_to_cart { display: none; }

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .shop-hero__title { font-size: clamp(40px, 12vw, 56px); }
  .woocommerce-page ul.products { gap: 14px; padding: 0 16px; }
  .woocommerce-page ul.products li.product .woocommerce-loop-product__title { font-size: 16px !important; padding: 14px 14px 0 !important; }
  .woocommerce-page ul.products li.product .price { font-size: 15px !important; padding: 4px 14px 0 !important; }
  /* Full-width centered button so it never clips on narrow 2-up cards */
  .woocommerce-page ul.products li.product .button,
  .woocommerce-page ul.products li.product .add_to_cart_button {
    align-self: stretch; text-align: center; margin: 14px 14px 16px;
    padding: 12px 8px; letter-spacing: 1.5px; white-space: normal;
  }
}

/* ---- Dark look, matching the front page ---- */
body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat, body.tax-product_tag { background: #211e1a !important; }
body.woocommerce-shop main, body.post-type-archive-product main, body.tax-product_cat main, body.tax-product_tag main,
body.woocommerce-shop main article, body.woocommerce-shop .entry-content { background: transparent !important; }
.woocommerce-page ul.products { padding-top: clamp(8px, 2vw, 24px); padding-bottom: clamp(48px, 6vw, 88px); row-gap: clamp(36px, 4vw, 56px); }
.shop-hero { margin-bottom: clamp(40px, 5vw, 72px); }
.shop-hero__title { font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
.woocommerce-page .woocommerce-info { background: transparent !important; color: #f3ece4 !important; border-color: rgba(243,236,228,.25) !important; }

/* Wine Noir band under the grid: full width, like the front page */
.lace-shop-next { margin: 0 calc(50% - 50vw); padding-left: 20px; padding-right: 20px; }
.woocommerce-page ul.products + .lace-shop-next, .lace-shop-next { margin-top: 0; }
