/* EP Creations 365 - shop product card: full image (no crop) + image slider */

/* Image area: fixed 3:4 box so all cards line up, full image shown */
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__image{
  position:relative !important; aspect-ratio:3/4 !important; overflow:hidden !important;
  background:#f6f6f6 !important;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__image > a{
  display:block !important; width:100% !important; height:100% !important; overflow:hidden !important;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .ep-slide-track{
  display:flex; height:100%; transition:transform .3s ease; will-change:transform;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__image img{
  flex:0 0 100% !important; width:100% !important; height:100% !important; max-height:100% !important;
  object-fit:contain !important; object-position:center !important; transform:none !important;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card:hover .product-card__image img{ transform:none !important; }

/* Slider buttons: left and right, vertically centred */
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-slide-btn{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:28px; height:44px; padding:0; border:0; cursor:pointer;
  background:rgba(255,255,255,.88); color:#111; font-size:15px; line-height:1;
  box-shadow:0 1px 4px rgba(0,0,0,.15);
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-slide-prev{ left:0; border-radius:0 6px 6px 0; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-slide-next{ right:0; border-radius:6px 0 0 6px; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-slide-btn:hover{ background:#fff; color:#D4AF37; }

/* Brand / title / price blocks */
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__brand{
  text-align:center !important; width:100% !important;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__price{
  justify-content:center !important; text-align:center !important; width:100% !important;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__body{ gap:4px !important; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__body h3{
  display:-webkit-box !important; -webkit-box-orient:vertical !important;
  -webkit-line-clamp:3 !important; line-clamp:3 !important; overflow:hidden !important;
  min-height:3.9em !important; /* 3 lines, keeps every card the same height */
}

@media (max-width:768px){
  :is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-slide-btn{ width:24px; height:36px; font-size:12px; }
}

/* ---- Size chips (under brand) ---- */
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-sizes{
  display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:4px 0 6px;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-size-chip{
  min-width:34px; height:28px; padding:0 8px; border:1px solid #d9d9d9; border-radius:6px;
  background:#fff; color:#222; font-size:.72rem; font-weight:600; line-height:1; cursor:pointer;
  transition:all .15s ease;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-size-chip:hover:not(:disabled){ border-color:#D4AF37; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-size-chip.is-active{ background:#1a1a1a; border-color:#1a1a1a; color:#fff; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-size-chip:disabled{
  opacity:.4; cursor:not-allowed; text-decoration:line-through; background:#f3f3f3;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-sizes.is-missing .ep-size-chip:not(:disabled){
  border-color:#be123c; animation:epShake .35s;
}
@keyframes epShake{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}

/* ---- Add to Cart button (under price) ---- */
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-addcart-btn{
  width:100%; margin-top:8px; height:40px; border:0; border-radius:8px;
  background:#1a1a1a; color:#fff; font-size:.78rem; font-weight:700;
  letter-spacing:.08em; text-transform:uppercase; cursor:pointer; transition:background .2s ease;
}
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-addcart-btn:not(.is-ready){ opacity:.7; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-addcart-btn:hover{ background:#D4AF37; color:#1a1a1a; }
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-addcart-btn.is-added{ background:#15803d; color:#fff; }

/* toast */
.ep-toast{
  position:fixed; left:50%; bottom:90px; transform:translateX(-50%); z-index:99999;
  background:#1a1a1a; color:#fff; padding:10px 18px; border-radius:999px; font-size:.85rem;
  box-shadow:0 6px 20px rgba(0,0,0,.25); max-width:90vw; text-align:center;
}
.ep-toast.is-error{ background:#be123c; }

@media (max-width:768px){
  :is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-sizes{ gap:4px; }
  :is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-size-chip{ min-width:30px; height:26px; padding:0 6px; font-size:.68rem; }
  :is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .ep-addcart-btn{ height:36px; font-size:.7rem; letter-spacing:.05em; }
}

/* "You May Also Like" on the product page: same look as the shop page */
body.product-page .related-products-grid .product-card__body h3 a{
  color:#1a1a1a !important; text-decoration:none !important;
}
body.product-page .related-products-grid .product-card__body h3 a:hover{ color:#8a6f1f !important; }

/* Product title centred (shop page + "You May Also Like") */
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__body h3,
:is(body.shop-page #productsGrid, body.product-page .related-products-grid, body.ep-store #epLatestGrid, body.womens-page #womensProductsGrid) .product-card .product-card__body h3 a{
  text-align:center !important;
}