/* Manha Global customer Product Card single-source presentation. */
/* Canonical surfaces: Home, Brand Products, Category Products, Search, Product Details Related. */

:root{
  --mg-customer-product-screen-side:10px;
  --mg-customer-product-grid-gap:7px;
  --mg-customer-product-card-border-width:1.5px;
  --mg-customer-product-card-padding:4px;
  --mg-customer-product-card-radius:24px;
  --mg-customer-product-card-inner-radius:18px;
  --mg-customer-product-media-radius:18px;
}

/* V158 Premium customer product cards inspired by Admin Access Management cards */
.home-product-card{
  width:100%;
  max-width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  border:var(--mg-customer-product-card-border-width) solid transparent;
  border-radius:var(--mg-customer-product-card-radius);
  padding:var(--mg-customer-product-card-padding);
  background:
    linear-gradient(rgba(255,255,255,.96),rgba(255,255,255,.91)) padding-box,
    conic-gradient(from 0deg,#ff7b00,#ff2f92,#2f6bff,#1ecb87,#ffd84d,#ff7b00) border-box;
  box-shadow:
    0 14px 28px rgba(38,25,75,.11),
    0 0 16px rgba(47,107,255,.13),
    0 0 22px rgba(255,47,146,.08);
  overflow:hidden;
  position:relative;
  cursor:pointer;
  isolation:isolate;
}

.home-product-card::after{
  content:"";
  position:absolute;
  inset:6px;
  border-radius:var(--mg-customer-product-card-inner-radius);
  background:
    radial-gradient(circle at 18% 20%,rgba(255,123,0,.10),transparent 46%),
    radial-gradient(circle at 84% 18%,rgba(47,107,255,.11),transparent 48%),
    radial-gradient(circle at 35% 90%,rgba(30,203,135,.09),transparent 48%),
    linear-gradient(160deg,rgba(255,255,255,.94),rgba(255,255,255,.88));
  z-index:-1;
}

.home-product-card .product-img{
  width:100%;
  height:auto !important;
  min-height:0;
  aspect-ratio:1/1;
  display:grid;
  place-items:center;
  border-radius:var(--mg-customer-product-media-radius);
  font-size:44px;
  background:
    radial-gradient(circle at 20% 20%,rgba(255,123,0,.13),transparent 42%),
    radial-gradient(circle at 82% 18%,rgba(47,107,255,.13),transparent 44%),
    linear-gradient(145deg,rgba(255,250,242,.94),rgba(255,241,248,.92),rgba(242,248,255,.94));
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.72),0 10px 22px rgba(17,24,39,.07);
  position:relative;
  overflow:hidden;
}

.home-product-card .product-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  display:block;
  position:relative;
  z-index:1;
}

.home-product-card .product-img.is-fallback{
  display:grid;
  place-items:center;
}

.home-product-card .product-img-fallback{
  font-size:46px;
  line-height:1;
  position:relative;
  z-index:1;
  filter:drop-shadow(0 0 10px rgba(47,107,255,.18));
}

.home-product-card .product-info{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  padding:9px 4px 2px;
  text-align:center;
}

.home-product-card .product-name{
  margin:0 auto;
  font-size:13.2px;
  font-weight:950;
  line-height:1.25;
  letter-spacing:-.01em;
  background:linear-gradient(90deg,#231814,#ff2f92,#2f6bff,#1ecb87,#231814);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:33px;
}

.home-product-card .product-price-strip{
  width:100%;
  margin-top:7px;
  padding:4px 6px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex-wrap:nowrap;
  white-space:nowrap;
  overflow:hidden;
  border-radius:999px;
  background:
    linear-gradient(rgba(255,255,255,.93),rgba(255,250,253,.90)) padding-box,
    linear-gradient(135deg,rgba(255,123,0,.46),rgba(255,47,146,.42),rgba(47,107,255,.38),rgba(30,203,135,.34)) border-box;
  border:1px solid transparent;
  box-shadow:0 7px 16px rgba(38,25,75,.07), inset 0 0 0 1px rgba(255,255,255,.62);
  box-sizing:border-box;
}

.home-product-card .price{
  min-width:0;
  font-size:14.5px;
  font-weight:950;
  color:#d81b60;
  text-shadow:none;
}

.home-product-card .old-price{
  min-width:0;
  font-size:10.5px;
  font-weight:800;
  color:#9aa2af;
  text-decoration:line-through;
}

.home-product-card .product-card-discount-text{
  min-width:0;
  font-size:10px;
  font-weight:950;
  color:#0d8a5b;
}

.home-product-card .product-card-status-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex-wrap:wrap;
  margin:6px auto 0;
  max-width:100%;
}

