/* Modal container */

.cwm-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000 !important;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

/* Full-screen loading overlay while modal content loads */

.cwm-loading-overlay {
  /* Hidden by default; only shown during Quick View AJAX */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:rgba(0, 0, 0, 0.5);
  z-index: 100001;
  justify-content: center;
  align-items: center;
  pointer-events: all;
  cursor: wait;
}

.cwm-loading-overlay.is-active {
  display: flex !important;
}

/* Modal content */

.cwm-modal-content {
  background: rgb(249, 251, 244);
  padding: 24px;
  border-radius: 12px;
  max-width: 768px;
  width: 768px;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  overflow-y: auto;
}

/* Close button */

.cwm-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
  cursor: pointer;
}

/* Badges */

.cwm-on-sale-badge,
.cwm-out-of-stock-badge {
  position: absolute;
  top: 0px;
  transform: translateX(-50%);
  background: #0076b2;
  color: #fff;
  padding: 5px 15px;
  border-radius: 0px 0px 20px 0px;
  font-size: 15px;
  font-weight: bold;
  z-index: 10;
  display: none;
}

.cwm-on-sale-badge {
  left: 42px;
}

.cwm-out-of-stock-badge {
  left: 57px;
}

/* Modal columns */

.cwm-modal-columns {
  display: flex;
  width: 100%;
  gap: 24px;
}

/* Image gallery */

.cwm-image-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  background: #fff;
  flex: 1;
  max-width: 50%;
}

.cwm-main-image {
  height: 16rem !important;
  width: 100%;
  object-fit: contain;
}

/* Product details */

.cwm-details {
  flex: 1;
  max-width: 50%;
}

.cwm-variation-select {
  margin: 10px 0;
  width: 100%;
}

/* Quantity controls - rounded buttons style */

/* .cwm-quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
} */
.cwm-quantity-controls {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  width: fit-content;
  background: #f8faf5;
}

.cwm-quantity-minus,
.cwm-quantity-plus {
  padding: 8px 12px !important;
  border: none;
  border-radius: 10px !important;
  background: transparent;
  color: #6b7280;
  font-size: 14px !important;
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: none !important;
}

/* Hover */
.cwm-quantity-minus:hover,
.cwm-quantity-plus:hover {
  color: #111827;
  /* background: rgba(0, 0, 0, 0.04); */
}

/* Input Field */
#cwm-quantity {
  width: 50px;
  text-align: center;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  background: transparent;
}

/* Remove arrows from number input */
#cwm-quantity::-webkit-outer-spin-button,
#cwm-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#cwm-quantity[type="number"] {
  -moz-appearance: textfield;
}

/* 
.cwm-quantity-controls button {
  background: #fff;
  border: 1px solid #d9d9d9;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.cwm-quantity-controls button:hover {
  background: #f5f5f5;
  border-color: #00a854;
  color: #00a854;
}

.cwm-quantity-controls input {
  width: 80px;
  text-align: center;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
}

.cwm-quantity-controls input:focus {
  outline: none;
  border-color: #00a854;
} */

/* Remove spinner arrows from number input */

.cwm-quantity-controls input::-webkit-outer-spin-button,
.cwm-quantity-controls input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cwm-quantity-controls input[type="number"] {
  -moz-appearance: textfield;
}

/* Buttons */

.cwm-add-to-cart,
.cwm-continue-shopping {
  background: #396d1c;
  color: #fff;
  padding: 8px 20px !important;
  border: none;
  border-radius: 10px !important;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  /* smooth animation */
}

.cwm-add-to-cart:hover {
  transform: scale(1.05);
  /* thora sa zoom */
  /* optional: shadow dena hover par aur thoda highlight */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: #396d1c !important;
}

.cwm-continue-shopping:hover {
  background: #2e5715;
}

/* Messages */

.cwm-cart-message {
  color: green;
  margin-top: 10px;
  display: none;
}

.cwm-error-message {
  color: red;
  margin-top: 10px;
  display: none;
}

/* Spinner */

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0071a1;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Hide Woo add-to-cart inside the variation form (we use our own controls) */

#cwm-woo-variation-form .single_variation_wrap .quantity,
#cwm-woo-variation-form .single_variation_wrap .single_add_to_cart_button {
  display: none !important;
}

/* Hide Woo's inline variation summary (we mirror price/stock in our header) */

#cwm-woo-variation-form .woocommerce-variation {
  display: none !important;
}

/* Categories */

.cwm-categories {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 5px;
  font-weight: 500;
}

/* Title */

.cwm-title {
  margin-top: 4px !important;
  margin-bottom: 0px !important;
  /* mt-1 */
  font-family: var(--font-display);
  /* font-display (depends on project config) */
  font-size: 1.5rem !important;
  font-weight: 700;
  /* font-bold */
  color: var(--foreground);
  /* text-foreground (usually theme variable) */
}

