/* ==========================================================================
   product-card.css — Product card
   Product tiles in grids: image, badges, hover buttons, price, wishlist heart.
   Self-contained: every value is written out (no CSS variables) and every
   selector has its own rule, so changing one block never touches another.
   ========================================================================== */

/* ── .featured-section ── */
.featured-section {
  background: #f9f0fa;
}

/* ── .products-grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

/* ── .product-card ── */
.product-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #4a154b;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px #4a154b1f;
}

/* ── .product-img-wrap ── */
.product-img-wrap {
  position: relative;
  overflow: hidden;
  background: #f0e0f2;
}

.product-img-wrap img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  transition: transform 0.6s;
}

/* ── .product-card ── */
.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

/* ── .product-badge ── */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ffffff;
  color: #4a154b;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px #0000001a;
}

.product-badge.badge-new {
  background: #4a154b;
  color: #ffffff;
}

.product-badge.badge-sale {
  background: #4a154b;
  color: #ffffff;
}

/* ── .product-actions ── */
.product-actions {
  position: absolute;
  bottom: -65px; /* Moved further down so it is completely hidden when not hovering */
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(to top, #4a154bd9 0%, #00000000 100%);
  transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  gap: 8px;
}

/* ── .product-card ── */
.product-card:hover .product-actions {
  bottom: 0;
}

/* ── .btn-atc ── */
.btn-atc {
  flex: 1;
  background: #ffffff;
  color: #4a154b;
  border: 1px solid #4a154b;
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.3s cubic-bezier(0.4,0,0.2,1);
}

.btn-atc:hover {
  background: #f9f0fa;
}

/* ── .btn-wishlist ── */
.btn-wishlist {
  background: #ffffff;
  color: #4a154b;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #4a154b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.3s cubic-bezier(0.4,0,0.2,1);
}

.btn-wishlist:hover {
  background: #f9f0fa;
}

/* ── .product-info ── */
.product-info {
  padding: 6px 20px 18px;
}

/* ── .product-category ── */
.product-category {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #805b81;
  margin-bottom: 6px;
}

/* ── .product-category:empty ── */
.product-category:empty {
  display: none;
}

/* ── .product-name ── */
.product-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #4a154b;
  margin-bottom: 6px;
  line-height: 1.3;
  padding-top:6px;
}

/* ── .product-desc ── */
.product-desc {
  font-size: 0.82rem;
  color: #4a154bb2;
  margin-bottom: 12px;
}

/* ── .product-price ── */
.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── .price-current ── */
.price-current {
  font-size: 1.05rem;
  font-weight: 600;
  color: #4a154b;
}

/* ── .price-old ── */
.price-old {
  font-size: 0.88rem;
  color: #4a154bb2;
  text-decoration: line-through;
}

/* ── .price-save ── */
.price-save {
  font-size: 0.8rem;
  color: #F50A0A;
  font-weight: 600;
}

/* ── .wishlist-btn ── */
.wishlist-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 6px;
  transition: transform 0.2s;
  color: #805b81;
}

.wishlist-btn.wishlisted {
  color: #4a154b;
}

.wishlist-btn:hover {
  transform: scale(1.2);
}

/* ── .pimg-link ── */
.pimg-link {
  display: block;
}

.pimg-link img {
  width: 100%;
}

/* ── .product-info ── */
.product-info {
  display: block;
}

/* ── .product-badge ── */
.product-badge.badge-out {
  background: #805b81;
  color: #fff;
}

/* ── .btn-wishlist.on ── */
.btn-wishlist.on {
  color: #4a154b;
}

@media (hover: none) {
  /* ── .product-actions ── */
  .product-actions {
    bottom: 0;
  }
}

/* ── .product-detail-btns ── */
.product-detail-btns .wishlist-btn {
  border: 2px solid #4a154b;
  border-radius: 50px;
  color: #4a154b;
  font-size: 1.3rem;
  background: #00000000;
}

.product-detail-btns .wishlist-btn:hover {
  background: #4a154b;
  color: #fff;
  transform: none;
}

.product-detail-btns .wishlist-btn.on {
  background: #4a154b;
  color: #fff;
  transform: none;
}

