/* Storefront footer stability + unified premium product cards — v11 */
html{
  min-height:100%;
}

body.storefront-foundation-v1{
  width:100%;
  min-height:100vh;
  min-height:100dvh;
}

body.storefront-foundation-v1 .site-main{
  flex:1 0 auto;
  min-height:1px;
}

body.storefront-foundation-v1 .site-main::after{
  content:"";
  display:table;
  clear:both;
}

body.storefront-foundation-v1 .site-footer{
  position:relative;
  z-index:1;
  flex:0 0 auto;
  width:100%;
  clear:both;
  margin-top:auto;
}

/* Shared card proportions */
body.storefront-foundation-v1 .home-v2-products,
body.storefront-foundation-v1 .catalog-v3-grid{
  align-items:stretch;
}

body.storefront-foundation-v1 .home-v2-product,
body.storefront-foundation-v1 .catalog-v3-card{
  position:relative;
  display:flex;
  min-width:0;
  height:100%;
  overflow:hidden;
  flex-direction:column;
  border:1px solid var(--ui-border);
  border-color:color-mix(in srgb,var(--ui-border) 84%,var(--ui-primary) 16%);
  border-radius:20px;
  background:var(--ui-surface);
  background:linear-gradient(180deg,var(--ui-surface) 0%,color-mix(in srgb,var(--ui-surface) 96%,var(--ui-primary) 4%) 100%);
  box-shadow:0 10px 30px rgba(15,23,42,.055);
  transition:transform 220ms cubic-bezier(.2,.75,.2,1),border-color 220ms ease,box-shadow 220ms ease;
}

body.storefront-foundation-v1 .home-v2-product::after,
body.storefront-foundation-v1 .catalog-v3-card::after{
  content:"";
  position:absolute;
  inset:auto 18px 0;
  height:2px;
  border-radius:999px 999px 0 0;
  background:var(--ui-primary);
  opacity:0;
  transform:scaleX(.35);
  transition:opacity 220ms ease,transform 220ms ease;
  pointer-events:none;
}

body.storefront-foundation-v1 .home-v2-product:hover,
body.storefront-foundation-v1 .catalog-v3-card:hover{
  transform:translateY(-5px);
  border-color:var(--ui-primary-border);
  border-color:color-mix(in srgb,var(--ui-primary) 34%,var(--ui-border));
  box-shadow:0 22px 52px rgba(15,23,42,.11);
}

body.storefront-foundation-v1 .home-v2-product:hover::after,
body.storefront-foundation-v1 .catalog-v3-card:hover::after{
  opacity:1;
  transform:scaleX(1);
}

/* Product media */
body.storefront-foundation-v1 .home-v2-product-media,
body.storefront-foundation-v1 .catalog-v3-media{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:4/3;
  overflow:hidden;
  border-bottom:1px solid var(--ui-border);
  background:linear-gradient(135deg,var(--ui-surface-muted),var(--ui-surface-subtle));
}

body.storefront-foundation-v1 .home-v2-product-media::after,
body.storefront-foundation-v1 .catalog-v3-media::after{
  content:"";
  position:absolute;
  inset:50% 0 0;
  background:linear-gradient(180deg,transparent,rgba(15,23,42,.10));
  pointer-events:none;
}

body.storefront-foundation-v1 .home-v2-product-media img,
body.storefront-foundation-v1 .catalog-v3-media img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform 440ms cubic-bezier(.2,.75,.2,1),filter 220ms ease;
}

body.storefront-foundation-v1 .home-v2-product:hover .home-v2-product-media img,
body.storefront-foundation-v1 .catalog-v3-card:hover .catalog-v3-media img{
  transform:scale(1.045);
  filter:saturate(1.04);
}

/* Floating badges */
body.storefront-foundation-v1 .home-v2-product-type,
body.storefront-foundation-v1 .home-v2-discount,
body.storefront-foundation-v1 .catalog-v3-type,
body.storefront-foundation-v1 .catalog-v3-discount{
  top:12px;
  z-index:2;
  min-height:26px;
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#273142;
  box-shadow:0 5px 18px rgba(15,23,42,.09);
  backdrop-filter:blur(10px);
  font-size:9px;
  font-weight:750;
  line-height:1;
  letter-spacing:.055em;
  text-transform:uppercase;
}

body.storefront-foundation-v1 .home-v2-product-type,
body.storefront-foundation-v1 .catalog-v3-type{left:12px}

body.storefront-foundation-v1 .home-v2-discount,
body.storefront-foundation-v1 .catalog-v3-discount{
  right:12px;
  border-color:transparent;
  background:var(--ui-primary);
  color:#fff;
}

html[data-theme="dark"] body.storefront-foundation-v1 .home-v2-product-type,
html[data-theme="dark"] body.storefront-foundation-v1 .catalog-v3-type{
  border-color:rgba(255,255,255,.12);
  background:rgba(20,24,31,.90);
  color:var(--ui-text);
}

