/* NES Phase 2.16C — Storefront Product Card + Design System Foundation */
.nes-storefront{
  display:grid;
  gap:14px;
}

.nes-store-hero{
  background:linear-gradient(135deg,#07111d 0%,#102033 54%,#173451 100%);
  color:#fff;
  padding:26px 34px;
  border-radius:0;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(280px,.92fr);
  gap:28px;
  align-items:center;
  overflow:hidden;
  position:relative;
}

.nes-store-hero::after{
  content:"";
  position:absolute;
  inset:auto -90px -130px auto;
  width:320px;
  height:320px;
  border-radius:50%;
  background:rgba(255,210,31,.12);
  pointer-events:none;
}

.nes-store-eyebrow,
.nes-section-kicker{
  color:#64748b;
  font-size:13px;
  font-weight:800;
  margin-bottom:4px;
}

.nes-store-eyebrow{
  color:#ffd21f;
  margin-bottom:8px;
}

.nes-store-hero__title{
  margin:0 0 12px;
  font-size:34px;
  line-height:1.22;
  letter-spacing:-.2px;
}

.nes-store-hero__title span{color:#ffd21f}

.nes-store-hero__text{
  margin:0;
  color:#dbe6f3;
  font-size:15px;
  line-height:1.9;
  max-width:620px;
}

.nes-store-hero__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.nes-store-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 22px;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:800;
  text-decoration:none;
  line-height:1.2;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.nes-store-btn:hover{transform:translateY(-1px)}
.nes-store-btn--primary{background:#ffd21f;color:#111;border-color:#f5c400}
.nes-store-btn--secondary{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.28)}
.nes-store-btn--dark{background:#111827;color:#fff;border-color:#111827;width:100%}

.nes-store-hero__visual{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:12px;
  position:relative;
  z-index:1;
}

.nes-store-hero__visual span{
  min-height:58px;
  border-radius:15px;
  background:#fff;
  color:#14253a;
  display:grid;
  place-items:center;
  font-size:15px;
  font-weight:900;
  box-shadow:0 12px 24px rgba(0,0,0,.22);
}

.nes-benefits-strip{
  background:#fff;
  border:1px solid #d9e0e6;
  border-radius:16px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  overflow:hidden;
  margin-bottom:10px;
}

.nes-benefit-card{
  padding:12px 14px;
  border-left:1px solid #edf0f3;
  display:flex;
  gap:12px;
  align-items:center;
}

.nes-benefit-card:last-child{border-left:0}

.nes-benefit-card__icon{
  width:36px;
  height:36px;
  flex:0 0 36px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  display:grid;
  place-items:center;
  font-size:19px;
}

.nes-benefit-card strong,
.nes-benefit-card small{display:block}
.nes-benefit-card small{color:#64748b;margin-top:3px}

.nes-category-strip,
.nes-products-heading,
.nes-empty-state{
  background:#fff;
  border:1px solid #d9e0e6;
  border-radius:16px;
}

.nes-category-strip{padding:12px;margin-bottom:8px}

.nes-section-head,
.nes-products-heading{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.nes-section-head{margin-bottom:14px}
.nes-section-head h2,
.nes-products-heading h2{margin:0;font-size:22px}
.nes-section-head a{color:#2563eb;text-decoration:none;font-weight:800}

.nes-category-grid{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:10px;
}

.nes-category-grid a{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:12px;
  text-decoration:none;
  color:#111;
  display:grid;
  gap:6px;
  min-height:72px;
  transition:background .12s ease, border-color .12s ease, transform .12s ease;
}

.nes-category-grid a:hover{
  background:#fff;
  border-color:#cbd5e1;
  transform:translateY(-1px);
}

.nes-category-grid small{color:#64748b}

.nes-products-heading{
  padding:14px 18px;
  margin-bottom:10px;
}

.nes-products-heading__note{color:#64748b;font-size:13px}
.nes-empty-state{padding:20px;color:#334155}

.nes-product-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(285px,360px));
  gap:18px;
  justify-content:start;
  align-items:stretch;
}

.nes-product-card{
  background:#fff;
  border:1px solid #d5d9d9;
  border-radius:18px;
  display:grid;
  grid-template-rows:auto 1fr auto;
  overflow:hidden;
  box-shadow:0 1px 2px rgba(15,17,17,.06);
  min-height:100%;
  transition:box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}

.nes-product-card:hover{
  transform:translateY(-2px);
  border-color:#c4c9c9;
  box-shadow:0 8px 22px rgba(15,17,17,.10);
}

.nes-product-card__media{
  background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  border-bottom:1px solid #e5e7eb;
  min-height:172px;
  display:grid;
  place-items:center;
  gap:8px;
  padding:20px;
  color:#334155;
  text-align:center;
  text-decoration:none;
}

.nes-product-card__image-mark{
  width:96px;
  height:96px;
  border-radius:24px;
  background:#fff;
  border:1px solid #dbe2ea;
  display:grid;
  place-items:center;
  font-size:50px;
  line-height:1;
  color:#0f172a;
  box-shadow:0 10px 18px rgba(15,23,42,.08);
}

.nes-product-card__image-text{font-size:13px;color:#64748b}
.nes-product-card__body{padding:14px 16px 12px;display:grid;gap:9px}

.nes-product-card__meta{
  color:#64748b;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  font-size:13px;
}

.nes-product-card__title{font-size:18px;margin:0;line-height:1.5}
.nes-product-card__title a{color:#0f1111;text-decoration:none}
.nes-product-card__title a:hover{color:#2162a1;text-decoration:underline}

.nes-product-card__desc{
  margin:0;
  color:#475569;
  line-height:1.8;
  font-size:14px;
  min-height:50px;
}

.nes-product-card__badges{display:flex;flex-wrap:wrap;gap:8px;font-size:13px}

.nes-product-badge{
  border-radius:999px;
  padding:5px 10px;
  border:1px solid #ddd;
  background:#f8fafc;
  color:#334155;
  font-weight:700;
}

.nes-product-badge.is-in-stock{background:#ecfdf5;border-color:#bbf7d0;color:#047857}
.nes-product-badge.is-on-request{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.nes-product-badge.is-inquiry{background:#fff7ed;border-color:#fed7aa;color:#c2410c}
.nes-product-badge.is-coming-soon{background:#f8fafc;border-color:#cbd5e1;color:#475569}
.nes-product-badge.is-unavailable{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.nes-product-badge.is-variant-count{background:#f7f7f7;border-color:#ddd;color:#111827}

.nes-product-card__footer{
  border-top:1px solid #eef2f7;
  padding:13px 16px 15px;
  display:grid;
  gap:8px;
}

.nes-product-card__footer small{
  color:#64748b;
  text-align:center;
  font-size:12.5px;
  line-height:1.6;
}

@media (max-width: 1180px){
  .nes-store-hero{grid-template-columns:1fr}
  .nes-category-grid{grid-template-columns:repeat(3,1fr)}
}

@media (max-width: 820px){
  .nes-store-hero{padding:22px 18px}
  .nes-store-hero__title{font-size:28px}
  .nes-store-hero__visual{grid-template-columns:repeat(3,1fr)}
  .nes-benefits-strip{grid-template-columns:1fr 1fr}
  .nes-category-grid{grid-template-columns:1fr 1fr}
  .nes-products-heading{align-items:flex-start;flex-direction:column}
}

@media (max-width: 560px){
  .nes-store-hero__visual{grid-template-columns:repeat(2,1fr)}
  .nes-benefits-strip,
  .nes-category-grid{grid-template-columns:1fr}
  .nes-product-grid{grid-template-columns:1fr;justify-content:stretch}
}

/* NES PHASE 2.16C.1 PRODUCT SECTION FIX START */
/* Tighten the featured-products area after Phase 2.16C.
   This is CSS-only and intentionally avoids changing product/variant logic. */
#products,
.nes-products-section,
.nes-featured-products,
.nes-storefront-products {
    margin-top: 18px;
}

#products .nes-products-heading,
.nes-products-heading {
    margin-bottom: 14px;
}

.nes-products-grid,
.nes-product-grid,
.nes-storefront-products-grid,
.nes-featured-products-grid,
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
    gap: 18px;
    align-items: start;
    justify-content: end;
    min-height: 0 !important;
    margin-top: 0;
}

.nes-products-grid > *,
.nes-product-grid > *,
.nes-storefront-products-grid > *,
.nes-featured-products-grid > *,
.products-grid > * {
    min-width: 0;
}

.nes-product-card,
.nes-storefront-product-card,
.product-card {
    width: 100%;
    max-width: 320px;
    margin: 0;
}

.nes-product-card .nes-product-title,
.nes-storefront-product-card .nes-product-title,
.product-card .nes-product-title {
    line-height: 1.45;
}

.nes-product-card .nes-product-action,
.nes-storefront-product-card .nes-product-action,
.product-card .nes-product-action,
.nes-product-card a[href*="/catalog/product"],
.nes-storefront-product-card a[href*="/catalog/product"],
.product-card a[href*="/catalog/product"] {
    min-height: 44px;
}

@media (max-width: 768px) {
    .nes-products-grid,
    .nes-product-grid,
    .nes-storefront-products-grid,
    .nes-featured-products-grid,
    .products-grid {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .nes-product-card,
    .nes-storefront-product-card,
    .product-card {
        max-width: none;
    }
}
/* NES PHASE 2.16C.1 PRODUCT SECTION FIX END */


/* PHASE 2.16D.2 PRODUCT MEDIA REPAIR */
.nes-product-media,
.nes-product-card-media,
.nes-product-image-wrap {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 190px;
    overflow: hidden;
}

.nes-product-media img,
.nes-product-card-media img,
.nes-product-image-wrap img {
    display: block;
    width: 100%;
    max-width: 290px;
    height: 190px;
    object-fit: contain;
}


/* PHASE 2.16D.3 HOME CARD MEDIA PLACEMENT FIX */
.nes-product-card__media.phase2-16d3-media-index {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    overflow: hidden;
}

.nes-product-card__media.phase2-16d3-media-index img {
    display: block;
    width: 100%;
    max-width: 290px;
    height: 190px;
    object-fit: contain;
}


/* PHASE 2.16E.2 PRODUCT DETAILS VARIANTS SPLIT */
.phase2-16e2-product-details,.phase2-16e2-product-variants{direction:rtl}
.nes-store-btn--outline{background:#fff;border:1px solid #9bbcf3;color:#0b5ed7}
