/* ==================== PREMIUM SIDEBAR CART ==================== */
/* Modern, Elegant Shopping Cart Sidebar Design */

/* === OVERLAY === */
.cart-sidebar-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99998 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease !important;
}

.cart-sidebar-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* === SIDEBAR CONTAINER === */
.cart-sidebar {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: 420px !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 99999 !important;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex !important;
  flex-direction: column !important;
  background: #080808 !important;
  overflow: hidden !important;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8);
}

.cart-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    #ff0033 20%,
    #ff0033 80%,
    transparent 100%
  );
  opacity: 0.5;
}

.cart-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: radial-gradient(ellipse at top right, rgba(255, 0, 51, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.cart-sidebar.active {
  transform: translateX(0);
}

/* === SIDEBAR CONTENT WRAPPER === */
.cart-sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}

/* === CLOSE BUTTON === */
.cart-sidebar-close {
  position: absolute !important;
  top: 20px !important;
  right: 20px !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 50% !important;
  color: #fff !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 10000 !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.cart-sidebar-close i {
  font-size: 16px !important;
  line-height: 1 !important;
  color: inherit !important;
  pointer-events: none !important;
}

.cart-sidebar-close:hover {
  background: #ff0033 !important;
  border-color: #ff0033 !important;
  color: #fff !important;
  transform: rotate(90deg) !important;
  box-shadow: 0 0 25px rgba(255, 0, 51, 0.6) !important;
}

.cart-sidebar-close:focus {
  outline: none !important;
  background: #ff0033 !important;
  border-color: #ff0033 !important;
}

.cart-sidebar-close:active {
  transform: rotate(90deg) scale(0.95) !important;
}

/* === BASE BASKET === */
.basket {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: 'Inter', 'Segoe UI', -apple-system, sans-serif;
}

.site-content .basket {
  display: none;
}

/* === BASKET HEADER === */
.basket .basket-header {
  padding: 32px 28px 24px;
  background: transparent;
  position: relative;
  flex-shrink: 0;
}

.basket .basket-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.basket .basket-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #fff;
  margin: 0;
}

.basket .basket-title::before {
  content: "";
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(255, 0, 51, 0.2) 0%, rgba(255, 0, 51, 0.05) 100%);
  border: 1px solid rgba(255, 0, 51, 0.3);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f290";
  font-size: 16px;
  color: #ff0033;
}

/* === SECOND HEADER (ITEMS COUNT) === */
.basket .basket-second-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

.basket .basket-second-header .count {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
}

.basket .basket-second-header .count::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #ff0033;
  border-radius: 50%;
  box-shadow: 0 0 12px #ff0033, 0 0 24px rgba(255, 0, 51, 0.5);
  animation: countPulse 2s ease-in-out infinite;
}

@keyframes countPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

.basket .basket-second-header .total {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.basket .basket-second-header .total strong {
  color: #ff0033;
  font-weight: 800;
  font-size: 15px;
  margin-left: 6px;
}

/* === BASKET CONTENT AREA === */
.basket .basket-content {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 0, 51, 0.3) transparent;
}

.basket .basket-content::-webkit-scrollbar {
  width: 4px;
}

.basket .basket-content::-webkit-scrollbar-track {
  background: transparent;
}

.basket .basket-content::-webkit-scrollbar-thumb {
  background: rgba(255, 0, 51, 0.3);
  border-radius: 4px;
}

.basket .basket-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 0, 51, 0.5);
}

/* === BASKET ITEMS CONTAINER === */
.basket .basket-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

/* === INDIVIDUAL BASKET ITEM === */
.basket .basket-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 28px;
  padding-right: 70px; /* Space for remove button */
  background: transparent;
  position: relative;
  transition: all 0.3s ease;
}

.basket .basket-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ff0033;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.basket .basket-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

.basket .basket-item:last-child::after {
  display: none;
}

.basket .basket-item:hover {
  background: rgba(255, 0, 51, 0.04);
}

.basket .basket-item:hover::before {
  transform: scaleY(1);
}

