/* ===== NAV RIGHT GROUP (cart + back button) ===== */
.nav-right-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ===== CART BUTTON (in nav) ===== */
#cart-fab {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B9D, #C44FD8);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(196, 79, 216, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
#cart-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(196, 79, 216, .5);
}
#cart-fab.cart-fab-pop {
  animation: cartFabPop .35s ease;
}
@keyframes cartFabPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}
#cart-fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e53e3e;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  pointer-events: none;
  border: 2px solid white;
}

/* ===== OVERLAY ===== */
#cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1999;
}
#cart-overlay.cart-overlay-open {
  display: block;
}

/* ===== PANEL ===== */
#cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  height: 100vh;
  background: #fff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 40px rgba(176, 127, 204, .22);
  transition: right .35s cubic-bezier(.4, 0, .2, 1);
  font-family: 'Poppins', sans-serif;
}
#cart-panel.cart-panel-open {
  right: 0;
}

.cart-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #F0E8F8;
  flex-shrink: 0;
}
.cart-panel-head h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #2D2D2D;
}
.cart-close {
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  padding: 0 2px;
  font-family: inherit;
}
.cart-close:hover { color: #2D2D2D; }

/* ===== ITEMS LIST ===== */
.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 18px;
}
.cart-empty {
  color: #aaa;
  font-size: .88rem;
  text-align: center;
  padding: 48px 0;
  font-family: 'Poppins', sans-serif;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F5F0FF;
}
.cart-item-img {
  width: 62px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
  background: #F5F0FF;
  flex-shrink: 0;
}
.cart-item-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-nombre {
  font-size: .82rem;
  font-weight: 700;
  color: #2D2D2D;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-sku {
  font-size: .7rem;
  color: #bbb;
  margin-top: 2px;
  font-weight: 500;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.cart-item-qty button {
  width: 26px;
  height: 26px;
  border: 1.5px solid #B07FCC;
  background: none;
  border-radius: 50%;
  font-size: .95rem;
  font-weight: 700;
  color: #8B5EA7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}
.cart-item-qty button:hover { background: #EDE0FF; }
.cart-item-qty span {
  font-size: .88rem;
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  color: #2D2D2D;
}
.cart-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cart-item-precio {
  font-size: .88rem;
  font-weight: 800;
  color: #8B5EA7;
}
.cart-item-remove {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #ccc;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-family: inherit;
}
.cart-item-remove:hover { color: #e53e3e; }

/* ===== PANEL FOOTER ===== */
.cart-panel-foot {
  padding: 14px 18px 20px;
  border-top: 1px solid #F0E8F8;
  background: #fff;
  flex-shrink: 0;
}
.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cart-total span {
  font-size: .84rem;
  color: #888;
  font-weight: 600;
}
.cart-total strong {
  font-size: 1.25rem;
  font-weight: 800;
  color: #8B5EA7;
}
.cart-wa-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #FF6B9D, #C44FD8);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 14px 20px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(196, 79, 216, .3);
  transition: transform .2s, box-shadow .2s;
  font-family: 'Poppins', sans-serif;
}
.cart-wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 79, 216, .42);
}
.cart-clear-btn {
  width: 100%;
  background: none;
  border: none;
  color: #bbb;
  font-size: .76rem;
  cursor: pointer;
  padding: 8px;
  margin-top: 4px;
  font-family: 'Poppins', sans-serif;
  transition: color .2s;
}
.cart-clear-btn:hover { color: #e53e3e; }

/* ===== CARD ADD BUTTON (listing pages) ===== */
.card-add {
  background: linear-gradient(135deg, #FF6B9D, #C44FD8);
  color: white;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .2s, box-shadow .2s;
  font-family: 'Poppins', sans-serif;
}
.card-add:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(196, 79, 216, .38);
}

/* ===== ADD TO CART BUTTON (profile pages) ===== */
.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #B07FCC, #8B5EA7);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 16px 32px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 6px 25px rgba(139, 94, 167, .35);
  transition: transform .3s, box-shadow .3s;
}
.btn-add-cart:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(139, 94, 167, .48);
}
.btn-add-cart .cart-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.18));
  transition: transform .3s;
}
.btn-add-cart:hover .cart-icon {
  transform: scale(1.15) rotate(-8deg);
}

/* ===== REVIEW BLOCK ===== */
.review-block {
  padding: 0 5% 60px;
}
.review-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 4px 24px rgba(176,127,204,.13);
  border: 1px solid #F0E8F8;
}
.review-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2D2D2D;
  margin-bottom: 18px;
  font-family: 'Poppins', sans-serif;
}
.review-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.star-btn {
  font-size: 2.2rem;
  color: #ddd;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color .15s, transform .15s;
  font-family: inherit;
}
.star-btn.active,
.star-btn:hover {
  color: #FFB800;
  transform: scale(1.18);
}
.review-hint {
  font-size: .78rem;
  color: #aaa;
  margin-bottom: 18px;
  font-family: 'Poppins', sans-serif;
  min-height: 1.2em;
}
.review-input,
.review-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #E8DCF5;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: .9rem;
  color: #2D2D2D;
  background: #FDFAFF;
  margin-bottom: 12px;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s;
}
.review-input:focus,
.review-textarea:focus {
  border-color: #B07FCC;
}
.review-textarea {
  height: 110px;
  resize: vertical;
}
.review-send {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF6B9D, #C44FD8);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 13px 28px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(196,79,216,.3);
}
.review-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196,79,216,.42);
}
@media (max-width: 768px) {
  .review-inner { padding: 24px 20px; }
}

/* ===== WHATSAPP FLOAT BUTTON ===== */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1400;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.wa-btn-circle {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 25px rgba(37, 211, 102, .5);
  transition: transform .3s, box-shadow .3s;
  position: relative;
  flex-shrink: 0;
}
.wa-btn-circle::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: rgba(37, 211, 102, .25);
  animation: waPulse 2s ease-in-out infinite;
}
@keyframes waPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.18); opacity: 0.5; }
}
.wa-float:hover .wa-btn-circle {
  transform: scale(1.1);
  box-shadow: 0 10px 35px rgba(37, 211, 102, .65);
}
.wa-label {
  background: #2D2D2D;
  color: white;
  padding: 7px 14px;
  border-radius: 18px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity .3s, transform .3s;
  font-family: 'Poppins', sans-serif;
  pointer-events: none;
}
.wa-float:hover .wa-label {
  opacity: 1;
  transform: translateX(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  #cart-panel { width: 100%; right: -105%; }
  #cart-panel.cart-panel-open { right: 0; }
  #cart-fab { width: 36px; height: 36px; }
  #cart-fab svg { width: 18px; height: 18px; }
  .wa-btn-circle { width: 52px; height: 52px; }
  .wa-float { bottom: 20px; right: 18px; }
}