/* Tags */

.cwm-tags {
  font-size: 14px;
  color: #617557;
  margin-top: 4px;
}

/* Price and Stock row */

.cwm-price-stock {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 16px !important;
}

.cwm-price {
  font-size: 30px;
  font-weight: bold;
  color: #000;
}

.cwm-in-stock {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  /* gap-1 */
  font-size: 14px;
  font-weight: 500;
  /* font-medium */
  color: #00b371;
}

.cwm-out-of-stock {
  color: #ff4d4f;
  font-size: 14px;
}

/* Short description */

.cwm-short-description {
  margin-top: 1rem;
  /* mt-4 */
  font-size: 0.875rem;
  /* text-sm */
  color: var(--muted-foreground);
  /* text-muted-foreground */
  line-height: 1.625;
}

/* Static info boxes */

.cwm-static-info {
  display: flex !important;
  /* gap: 20px; */
  gap: 0.75rem !important;
  margin-top: 16px !important;
}

/* .cwm-info-box {
  flex: 1;
  background: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
  display: flex !important;
  align-items: center;
  gap: 12px;
} */
.cwm-info-box {
  display: flex;
  align-items: center;
  border-radius: 0.5rem;
  /* rounded-lg */
  background-color: rgba(0, 0, 0, 0.05);
  padding: 8px !important;
  /* p-2 */
  flex: 1;
  min-width: 0;
  padding: 0.5rem !important;
  gap: 0.5rem !important;
}

.cwm-info-box h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 5px 0;
}

.cwm-info-box p {
  font-size: 14px;
  margin: 0;
}

/* Icon inside info boxes */

.cwm-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  /* background: rgba(0, 122, 74, 0.06); */
}

.cwm-info-icon svg {
  width: 15px;
  height: 15px;
}

.cwm-info-text h4 {
  margin: 0;
  font-size: 12px !important;
  color: hsl(99 15% 40%) !important;
  line-height: 1rem;
}

.cwm-info-text p {
  margin: 4px 0 0 0;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: black !important;
  font-weight: 500 !important;
}

/* Action row (Quantity + Add to Cart) */

.cwm-action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
}

.cwm-action-row .cwm-quantity-controls {
  margin: 0;
}

.cwm-action-row .cwm-add-to-cart {
  flex: 1;
  margin: 0;
  padding: 12px 24px;
  background: #396d1c;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
}

.cwm-action-row .cwm-add-to-cart svg {
  width: 18px;
  height: 18px;
}

.cwm-action-row .cwm-add-to-cart:hover {
  background: #008a45;
}

/* Secondary actions (Wishlist + Compare) */

/* Secondary actions (Wishlist + Compare) */

.cwm-secondary-actions {
  display: flex;
  gap: 10px;
  margin: 15px 0 20px 0;
}

.cwm-wishlist {
  flex: 1;
  background-color: transparent !important;
  background-image: unset !important;
  /* background: #fff; */
  border: 2px solid red !important;
  color: red !important;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: 10px !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.cwm-compare {
  flex: 1;
  background-color: transparent !important;
  background-image: unset !important;
  /* background: #fff; */
  border: 2px solid #396d1c !important;
  color: #396d1c !important;
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: 10px !important;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.cwm-compare {
  background-image: unset !important;
}

.cwm-wishlist svg,
.cwm-compare svg {
  width: 16px;
  height: 16px;
}

.cwm-wishlist:hover,
.cwm-compare:hover {
  border-color: #00a854;
  background-color: #396d1c !important;
  color: white !important;
  background: #f0fdf4;
}

/* Wishlist button in active/added state */

.cwm-wishlist.cwm-in-wishlist {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background-color: transparent !important;
}

.cwm-wishlist.cwm-in-wishlist svg {
  fill: #ef4444;
  stroke: #ef4444;
}

.cwm-wishlist.cwm-in-wishlist:hover {
  background-color: #fef2f2 !important;
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

/* Wishlist loading state */

.cwm-wishlist.cwm-wishlist-loading {
  opacity: 0.6;
  cursor: not-allowed;
}

/* View details link */

/* View details link */

.cwm-view-details {
  margin-top: 1rem;
  /* mt-4 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* gap-2 */
  font-size: 14px !important;
  /* text-sm */
  color: var(--primary);
}

.cwm-view-details a {
  color: #00a854;
  text-decoration: none;
  font-size: 14px !important;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.cwm-view-details a svg {
  width: 16px;
  height: 16px;
}

.cwm-view-details a:hover {
  text-decoration: underline;
  color: #00a854;
}

/* Remove the old button group styles */

.cwm-button-group {
  display: none;
}

.cwm-continue-shopping {
  display: none;
}