:root {
  --primary-color: #4F0341;
  --secondary-color: #9333ea;
  --gradient: linear-gradient(135deg, #4F0341, #9333ea);
  --white: #fff;
  --gray: #6b7280;
  --radius: 20px;
  --shadow: 0 8px 20px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

/* Prevent horizontal overflow globally (safe) */
html, body {
  overflow-x: hidden;
}

/* Make sure wide elements don't force horizontal scroll */
img, video, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Utility: avoid elements with large fixed widths on small screens */
@media (max-width: 768px) {
  .container, .main-wrapper, .header, .sidebar-nav-wrapper {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* prevent large negative margins or wide cards */
  .page-title, .card, .dropdown-menu {
    overflow-x: hidden;
    word-wrap: break-word;
  }
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  padding: 2.5rem 2rem;
  text-align: center;
  border-bottom: none;
  border-radius: 10px !important;
  position: relative;
  overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    border-radius: 50px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.card-header h1 {
  color: var(--white);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.5px;
}

.card-header p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 2;
    font-weight: 400;
}


  /* === MODAL FINGER STYLE === */
#cartModal .modal-dialog {
  transform: translateY(40px);
  opacity: 0;
  transition: all 0.4s ease;
}

#cartModal.show .modal-dialog {
  transform: translateY(0);
  opacity: 1;
}

#cartModal .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(79, 3, 65, 0.3);
  background: linear-gradient(145deg, #fff, #f8f3fa);
  animation: popUp 0.4s ease forwards;
}

@keyframes popUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* HEADER */
#cartModal .modal-header {
  background: linear-gradient(90deg, #4F0341, #7a1761);
  color: #fff;
  border-bottom: none;
  padding: 1.2rem 1.5rem;
}

#cartModal .modal-title {
  color: #fff;
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}

#cartModal .btn-close {
  filter: invert(1);
  opacity: 0.8;
  transition: 0.3s;
}
#cartModal .btn-close:hover {
  opacity: 1;
}

/* BODY */
#cartModal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 1.5rem;
  background: #fff;
  border-top: 2px solid #f1e0f4;
  border-bottom: 2px solid #f1e0f4;
}

/* Cart items style */
#cart-items .cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  transition: all 0.3s ease;
}

#cart-items .cart-item:hover {
  background: #faf7fc;
  border-radius: 10px;
  padding-left: 10px;
}

#cart-items .item-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

#cart-items .item-info img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#cart-items .item-name {
  font-weight: 600;
  color: #4F0341;
}

#cart-items .item-price {
  font-weight: 500;
  color: #7a1761;
}

/* FOOTER */
#cartModal .modal-footer {
  background: #f8f3fa;
  border-top: none;
  padding: 1rem 1.5rem;
}

#cartModal .modal-footer strong {
  color: #4F0341;
}

#cartModal .modal-footer .btn {
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#cartModal .btn-secondary {
  background: #e7e0ea;
  color: #4F0341;
  border: none;
}

#cartModal .btn-secondary:hover {
  background: #d5c3d9;
}

#cartModal .btn-primary {
  background: linear-gradient(90deg, #4F0341, #7a1761);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(79, 3, 65, 0.2);
}

#cartModal .btn-primary:hover {
  background: linear-gradient(90deg, #7a1761, #a62883);
  transform: translateY(-2px);
}