/* ═══════════════════════════════════════════════════════
   Cart Page Styles
   ═══════════════════════════════════════════════════════ */

/* ── Header Cart Icon ── */
.header-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(228, 35, 28, 0.08);
  color: #e4231c;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.2s;
  margin-right: 8px;
}

.header-cart-link:hover {
  background: #e4231c;
  color: #ffffff;
}

.header-cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e4231c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  border: 2px solid #ffffff;
}

.header-cart-link:hover .header-cart-badge {
  background: #ffffff;
  color: #e4231c;
  border-color: #e4231c;
}

.cart-page {
  min-height: 100vh;
  background: #f9fafb;
  padding-bottom: 0;
}

.cart-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

/* ── Breadcrumb ── */
.cart-breadcrumb {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 20px;
}

.cart-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.cart-breadcrumb a:hover {
  color: #e4231c;
}

.cart-breadcrumb-sep {
  margin: 0 8px;
  color: #d1d5db;
}

.cart-breadcrumb-active {
  color: #e4231c;
  font-weight: 600;
}

/* ── Header ── */
.cart-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.cart-header-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-header-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cart-header-title {
  font-size: 24px;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0;
}

.cart-header-badge {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: #e4231c;
  border-radius: 999px;
  padding: 4px 10px;
}

.cart-header-desc {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* ── Grid Layout ── */
.cart-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .cart-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Cart Items Card ── */
.cart-items-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
}

.cart-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.cart-items-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
  margin: 0;
}

.cart-clear-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #e4231c;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.cart-clear-btn:hover {
  text-decoration: underline;
}

/* ── Cart Item Row ── */
.cart-item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
}

.cart-item-row-border {
  border-bottom: 1px solid #e5e7eb;
}

.cart-item-img-wrap {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.cart-item-category {
  font-size: 12px;
  color: #9ca3af;
  margin: 2px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.cart-item-stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.cart-item-stock-dot.stock-in {
  background: #22c55e;
}

.cart-item-stock-text {
  font-size: 12px;
  font-weight: 500;
}

.cart-item-stock-text.stock-in-text {
  color: #16a34a;
}

/* ── Quantity Controls ── */
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cart-item-qty-label {
  font-size: 12px;
  color: #9ca3af;
  margin-right: 4px;
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.2s;
}

.cart-qty-btn:hover {
  background: #f9fafb;
}

.cart-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-qty-value {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
}

/* ── Remove Button ── */
.cart-remove-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f9fafb;
  color: #6b7280;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-remove-btn:hover {
  background: #fef2f2;
  color: #e4231c;
}

/* ── Enquiry Panel ── */
.cart-enquiry-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
}

.cart-enquiry-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.cart-enquiry-title {
  font-size: 18px;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0;
}

.cart-enquiry-body {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-radius: 16px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cart-enquiry-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.cart-enquiry-heading {
  font-size: 16px;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0 0 8px;
}

.cart-enquiry-desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
  line-height: 1.6;
}

.cart-enquiry-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: #22c55e;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.cart-enquiry-btn:hover {
  background: #16a34a;
}

.cart-enquiry-btn.disabled {
  background: #d1d5db;
  pointer-events: none;
}

.cart-enquiry-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 16px;
}

/* ── Empty Cart ── */
.cart-empty {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.cart-empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.cart-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #1b1b1b;
  margin: 0 0 6px;
}

.cart-empty-desc {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px;
  max-width: 300px;
}

.cart-empty-browse-btn {
  background: #e4231c;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 20px;
  text-decoration: none;
  transition: background 0.2s;
}

.cart-empty-browse-btn:hover {
  background: #c41e17;
}

/* ── Trust Badges Footer ── */
.cart-trust-footer {
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.cart-trust-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.cart-trust-badges {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 24px;
}

@media (max-width: 768px) {
  .cart-trust-badges {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cart-trust-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-trust-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6b7280;
}

.cart-trust-badge-title {
  font-size: 14px;
  font-weight: 600;
  color: #1b1b1b;
  line-height: 1.3;
  margin: 0;
}

.cart-trust-badge-subtitle {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.3;
  margin: 0;
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {
  .cart-container {
    padding: 16px 16px 32px;
  }

  .cart-item-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .cart-item-qty-label {
    display: none;
  }

  .cart-header-title {
    font-size: 20px;
  }
}

/* ── Sticky Cart Bar ── */
.sticky-cart-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 48px);
  max-width: 600px;
  background: rgba(27, 27, 27, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideUpSticky 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpSticky {
  from {
    transform: translate(-50%, 100px);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.sticky-cart-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-cart-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky-cart-icon-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e4231c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1b1b1b;
}

.sticky-cart-text {
  display: flex;
  flex-direction: column;
}

.sticky-cart-label {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.sticky-cart-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

.sticky-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e4231c;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.sticky-cart-btn:hover {
  background: #c41e17;
  color: #ffffff;
}

.sticky-cart-btn:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .sticky-cart-bar {
    bottom: 16px;
    width: calc(100% - 32px);
    padding: 10px 16px;
  }
  .sticky-cart-text {
    display: none;
  }
  .sticky-cart-btn {
    padding: 8px 14px;
    font-size: 12px;
  }
}
