/* =====================================
   ARABIAN MUSK | LUXURY PRODUCT CARDS
   Arch Shape + Elegant Golden Trace
   Version: Refined Gold Animation
===================================== */

:root {
  --am-gold: #c9a46a;
  --am-dark-gold: #9d713b;
  --am-black: #111111;
  --am-white: #ffffff;
}

/* =====================================
   1. MAIN PRODUCT CARD
===================================== */

:is(
  .s-product-card-entry.s-product-card-vertical,
  .product-entry,
  .product-card
) {

  --am-arch: 50% 50% 18px 18px /
             22% 22% 18px 18px;

  position: relative !important;
  display: flex !important;
  flex-direction: column !important;

  background: var(--am-white) !important;

  border: 1px solid rgba(201,164,106,.35) !important;

  border-radius: var(--am-arch) !important;

  overflow: hidden !important;
  isolation: isolate;
  height: 100%;

  box-shadow: 0 5px 18px rgba(0,0,0,.035);

  transition:
    box-shadow .4s ease,
    transform .4s ease;
}

/* =====================================
   2. GOLDEN BORDER ANIMATION
   Single Gold Color | Thickness 1.5px
===================================== */

@property --am-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:is(
  .s-product-card-entry.s-product-card-vertical,
  .product-entry,
  .product-card
)::before {

  content: "";
  position: absolute;
  inset: 0;

  /* Refined golden line thickness */
  padding: 1.5px !important;

  border-radius: inherit;

  /* Single golden color */
  background: conic-gradient(
    from var(--am-angle),
    transparent 0deg 330deg,
    #c9a46a 330deg 360deg
  ) !important;

  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);

  -webkit-mask-composite: xor;

  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);

  mask-composite: exclude;

  opacity: 0;
  pointer-events: none;
  z-index: 5;

  animation: none;
}

/* =====================================
   3. HOVER EFFECT ONLY
===================================== */

@media (hover: hover) and (pointer: fine) {

  :is(
    .s-product-card-entry.s-product-card-vertical,
    .product-entry,
    .product-card
  ):hover {

    transform: translateY(-5px);

    box-shadow:
      0 14px 28px rgba(0,0,0,.09);
  }

  /* Start border animation on hover */

  :is(
    .s-product-card-entry.s-product-card-vertical,
    .product-entry,
    .product-card
  ):hover::before {

    animation:
      amGoldenTrace 1.9s linear infinite !important;
  }
}

/* =====================================
   4. START -> END -> RESTART
===================================== */

@keyframes amGoldenTrace {

  0% {
    --am-angle: 0deg;
    opacity: 0;
  }

  3% {
    opacity: 1;
  }

  /* Complete golden line movement */

  74% {
    --am-angle: 360deg;
    opacity: 1;
  }

  /* Clear ending */

  76% {
    --am-angle: 360deg;
    opacity: 0;
  }

  /* Short pause before restarting */

  100% {
    --am-angle: 360deg;
    opacity: 0;
  }
}

/* =====================================
   5. PRODUCT IMAGE
===================================== */

.s-product-card-entry .s-product-card-image,
.product-entry .product-entry__image,
.product-card .product-card__image {

  height: clamp(210px, 23vw, 350px);
  background: #ffffff !important;
  overflow: hidden;
  padding-top: 18px;
  box-sizing: border-box;
}

.s-product-card-entry .s-product-card-image a {
  display: block;
  height: 100%;
}

.s-product-card-entry .s-product-card-image img,
.product-entry .product-entry__image img,
.product-card .product-card__image img {

  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;

  padding: 18px 14px 5px;
  box-sizing: border-box;

  transition: transform .5s ease;
}

@media (hover: hover) {

  .s-product-card-entry:hover
  .s-product-card-image img {

    transform: scale(1.045);
  }
}

/* =====================================
   6. CARD CONTENT
===================================== */

.s-product-card-entry .s-product-card-content,
.product-entry .product-entry__content {

  display: flex !important;
  flex-direction: column !important;
  flex: 1;

  background: white !important;
  text-align: center !important;

  padding: 12px 14px 16px !important;
}

.s-product-card-content-title,
.product-entry__title {

  text-align: center !important;
  font-weight: 700 !important;
  line-height: 1.6 !important;

  margin-bottom: 8px !important;
}

.s-product-card-content-sub {

  justify-content: center !important;
  text-align: center !important;
}

/* =====================================
   7. PRODUCT PRICE
===================================== */

.s-product-card-price,
.s-product-card-sale-price,
.product-entry__price {

  color: var(--am-dark-gold) !important;
  font-weight: 700 !important;
}

/* =====================================
   8. ADD TO CART FOOTER
===================================== */

.s-product-card-content-footer {

  margin-top: auto !important;
  padding-top: 15px !important;
  width: 100% !important;
}

.s-product-card-content-footer
salla-add-product-button {

  display: block !important;
  width: 100% !important;
}

.s-product-card-content-footer
salla-add-product-button
:is(button, .s-button-btn, .s-button-element) {

  background: var(--am-black) !important;
  color: #ffffff !important;

  border: 1px solid var(--am-black) !important;
  border-radius: 999px !important;

  width: 100% !important;
  min-height: 46px !important;

  font-weight: 600 !important;

  transition: all .3s ease !important;
}

/* =====================================
   9. BUTTON HOVER
===================================== */

@media (hover: hover) {

  .s-product-card-content-footer
  salla-add-product-button
  :is(
    button,
    .s-button-btn,
    .s-button-element
  ):hover {

    background: var(--am-dark-gold) !important;
    border-color: var(--am-dark-gold) !important;
    color: #ffffff !important;
  }
}

/* =====================================
   10. MOBILE OPTIMIZATION
===================================== */

@media (max-width: 767px) {

  :is(
    .s-product-card-entry.s-product-card-vertical,
    .product-entry,
    .product-card
  ) {

    --am-arch: 50% 50% 13px 13px /
               20% 20% 13px 13px;
  }

  .s-product-card-entry .s-product-card-image,
  .product-entry .product-entry__image,
  .product-card .product-card__image {

    height: 175px;
    padding-top: 12px;
  }

  .s-product-card-entry
  .s-product-card-image img {

    padding: 15px 8px 2px;
  }

  .s-product-card-entry
  .s-product-card-content {

    padding: 10px 9px 12px !important;
  }

  .s-product-card-content-title {

    font-size: 13px !important;
  }

  .s-product-card-content-footer
  salla-add-product-button
  :is(
    button,
    .s-button-btn,
    .s-button-element
  ) {

    min-height: 40px !important;
    font-size: 12px !important;
  }
}

/* =====================================
   11. ACCESSIBILITY
===================================== */

@media (prefers-reduced-motion: reduce) {

  .s-product-card-entry,
  .s-product-card-entry::before,
  .s-product-card-entry img {

    animation: none !important;
    transition: none !important;
  }
}