.home-product-card .product-card-status,
.home-product-card .product-card-sold-badge{
  width:max-content;
  max-width:100%;
  border-radius:999px;
  padding:4px 8px;
  font-size:10.6px;
  line-height:1.15;
  color:#485465;
  font-weight:850;
  background:linear-gradient(135deg,rgba(244,249,255,.92),rgba(244,255,250,.88));
  border:1px solid rgba(47,107,255,.13);
  box-shadow:0 5px 12px rgba(17,24,39,.045);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.home-product-card .product-card-status-available{
  color:#1d6d68;
  background:linear-gradient(135deg,rgba(236,249,255,.94),rgba(236,255,247,.90));
  border-color:rgba(30,158,137,.20);
}

.home-product-card .product-card-status-limited{
  color:#9a5615;
  background:linear-gradient(135deg,rgba(255,249,229,.96),rgba(255,241,224,.90));
  border-color:rgba(245,158,11,.24);
}

.home-product-card .product-card-status-out{
  color:#b42336;
  background:linear-gradient(135deg,rgba(255,242,244,.96),rgba(255,247,240,.90));
  border-color:rgba(244,63,94,.22);
}

.home-product-card .product-card-sold-badge{
  color:#5a3b9c;
  background:linear-gradient(135deg,rgba(247,244,255,.96),rgba(255,248,232,.92));
  border-color:rgba(124,58,237,.20);
  animation:none;
  transition:none;
  transform:none;
}

@media(max-width:430px){
  :root{
    --mg-customer-product-card-radius:22px;
    --mg-customer-product-card-inner-radius:17px;
    --mg-customer-product-media-radius:16px;
  }
  .home-product-card .product-name{ font-size:12.6px; }
  .home-product-card .price{ font-size:14px; }
  .home-product-card .product-price-strip{ gap:4px; padding:4px 5px; }
  .home-product-card .product-card-status,
  .home-product-card .product-card-sold-badge{ font-size:10px; padding:4px 7px; }
  .home-product-card .product-card-discount-text{ font-size:9.8px; }
}

@media (min-width:768px) and (hover:none), (min-width:768px) and (pointer:coarse){
  .home-product-card .product-img img{ object-position:center; }
}

/* =============================================================
   MANHA GLOBAL CUSTOMER PRODUCT CARD — SINGLE SOURCE GRID
   Home / Brand Products / Category Products / Search / Related
   ============================================================= */
#featuredProductGrid.product-grid,
#newArrivalGrid.product-grid,
#detailRelatedProductGrid.product-grid,
.brands-page #brandProductsSection:not([hidden]) .brand-products-list,
.categories-page #categoryProductsSection:not([hidden]) .category-products-list,
.search-page #searchResults.search-results{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:var(--mg-customer-product-grid-gap) !important;
  box-sizing:border-box !important;
  align-items:stretch !important;
}

#featuredProductGrid.product-grid > .home-product-card,
#newArrivalGrid.product-grid > .home-product-card,
#detailRelatedProductGrid.product-grid > .home-product-card,
.brands-page #brandProductsSection:not([hidden]) .brand-products-list > .home-product-card,
.categories-page #categoryProductsSection:not([hidden]) .category-products-list > .home-product-card,
.search-page #searchResults.search-results > .home-product-card{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}

@media (max-width:767px){
  #featuredProductGrid.product-grid,
  #newArrivalGrid.product-grid,
  #detailRelatedProductGrid.product-grid,
  .brands-page #brandProductsSection:not([hidden]) .brand-products-list,
  .categories-page #categoryProductsSection:not([hidden]) .category-products-list,
  .search-page #searchResults.search-results{
    width:100vw !important;
    max-width:100vw !important;
    margin-left:calc(50% - 50vw) !important;
    margin-right:calc(50% - 50vw) !important;
    padding-left:var(--mg-customer-product-screen-side) !important;
    padding-right:var(--mg-customer-product-screen-side) !important;
    gap:var(--mg-customer-product-grid-gap) !important;
  }
}

