/* ===================================================
   MCC Store - Custom Overrides
   =================================================== */

/* Broken image placeholder styling */
img[data-noimage="1"] {
  object-fit: contain;
  background: #f0f0f0;
}

/* Sticky header enhancement */
#header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Card hover effects */
.box .box-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

/* Badge styling */
.badge.bg-warning {
  background-color: var(--yellow) !important;
  color: #333;
}

.badge.bg-danger {
  background-color: var(--primary) !important;
}

/* Swiper customizations */
.swiper-pagination {
  position: relative;
  margin-top: 20px;
}

/* Select2 overrides */
.select2-container .select2-selection--single {
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 42px;
  padding-left: 12px;
}

.select2-container .select2-selection--single .select2-selection__arrow {
  height: 42px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 9000;
  transition: transform 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
}

/* Cart counter badge */
.cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Table responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Form styling enhancements */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-family);
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(206, 6, 21, 0.1);
  outline: none;
}

/* Custom checkbox */
.custom-control-input {
  margin-right: 6px;
}

/* Product quantity input */
.quantity-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
}

.quantity-input button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--light);
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

.quantity-input button:hover {
  background: var(--border-color);
}

.quantity-input input {
  width: 50px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-size: 14px;
  padding: 6px;
}

/* Order summary */
.order-summary {
  background: var(--light);
  border-radius: var(--radius);
  padding: 25px;
}

.order-summary h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary);
}

.order-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #e8e8e8;
}

.order-summary .summary-row.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  border-bottom: none;
  padding-top: 12px;
}

/* Address card */
.address-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 15px;
  transition: var(--transition);
  cursor: pointer;
}

.address-card:hover,
.address-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(206, 6, 21, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
}

.pagination .page-item .page-link {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  font-size: 14px;
  transition: var(--transition);
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Tab navigation */
.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.nav-tabs .nav-link {
  color: var(--gray);
  font-weight: 500;
  padding: 10px 20px;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
