/* iComplements — Shopping Cart Styles (Floating Badge, Sidebar Drawer, Glassmorphism UI) */

/* ━━━ FLOATING CART BADGE BUTTON ━━━ */
.cart-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(96, 165, 250, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.25s, border-color 0.25s;
}

.cart-floating-btn:hover {
  transform: scale(1.1);
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(96, 165, 250, 0.4);
}

.cart-floating-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.cart-count-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scale(0);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-count-badge.visible {
  transform: scale(1);
}

@media (max-width: 480px) {
  .cart-floating-btn {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
  }
  .cart-floating-btn svg {
    width: 21px;
    height: 21px;
  }
}

/* ━━━ CART DRAWERS PANELS & BACKDROP ━━━ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 299;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: rgba(10, 14, 26, 0.82);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 300;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  transform: translateX(0);
}

/* ━━━ CART HEADER ━━━ */
.cart-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-header h3 svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--blue-sky, #60a5fa);
  stroke-width: 2;
}

.cart-close-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cart-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.cart-close-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ━━━ CART CONTENT (ITEMS LIST) ━━━ */
.cart-items-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  scrollbar-width: none;
}

.cart-items-container::-webkit-scrollbar {
  display: none;
}

.cart-empty-message {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  gap: 16px;
  padding: 40px;
}

.cart-empty-message svg {
  width: 58px;
  height: 58px;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1.5;
}

.cart-empty-message p {
  margin: 0;
  font-size: 15px;
}

.cart-item {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  transition: border-color 0.25s, background 0.25s;
}

.cart-item:hover {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(255, 255, 255, 0.035);
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 3px 0;
  line-height: 1.25;
  padding-right: 20px;
}

.cart-item-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 8px 0;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.cart-qty-control {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.cart-qty-btn {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.cart-qty-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.cart-qty-val {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.cart-item-remove:hover {
  color: #ef4444;
}

.cart-item-remove svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
}

/* ━━━ CART FOOTER (TOTAL & CHECKOUT) ━━━ */
.cart-footer {
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 14, 26, 0.4);
}

.cart-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cart-summary-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.cart-total-price {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.cart-checkout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.25);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.cart-checkout-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, #059669, #047857);
}

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

.cart-checkout-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ━━━ STYLE OVERRIDES FOR ADD-TO-CART BUTTON IN DETAILS PAGE ━━━ */
.cart-actions-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
}

@media (max-width: 480px) {
  .cart-actions-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.btn-add-to-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.btn-add-to-cart:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-add-to-cart svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}