@media (min-width:768px){
  #featuredProductGrid.product-grid,
  #newArrivalGrid.product-grid,
  #detailRelatedProductGrid.product-grid,
  .brands-page #brandProductsSection:not([hidden]) .brand-products-list,
  .categories-page #categoryProductsSection:not([hidden]) .category-products-list,
  .search-page #searchResults.search-results{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:13px !important;
  }
}

@media (min-width:1024px){
  #featuredProductGrid.product-grid,
  #newArrivalGrid.product-grid,
  #detailRelatedProductGrid.product-grid,
  .brands-page #brandProductsSection:not([hidden]) .brand-products-list,
  .categories-page #categoryProductsSection:not([hidden]) .category-products-list,
  .search-page #searchResults.search-results{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    gap:14px !important;
  }
}

@media (min-width:1400px){
  #featuredProductGrid.product-grid,
  #newArrivalGrid.product-grid,
  #detailRelatedProductGrid.product-grid,
  .brands-page #brandProductsSection:not([hidden]) .brand-products-list,
  .categories-page #categoryProductsSection:not([hidden]) .category-products-list,
  .search-page #searchResults.search-results{
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:16px !important;
  }
}

@media (min-width:1600px){
  #featuredProductGrid.product-grid,
  #newArrivalGrid.product-grid,
  #detailRelatedProductGrid.product-grid,
  .brands-page #brandProductsSection:not([hidden]) .brand-products-list,
  .categories-page #categoryProductsSection:not([hidden]) .category-products-list,
  .search-page #searchResults.search-results{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  }
}

/* =============================================================
   BRAND PAGE SURFACE RHYTHM — MATCH HOME / PRODUCT GRID
   Removes the visual Brand-products wrapper layer and redundant UI header.
   Browser/device back navigation remains the page-level back mechanism.
   ============================================================= */
.brands-page{
  padding-top:8px !important;
  padding-left:10px !important;
  padding-right:10px !important;
}

.brands-page .mg-brand-page-banners{
  width:100% !important;
  max-width:100% !important;
  margin:0 0 8px !important;
  gap:8px !important;
}

.brands-page .brand-grid:not([hidden]){
  gap:7px !important;
  margin-top:0 !important;
}

.brands-page .brand-products-head{
  display:none !important;
}

.brands-page .brand-products,
.brands-page.is-brand-products-view .brand-products{
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:visible !important;
}

.brands-page.is-brand-products-view{
  padding-top:8px !important;
  padding-left:10px !important;
  padding-right:10px !important;
}

.brands-page.is-brand-products-view .brand-products-list{
  gap:var(--mg-customer-product-grid-gap) !important;
  overflow:visible !important;
}

@media (max-width:767px){
  .brands-page,
  .brands-page.is-brand-products-view{
    padding-top:8px !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }
}

/* =============================================================
   CATEGORY PAGE SURFACE RHYTHM — HOME-ALIGNED BANNER / 8PX CARDS
   Category intro copy is intentionally removed from the visual surface.
   Category selection cards keep their own design but share exact spacing.
   ============================================================= */
.categories-page{
  padding-top:8px !important;
  padding-left:10px !important;
  padding-right:10px !important;
}

.categories-page .categories-intro{
  display:none !important;
  margin:0 !important;
  padding:0 !important;
  height:0 !important;
  overflow:hidden !important;
}

.categories-page .mg-category-page-banners{
  width:100% !important;
  max-width:100% !important;
  margin:0 0 8px !important;
  gap:8px !important;
}

.categories-page .category-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  column-gap:8px !important;
  row-gap:8px !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:0 !important;
  box-sizing:border-box !important;
}

@media (max-width:767px){
  .categories-page{
    padding-top:8px !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .categories-page .category-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    column-gap:8px !important;
    row-gap:8px !important;
  }
}