/* Card content */
body.storefront-foundation-v1 .home-v2-product-body,
body.storefront-foundation-v1 .catalog-v3-card-body{
  display:flex;
  flex:1;
  flex-direction:column;
  padding:17px 17px 16px;
}

body.storefront-foundation-v1 .catalog-v3-meta{
  margin-bottom:8px;
  color:var(--ui-muted);
  font-size:9px;
  font-weight:700;
  letter-spacing:.065em;
}

body.storefront-foundation-v1 .home-v2-product h3,
body.storefront-foundation-v1 .catalog-v3-card h2{
  min-height:48px;
  margin:0;
  color:var(--ui-text);
  font-size:15px;
  font-weight:690;
  line-height:1.55;
  letter-spacing:-.015em;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

body.storefront-foundation-v1 .home-v2-product-bottom,
body.storefront-foundation-v1 .catalog-v3-card-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
  padding-top:17px;
}

body.storefront-foundation-v1 .home-v2-price,
body.storefront-foundation-v1 .catalog-v3-price{
  display:flex;
  min-width:0;
  align-items:baseline;
  flex-wrap:wrap;
  gap:6px;
}

body.storefront-foundation-v1 .home-v2-price strong,
body.storefront-foundation-v1 .catalog-v3-price strong{
  color:var(--ui-primary);
  font-size:19px;
  font-weight:760;
  line-height:1;
  letter-spacing:-.035em;
}

body.storefront-foundation-v1 .home-v2-price span,
body.storefront-foundation-v1 .catalog-v3-price del{
  color:var(--ui-muted);
  font-size:10px;
  font-weight:550;
  opacity:.82;
}

body.storefront-foundation-v1 .home-v2-open,
body.storefront-foundation-v1 .catalog-v3-card-open{
  width:auto;
  min-width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:0 0 auto;
  padding:0 11px;
  border:1px solid var(--ui-border);
  border-radius:11px;
  background:var(--ui-surface-subtle);
  color:var(--ui-text-soft);
  text-decoration:none;
  font-size:11px;
  font-weight:700;
  transition:background 180ms ease,border-color 180ms ease,color 180ms ease,transform 180ms ease;
}

body.storefront-foundation-v1 .home-v2-product:hover .home-v2-open,
body.storefront-foundation-v1 .catalog-v3-card:hover .catalog-v3-card-open{
  border-color:var(--ui-primary);
  background:var(--ui-primary);
  color:#fff;
  transform:translateX(1px);
}

@media(max-width:720px){
  body.storefront-foundation-v1 .home-v2-product,
  body.storefront-foundation-v1 .catalog-v3-card{border-radius:15px}

  body.storefront-foundation-v1 .home-v2-product-media,
  body.storefront-foundation-v1 .catalog-v3-media{aspect-ratio:1/1}

  body.storefront-foundation-v1 .home-v2-product-body,
  body.storefront-foundation-v1 .catalog-v3-card-body{padding:11px 11px 12px}

  body.storefront-foundation-v1 .home-v2-product h3,
  body.storefront-foundation-v1 .catalog-v3-card h2{min-height:42px;font-size:12.5px;line-height:1.58}

  body.storefront-foundation-v1 .home-v2-product-bottom,
  body.storefront-foundation-v1 .catalog-v3-card-bottom{gap:7px;padding-top:12px}

  body.storefront-foundation-v1 .home-v2-price strong,
  body.storefront-foundation-v1 .catalog-v3-price strong{font-size:15px}

  body.storefront-foundation-v1 .home-v2-open,
  body.storefront-foundation-v1 .catalog-v3-card-open{width:33px;min-width:33px;height:33px;padding:0;border-radius:9px}

  body.storefront-foundation-v1 .home-v2-open>span,
  body.storefront-foundation-v1 .catalog-v3-card-open>span{display:none}

  body.storefront-foundation-v1 .home-v2-product-type,
  body.storefront-foundation-v1 .home-v2-discount,
  body.storefront-foundation-v1 .catalog-v3-type,
  body.storefront-foundation-v1 .catalog-v3-discount{top:8px;min-height:22px;padding:4px 7px;font-size:8px}

  body.storefront-foundation-v1 .home-v2-product-type,
  body.storefront-foundation-v1 .catalog-v3-type{left:8px}

  body.storefront-foundation-v1 .home-v2-discount,
  body.storefront-foundation-v1 .catalog-v3-discount{right:8px}
}

@media(prefers-reduced-motion:reduce){
  body.storefront-foundation-v1 .home-v2-product,
  body.storefront-foundation-v1 .catalog-v3-card,
  body.storefront-foundation-v1 .home-v2-product-media img,
  body.storefront-foundation-v1 .catalog-v3-media img{transition:none}
}