/* ── .btn-atc ── */
.btn-atc.is-loading {
  opacity: .75;
  cursor: progress;
}

.btn-atc:hover {
  background: #4a154b;
  color: #fff;
}

.btn-atc:focus-visible {
  background: #4a154b;
  color: #fff;
}

/* ── .btn-wishlist:hover ── */
.btn-wishlist:hover {
  background: #4a154b;
  color: #ffffff;
}

.btn-wishlist.on {
  color: #4a154b;
}

.btn-wishlist.on:hover {
  background: #4a154b;
  color: #ffffff;
}

/* ── .wishlist-btn:hover ── */
.wishlist-btn:hover {
  color: #4a154b;
}

/* ── .product-info:hover ── */
.product-info:hover {
  color: inherit;
  text-decoration: none;
}

.product-info:hover .product-name {
  color: #805b81;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ── .pimg-link:hover ── */
.pimg-link:hover {
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════
   SALE TAG — hanging price tag ("40% Off") with an eyelet and a string
   that runs up to the corner of the card.
   ══════════════════════════════════════════════════════════════════ */

/*.sale-ribbon {*/
/*  position: absolute;*/
/*  top: 4px;*/
/*  right: 26px;*/
/*  width: 50px;*/
/*  height: 88px;*/
/*  box-sizing: border-box;*/
/*  padding-top: 16px;*/
/*  background: #4a154b;*/
/*  border-radius: 29px;*/
/*  transform: rotate(45deg);*/
/*  transform-origin: center;*/
/*  z-index: 3;*/
/*  pointer-events: none;*/
/*  display: flex;*/
/*  align-items: center;*/
/*  justify-content: center;*/
/*  box-shadow: 0 5px 12px #4a154b59;*/
/*}*/

/*.sale-ribbon::before {*/
/*  content: "";*/
/*  position: absolute;*/
/*  top: 9px;*/
/*  left: 50%;*/
/*  width: 11px;*/
/*  height: 11px;*/
/*  margin-left: -5.5px;*/
/*  box-sizing: border-box;*/
/*  background: #ffffff;*/
/*  border: 2px solid #c9b3cc;*/
/*  border-radius: 50%;*/
/*}*/

/*.sale-ribbon::after {*/
/*  content: "";*/
/*  position: absolute;*/
/*  bottom: 100%;*/
/*  left: 50%;*/
/*  width: 2px;*/
/*  height: 90px;*/
/*  margin-left: -1px;*/
/*  margin-bottom: -12px;*/
/*  background: linear-gradient(to top, #a58aa8, #d9c7dc);*/
/*  border-radius: 2px;*/
/*}*/

/*.sale-ribbon-text {*/
/*  display: block;*/
/*  transform: rotate(-90deg);*/
/*  white-space: nowrap;*/
/*  text-align: center;*/
/*  color: #ffffff;*/
/*  font-family: "Jost", sans-serif;*/
/*  font-weight: 600;*/
/*  font-size: 1.2rem;*/
/*  line-height: 1.05;*/
/*  letter-spacing: 0.02em;*/
/*  text-transform: none;*/
/*}*/

/*.sale-ribbon-text small {*/
/*  display: block;*/
/*  font-size: 1.05rem;*/
/*  font-weight: 700;*/
/*  letter-spacing: 0.04em;*/
/*}*/

/* ══ SALE RIBBON — swallowtail tag, top-right ══ */

.sale-ribbon {
  position: absolute;
  top: 0;
  left:0px;
  z-index: 5;
  box-sizing: border-box;
  width: 52px;
  height: 70px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #4a154b;
  border-radius: 0 0 2px 2px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 11px), 0 100%);
  pointer-events: none;
}

.sale-ribbon::before,
.sale-ribbon::after {
  display: none;
}

.sale-ribbon-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
  text-align: center;
  color: #ffffff;
  font-family: "Jost", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.sale-ribbon-text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .sale-ribbon {
    right: 10px;
    width: 46px;
    height: 62px;
    padding-bottom: 10px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 9px), 0 100%);
  }

  .sale-ribbon-text {
    font-size: 0.92rem;
  }
}
/* ══════════════════════════════════════════════════════════════════
   NEW — FULL-WIDTH LINE ABOVE THE PRODUCT TITLE  ("100% Cash on Delivery Available")
   ══════════════════════════════════════════════════════════════════ */