/* === ITEM INFO SECTION === */
.basket .basket-item .info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.basket .basket-item .title {
  flex: 0 0 100%;
  width: 100%;
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.basket .basket-item .title a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  transition: color 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.basket .basket-item .title a:hover {
  color: #ff0033;
}

.basket .basket-item .price {
  font-size: 15px;
  font-weight: 700;
  color: #ff0033;
  flex-shrink: 0;
  white-space: nowrap;
}

/* === ITEM OPTIONS === */
.basket .basket-item .options {
  list-style: none;
  padding: 10px 12px;
  margin: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  width: auto;
}

.basket .basket-item .options:empty {
  display: none !important;
}

.basket .basket-item .options li {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.basket .basket-item .options li strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* === QUANTITY FIELD - HIDDEN (Not enabled) === */
.basket .basket-item .quantity-field {
  display: none !important;
}

/* === REMOVE BUTTON === */
.basket .basket-item .remove {
  position: absolute;
  top: 20px;
  right: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}

.basket .basket-item .remove::before {
  content: none !important;
}

.basket .basket-item .remove::after {
  content: "\f00d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
}

.basket .basket-item .remove:hover {
  background: rgba(255, 0, 51, 0.15);
  border-color: rgba(255, 0, 51, 0.3);
  color: #ff0033;
}

/* === CHECKOUT FOOTER === */
.basket .basket-checkout {
  margin-top: auto;
  padding: 20px 28px 32px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.8) 0%, rgba(0, 0, 0, 0.95) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  position: relative;
}

.basket .basket-checkout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 51, 0.4), transparent);
}

.basket .basket-checkout h3 {
  display: none;
}

/* === PREMIUM TOTAL BOX === */
.basket .basket-checkout .total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(255, 0, 51, 0.08) 0%, rgba(255, 0, 51, 0.03) 100%);
  border: 1px solid rgba(255, 0, 51, 0.15);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.basket .basket-checkout .total::before {
  content: "Total";
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.basket .basket-checkout .total::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 0, 51, 0.1));
  pointer-events: none;
}

.basket .basket-checkout .total strong {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 0, 51, 0.3);
  position: relative;
  z-index: 1;
}

/* === CHECKOUT BUTTON === */
.basket .basket-checkout .checkout {
  width: 100%;
  padding: 18px 28px;
  background: #ff0033;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.basket .basket-checkout .checkout::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.basket .basket-checkout .checkout::after {
  content: "\f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 14px;
  transition: transform 0.4s ease;
}

.basket .basket-checkout .checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(255, 0, 51, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.basket .basket-checkout .checkout:hover::before {
  opacity: 1;
}

.basket .basket-checkout .checkout:hover::after {
  transform: translateX(4px);
}

.basket .basket-checkout .checkout:active {
  transform: translateY(0);
}

/* === CONTINUE SHOPPING === */
.cart-sidebar-continue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  margin-top: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.cart-sidebar-continue i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.cart-sidebar-continue:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cart-sidebar-continue:hover i {
  transform: translateX(-6px);
}

/* === EMPTY BASKET === */
.basket .basket-empty,
.basket-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  margin: auto;
  color: rgba(255, 255, 255, 0.4);
  font-size: 15px;
  font-weight: 500;
}

.basket .basket-empty::before,
.basket-empty::before {
  content: "\f07a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 60px;
  color: rgba(255, 0, 51, 0.2);
  margin-bottom: 24px;
  animation: emptyCartFloat 3s ease-in-out infinite;
}

@keyframes emptyCartFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* === LOADING STATE === */
.cart-sidebar.loading .cart-sidebar-content,
.cart-sidebar.updating .basket {
  pointer-events: none;
}

.cart-sidebar.loading::after,
.cart-sidebar.updating::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 2px solid rgba(255, 0, 51, 0.1);
  border-top-color: #ff0033;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 1000;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cart-sidebar.updating .basket::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
}

/* === ANIMATIONS === */
.cart-sidebar.active .basket-item {
  animation: itemFadeIn 0.5s ease backwards;
}

.cart-sidebar.active .basket-item:nth-child(1) { animation-delay: 0.1s; }
.cart-sidebar.active .basket-item:nth-child(2) { animation-delay: 0.15s; }
.cart-sidebar.active .basket-item:nth-child(3) { animation-delay: 0.2s; }
.cart-sidebar.active .basket-item:nth-child(4) { animation-delay: 0.25s; }
.cart-sidebar.active .basket-item:nth-child(5) { animation-delay: 0.3s; }
.cart-sidebar.active .basket-item:nth-child(6) { animation-delay: 0.35s; }

