/* ==========================
   SLIDE-CART PANEL - PREMIUM DESIGN
   ========================== */

.slide-cart {
  opacity: inherit !important;
  position: fixed;
  top: 95px;
  right: -100%;
  width: 100%;
  max-width: 480px;
  height: calc(100% - 97px);
  background: linear-gradient(180deg, var(--background-color-1) 20%, #0a0a0a 100%);
  z-index: 1000;
  display: none;
  overflow-y: auto;
  overflow-x: hidden;
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overscroll-behavior: contain;
  border-left: 1px solid var(--background-color-2);
}

.slide-cart.open {
  right: 0;
}

.slide-cart-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--background-color-2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  color: var(--h1-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.slide-cart-close-btn:hover {
  background: var(--background-color-2);
  color: var(--background-color-1);
  transform: rotate(90deg);
}

/* ==========================
   CART HEADER
   ========================== */

.cart-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  text-align: center;
  position: relative;
}

/* ==========================
   CART CONTENT
   ========================== */

.cart-container {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cart item premium */
.cart-item-raw {
  display: flex;
  gap: 12px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.03) 0%, rgba(169, 169, 169, 0.03) 100%);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: all 0.3s ease;
}

.cart-item-raw:hover {
  border-color: var(--background-color-2);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.15);
  transform: translateY(-2px);
}

/* Image + nom */
.cart-item-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  gap: 8px;
}

.cart-item-name {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin: 0;
  line-height: 1.3;
  color: var(--primary-color);
  font-family: var(--font-accent);
}

.cart-item-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.cart-item-image img {
  width: auto;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.cart-item-raw:hover .cart-item-image img {
  transform: scale(1.05);
}

/* Détails : poids / quantité / prix */
.cart-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  padding-right: 36px;
}

.cart-item-quantity,
.cart-item-weight {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-weight select {}

.total-ttc {
  color: var(--price-green-ttc);
}

.cart-item-quantity label,
.cart-item-weight label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--h1-primary);
  font-family: var(--font-accent);
}

.cart-item-quantity input,
.cart-item-weight input {
  width: 100%;
  max-width: 80px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.cart-item-quantity input:focus,
.cart-item-weight input:focus {
  border-color: var(--background-color-2);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  background: rgba(0, 0, 0, 0.5);
}

/* Prix unitaire / total */
.subtotal-cart-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--price-green-ttc);
  font-weight: 600;
}

.subtotal-cart-item span {
  font-size: 11px;
  color: var(--primary-color);
  opacity: 0.8;
}

/* Supprimer un article */
.cart-item-delete {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(177, 52, 52, 0.1);
  border: 1px solid rgba(177, 52, 52, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.cart-item-delete:hover {
  background: var(--warning-color);
  border-color: var(--warning-color);
}

.cart-item-delete img {
  width: 16px;
  height: 16px;
  cursor: pointer;
  transition: transform 0.2s ease;
  filter: brightness(0) saturate(100%) invert(30%) sepia(70%) saturate(1800%) hue-rotate(340deg);
}

.cart-item-delete:hover img {
  transform: scale(1.2) rotate(90deg);
  filter: brightness(0) saturate(100%) invert(100%);
}

/* ==========================
   EMPTY CART STATE
   ========================== */

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--primary-color);
}

.cart-empty h3 {
  font-size: 20px;
  color: var(--h1-primary);
  margin-bottom: 10px;
}

.cart-empty p {
  font-size: 14px;
  opacity: 0.7;
}

/* ==========================
   CART SUMMARY
   ========================== */

.subtotal-cart {
  text-align: center;
  margin: 10px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(169, 169, 169, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.subtotal-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.h2-primary-2 {
  font-family: 'Rubik Dirt', sans-serif;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(to right, var(--background-color-2) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  text-align: center;
}

/* Prix avec style amélioré */
.order-prix-avant-remise,
.order-prix-apres-remise,
.order-prix-ttc,
.order-prix-ttc-avant {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 14px;
  font-weight: 600;
}

.order-prix-avant-remise {
  color: var(--price-green-unit-ttc);
}

.order-prix-avant-remise del {
  color: var(--warning-color);
  opacity: 0.7;
}

.order-prix-apres-remise {
  color: var(--price-green-ttc);
  font-size: 15px;
}

.order-prix-ttc {
  font-size: 20px;
  font-weight: 700;
  color: var(--price-green-ttc);
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  text-shadow: 0 0 10px rgba(39, 174, 96, 0.3);
}

.order-prix-ttc-avant {
  color: var(--primary-color);
  font-size: 13px;
  opacity: 0.8;
}

.order-prix-ttc-avant del {
  color: var(--warning-color);
}

/* Remise badge */
.remise-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--warning-color) 0%, #d64545 100%);
  color: white;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(177, 52, 52, 0.4);
}

/* ==========================
   CART ACTIONS
   ========================== */

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  padding: 0 20px 20px;
}

.delete-cart-button {
  width: 100%;
  padding: 14px 24px;
  border: 2px solid var(--background-color-2);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.delete-cart-button {
  background: transparent;
  color: var(--warning-color);
  border-color: var(--warning-color);
}

.delete-cart-button:hover {
  background: var(--warning-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(177, 52, 52, 0.4);
}

.btn-cart-action {
  width: 100% !important;
  text-align: center;
  width: 50%;
  padding: 14px;
  border: 1px solid #3e3d3d;
  border-radius: 50px;
  font-size: 16px;
  background-image: linear-gradient(to right, var(--background-color-1) 0%, var(--background-color-2) 51%, var(--background-color-1) 100%);
  background-size: 200%;
  cursor: pointer;
  transition: 0.5s;
  display: block;
  margin: 0 auto;
  color: black;
  text-decoration: none;
}

/* ==========================
   SCROLLBAR PERSONNALISÉE
   ========================== */

.slide-cart::-webkit-scrollbar {
  width: 8px;
}

.slide-cart::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}

.slide-cart::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--h1-primary) 0%, var(--primary-color) 100%);
  border-radius: 10px;
}

.slide-cart::-webkit-scrollbar-thumb:hover {
  background: var(--background-color-2);
}

/* ==========================
   ANIMATIONS
   ========================== */

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-cart.open {
  animation: slideInRight 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-item-raw {
  animation: fadeIn 0.3s ease forwards;
}

.cart-item-raw:nth-child(2) {
  animation-delay: 0.05s;
}

.cart-item-raw:nth-child(3) {
  animation-delay: 0.1s;
}

.cart-item-raw:nth-child(4) {
  animation-delay: 0.15s;
}

.cart-item-raw:nth-child(5) {
  animation-delay: 0.2s;
}