.cod-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  padding: 6px 12px;
  background: #f9f0fa;
  border-top: 1px solid #e0c8e8;
  border-bottom: 1px solid #e0c8e8;
  color: #4a154b;
  font-family: "Jost", "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.cod-line-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}

.cod-line-text {
  color: #4a154b;
}

@media (max-width: 480px) {
  .cod-line {
    gap: 6px;
    padding: 8px 8px;
    font-size: 0.8rem;
  }

  .cod-line-icon {
    width: 18px;
    height: 18px;
  }

}

/* ══════════════════════════════════════════════════════════════════
   HEART ON THE PRODUCT CARD — colored #4a154b with white background
   ══════════════════════════════════════════════════════════════════ */

.product-actions .btn-wishlist {
  background: #ffffff;
  color: #4a154b;
  border: 1px solid #4a154b;
}

.product-actions .btn-wishlist:hover {
  background: #4a154b;
  color: #ffffff;
}

.product-actions .btn-wishlist.on {
  background: #ffffff;
  color: #4a154b;
}

.product-actions .btn-wishlist.on:hover {
  background: #4a154b;
  color: #ffffff;
}


.product-rating { display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; font-size: .90rem; color: #805b81; }
.product-rating-stars { color: #f5b301; letter-spacing: 1px; }

/* ── Desktop: the extra "Add to Cart" under the card is phone-only ── */
.card-buy { display: none; }

/* ── Badge ("Bestseller") must not sit under the corner discount tag ── */
.product-img-wrap:has(.sale-ribbon) .product-badge { left: 66px; }

/* ══════════════════════════════════════════════════════════════════
   PHONES (≤600px) — two per row, nothing covering the product photo,
   one big thumb-friendly Add to Cart under every card
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card { border-radius: 14px; display: flex; flex-direction: column; }

  /* photo: square, fully visible */
  .product-img-wrap img { height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

  /* the hover overlay becomes just a small heart in the top-right corner */
  .product-actions,
  .product-card:hover .product-actions {
    top: 8px; right: 8px; left: auto; bottom: auto;
    padding: 0; background: none; width: auto;
  }
  .product-actions .btn-atc { display: none; }
  .product-actions .btn-wishlist { width: 38px; height: 38px; }

  /* smaller corner tag + badge */
  .sale-ribbon { width: 40px; height: 54px; padding-bottom: 9px; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 8px), 0 100%); }
  .sale-ribbon-text { font-size: 0.85rem; }
  .sale-ribbon-text small { font-size: 0.75rem; }
  /* badge moves to the bottom-left of the photo so it never collides with the tag or the heart */
  .product-badge,
  .product-img-wrap:has(.sale-ribbon) .product-badge { top: auto; bottom: 8px; left: 8px; padding: 3px 8px; }

  /* text */
  .cod-line { padding: 6px 6px; gap: 6px; font-size: 0.8rem; line-height: 1.25; }
  .cod-line-icon { width: 16px; height: 16px; }
  .product-info { padding: 6px 12px 8px; }
  .product-category { margin-bottom: 6px; }
  .product-name { font-size: 1.2rem; line-height: 1.2; padding-top: 2px; }
  .product-rating { flex-wrap: nowrap; gap: 4px; font-size: 0.8rem; white-space: nowrap; }
  .product-rating-stars { letter-spacing: 0; font-size: 0.85rem; }
  .product-desc { font-size: 0.8rem; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-price { flex-wrap: wrap; gap: 0 8px; }
  .price-current { font-size: 1.05rem; white-space: nowrap; }
  .price-old { font-size: 0.85rem; white-space: nowrap; }

  /* big Add to Cart, pinned to the bottom of every card */
  .card-buy { display: block; padding: 4px 12px 12px; margin-top: auto; }
  .card-buy .btn-atc {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 44px; padding: 10px 8px;
    background: #4a154b; color: #ffffff; border-color: #4a154b;
    font-size: 0.85rem; letter-spacing: 0.05em; white-space: nowrap;
  }
  .card-buy .btn-atc:hover,
  .card-buy .btn-atc:active { background: #805b81; border-color: #805b81; }
}