@keyframes itemFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .cart-sidebar {
    max-width: 100%;
  }

  .cart-sidebar-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .basket .basket-header {
    padding: 28px 20px 20px;
  }

  .basket .basket-header::after {
    left: 20px;
    right: 20px;
  }

  .basket .basket-second-header {
    padding: 14px 20px;
  }

  .basket .basket-item {
    padding: 16px 20px;
  }

  .basket .basket-item::after {
    left: 20px;
    right: 20px;
  }

  .basket .basket-checkout {
    padding: 20px;
  }

  .basket .basket-checkout::before {
    left: 20px;
    right: 20px;
  }
}

/* === HIDE LEGACY POPUP === */
.basket-popup {
  display: none !important;
}

.basket-popup-content {
  display: none !important;
}

/* ==================== PROFESSIONAL CLEAN OVERRIDE ==================== */
/* Cleaner and more organized cart sidebar appearance */
.cart-sidebar {
  max-width: 440px !important;
  background: linear-gradient(180deg, #0d0d0f 0%, #09090b 100%) !important;
}

.cart-sidebar::before,
.cart-sidebar::after {
  opacity: 0.28;
}

.cart-sidebar-content {
  background: transparent;
}

.basket .basket-header {
  padding: 28px 24px 18px;
}

.basket .basket-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  gap: 12px;
}

.basket .basket-title::before {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ff2e55;
}

.basket .basket-second-header {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.basket .basket-second-header .count,
.basket .basket-second-header .total {
  font-size: 12px;
}

.basket .basket-second-header .total strong {
  font-size: 14px;
}

.basket .basket-content {
  padding: 10px 0 0;
}

.basket .basket-items {
  gap: 10px;
  padding: 6px 14px 14px;
}

.basket .basket-item {
  padding: 14px 14px 12px;
  padding-right: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.01));
}

.basket .basket-item::before {
  display: none;
}

.basket .basket-item::after {
  display: none;
}

.basket .basket-item:hover {
  background: linear-gradient(180deg, rgba(255, 70, 104, 0.08), rgba(255, 255, 255, 0.01));
  border-color: rgba(255, 70, 104, 0.28);
  transform: translateY(-1px);
}

.basket .basket-item .title {
  margin-bottom: 2px;
}

.basket .basket-item .title a {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.basket .basket-item .price {
  font-size: 14px;
  font-weight: 800;
  color: #ff4a70;
}

.basket .basket-item .options {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.22);
  gap: 3px;
}

.basket .basket-item .options li {
  font-size: 10px;
}

.basket .basket-item .remove {
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border-color: rgba(255, 255, 255, 0.12);
}

.basket .basket-item .remove::after {
  font-size: 10px;
}

.basket .basket-checkout {
  padding: 14px 16px 18px;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.72) 0%, rgba(5, 5, 6, 0.96) 100%);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.basket .basket-checkout::before {
  left: 16px;
  right: 16px;
  background: linear-gradient(90deg, transparent, rgba(255, 74, 112, 0.48), transparent);
}

.basket .basket-checkout .total {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border-color: rgba(255, 74, 112, 0.22);
}

.basket .basket-checkout .total::before {
  font-size: 11px;
  letter-spacing: 0.14em;
}

.basket .basket-checkout .total strong {
  font-size: 20px;
  letter-spacing: 0.01em;
}

.basket .basket-checkout .checkout {
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
}

.cart-sidebar-continue {
  margin-top: 10px;
  border-radius: 10px;
  padding: 11px;
  font-size: 12px;
}

@media (max-width: 480px) {
  .basket .basket-header {
    padding: 24px 16px 16px;
  }

  .basket .basket-second-header {
    padding: 10px 16px;
  }

  .basket .basket-items {
    padding: 6px 10px 10px;
    gap: 8px;
  }

  .basket .basket-item {
    padding: 12px 12px 10px;
    padding-right: 40px;
  }

  .basket .basket-item .title a {
    font-size: 13px;
  }

  .basket .basket-checkout {
    padding: 12px 12px 14px;
  }
}