/* Path: /public/assets/css/pages/product.css */

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 5% 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  position: relative;
  z-index: 5;
  background: rgba(255,255,255,.85);
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--cyan); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* ── PRODUCT LAYOUT ── */
.product-page {
  max-width: 1400px;
  margin: 30px auto 60px;
  padding: 0 5%;
  display: flex;
  gap: 50px;
  position: relative;
  z-index: 5;
}

/* LEFT: images */
.product-gallery { width: 420px; flex-shrink: 0; }

.gallery-main {
  position: relative;
  width: 100%;
  height: 380px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #f9f9f9;
  margin-bottom: 14px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

/* Prev / Next arrows on gallery */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.85);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.gallery-arrow:hover { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }

.gallery-thumbs { display: flex; gap: 10px; }
.gallery-thumb {
  width: 72px; height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s;
  flex-shrink: 0;
}
.gallery-thumb.active { border-color: var(--cyan); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* RIGHT: info */
.product-info { flex: 1; min-width: 0; }

.product-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 20px;
}

/* Variant selector */
.variant-group { margin-bottom: 20px; }
.variant-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.variant-select {
  width: 100%;
  max-width: 320px;
  height: 44px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  outline: none;
  transition: border-color .2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.variant-select:focus { border-color: var(--cyan); }

/* Unit price */
.unit-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

/* Quantity row */
.qty-row { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.qty-btn {
  width: 42px; height: 42px;
  border: 1.5px solid var(--pink);
  background: #fff;
  color: var(--pink);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.qty-btn:first-child { border-radius: 8px 0 0 8px; }
.qty-btn:last-child  { border-radius: 0 8px 8px 0; }
.qty-btn:hover { background: var(--pink); color: #fff; }
.qty-input {
  width: 64px; height: 42px;
  border: 1.5px solid var(--border);
  border-left: none; border-right: none;
  text-align: center;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  outline: none;
  color: var(--text);
}

/* Add to cart button */
.btn-add-cart {
  width: 100%;
  max-width: 320px;
  height: 52px;
  background: var(--yellow);
  color: var(--text);
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(239,230,48,.4);
  margin-bottom: 16px;
}
.btn-add-cart:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(239,230,48,.5); filter: brightness(1.05); }
.btn-add-cart:active { transform: translateY(0); }
.btn-add-cart.added { background: var(--green); color: #fff; box-shadow: 0 4px 16px rgba(65,171,53,.4); }

/* Wishlist link */
.btn-wishlist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--cyan);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: color .2s;
  margin-bottom: 28px;
}
.btn-wishlist:hover { color: var(--pink); }
.btn-wishlist i { color: var(--pink); }

/* Price table hint */
.table-hint {
  background: #f0faf0;
  border: 1px solid #c8e6c9;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #388e3c;
  margin-bottom: 16px;
}

/* Price table */
.price-table { width: 100%; border-collapse: collapse; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.price-table thead tr { background: var(--text); color: #fff; }
.price-table thead th { padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; }
.price-table tbody tr { border-bottom: 1px solid var(--border); transition: background .2s; cursor: pointer; }
.price-table tbody tr:last-child { border-bottom: none; }
.price-table tbody tr:hover { background: rgba(0,174,239,.07); }
.price-table tbody td { padding: 12px 16px; font-size: 13.5px; color: var(--text); }
.price-table tbody td:first-child { color: var(--muted); }
.price-table tbody td:last-child { padding-right: 8px; }
.btn-table-cart {
  width: 34px; height: 34px;
  background: var(--yellow);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text);
  transition: all .2s;
}
.btn-table-cart:hover { background: var(--cyan); color: #fff; transform: scale(1.1); }

/* ── TOAST ── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 300; transform: translateY(80px); opacity: 0; transition: all .35s cubic-bezier(.34,1.2,.64,1); display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: var(--green); font-size: 16px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .product-page { flex-direction: column; }
  .product-gallery { width: 100%; }
}




/* ── MODALE AJOUT AU PANIER ── */
#cartSuccessModal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
#cartSuccessModal.show { opacity: 1; pointer-events: auto; }

.cart-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.cart-modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  padding: 24px 22px 20px;
  width: 90%; max-width: 320px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.14);
  opacity: 0;
  transform: translateY(20px) scale(.96);
}
#cartSuccessModal.show .cart-modal-content {
  animation: cartCardIn .38s cubic-bezier(.34,1.46,.64,1) .08s both;
}
@keyframes cartCardIn {
  from { opacity:0; transform:translateY(20px) scale(.96); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* SVG icon */
.cart-icon-wrap {
  position: relative;
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.cm-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  animation: cmRingOut .7s ease .55s both;
}
.cm-ring-2 { animation-delay: .75s; }
@keyframes cmRingOut {
  0%   { transform: scale(1); opacity: .5; }
  100% { transform: scale(2); opacity: 0; }
}

.cart-check-svg circle {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: cmCircle .5s ease .2s both;
}
@keyframes cmCircle {
  to { stroke-dashoffset: 0; }
}
.cart-check-svg polyline {
  stroke-dasharray: 56;
  stroke-dashoffset: 56;
  animation: cmCheck .35s ease .6s both;
}
@keyframes cmCheck {
  to { stroke-dashoffset: 0; }
}

/* Text */
.cart-modal-content h3 {
  margin: 0 0 3px;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}
#cartModalProdName {
  margin: 0 0 18px;
  font-size: 12px; color: var(--muted); line-height: 1.4;
  animation: cmTagIn .3s ease .65s both;
}
#cartModalProdName strong { color: var(--cyan); font-weight: 600; }

/* Buttons */
.cart-modal-actions {
  display: flex; gap: 8px;
  animation: cmTagIn .3s ease .78s both;
}
@keyframes cmTagIn {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}

.btn-continue {
  flex: 1; height: 38px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  font-family: 'Poppins', sans-serif; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-continue:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-go-cart {
  flex: 1.4; height: 38px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--yellow);
  border-radius: 9px; border: none;
  font-size: 12px; font-weight: 700; color: var(--text);
  font-family: 'Poppins', sans-serif; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 10px rgba(239,230,48,.4);
  transition: transform .2s, box-shadow .2s;
}
.btn-go-cart::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(255,255,255,.3);
  transform: translateX(-100%) skewX(-15deg);
  animation: btnShimmer 2s ease 1.1s infinite;
}
@keyframes btnShimmer {
  from { transform: translateX(-100%) skewX(-15deg); }
  to   { transform: translateX(300%) skewX(-15deg); }
}
.btn-go-cart:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(239,230,48,.5); }