/* Product Grid (3 columns like the image) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Assuming the Add to Cart button is a standard link/button */
.action-button a,
.action-button button {
  background-color: #a3d977; /* Light green */
  color: #333;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
}

/* Main Image Container */
.product-gallery-carousel .carousel-inner {
  border: 1px solid #eaeaea;
  background-color: #f8f9fa;
  text-align: center;
}

.product-gallery-carousel .carousel-item img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Thumbnail Wrapper */
.product-gallery-carousel .thumbnail-nav-wrapper {
  padding: 0 10px;
}

/* Reset Bootstrap Indicator Styles for Thumbnails */
.product-gallery-carousel .carousel-indicators {
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
}

.product-gallery-carousel .carousel-indicators .thumbnail-btn {
  width: 25%; /* Show 4 thumbnails at a time */
  height: auto;
  text-indent: 0;
  border: 2px solid transparent;
  background-color: transparent;
  padding: 0;
  opacity: 0.6;
  transition: all 0.2s ease-in-out;
}

.product-gallery-carousel .carousel-indicators .thumbnail-btn img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ddd;
}

/* Active Thumbnail State */
.product-gallery-carousel .carousel-indicators .thumbnail-btn.active,
.product-gallery-carousel .carousel-indicators .thumbnail-btn:hover {
  opacity: 1;
  border-color: #eab676; /* Match the gold/yellow border from your screenshot */
}

/* Custom Arrows for Thumbnails */
.product-gallery-carousel .custom-arrow {
  background-color: #fff;
  border-radius: 50%;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 30px;
  height: 30px;
  background-size: 50%;
  filter: invert(0); /* Ensure arrows are dark if standard bootstrap is white */
}

.product-gallery-carousel .carousel-control-prev,
.product-gallery-carousel .carousel-control-next {
  opacity: 1;
}

.product-gallery-carousel .carousel-control-prev:hover .custom-arrow,
.product-gallery-carousel .carousel-control-next:hover .custom-arrow {
  background-color: #f8f9fa;
}


/* ######### Quantity Inputs ######### */
/* 1. Wrapper styling */
.quantity-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 2. Base button styling */
.quantity-btn {
  background-color: #fff;
  border: 1px solid #C5C5C5;
  border-radius: 50%;
  color: #727272;
  cursor: pointer;
  text-indent: -9999px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  padding: 0;
  transition: background-color 0.2s;
}
.quantity-btn:hover,
.quantity-btn:focus {
  background-color: #EAF6FF;
  border-color: #0052B4;
}

/* Minus button specific styles */
.quantity-btn-minus {
  background-image: url(../image/global/reduce-item.svg);
  background-position: center center;
  background-repeat: no-repeat;
}
.quantity-btn-minus:hover,
.quantity-btn-minus:focus {
  background-image: url(../image/global/reduce-item-hover.svg);
}

/* Plus button specific styles */
.quantity-btn-plus {
  background-image: url(../image/global/add-item.svg);
  background-position: center center;
  background-repeat: no-repeat;
}
.quantity-btn-plus:hover,
.quantity-btn-plus:focus {
  background-image: url(../image/global/add-item-hover.svg);
}

/* 3. Input styling (pill shape) */
.quantity-input {
  width: 64px;
  height: 32px;
  border-radius: 16px;
  border: 1px solid #ccc;
  text-align: center;
  font-size: 16px;
  margin: 0;
  outline: none;
  box-sizing: border-box;
  /* Hide default number arrows */
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Hide default spinners for WebKit (Chrome, Safari, Edge) */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}



/* ######### Checkout Registration Form ######### */

/* Button styling based on the provided image - Centered */
.checkout-register-toggle-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 300px; /* Adjust width as needed to match your layout */
  background: transparent;
  border: none;
  border-bottom: 1px solid #888; /* Bottom line */
  color: #1a2b5c; /* Dark blue text */
  font-size: 16px;
  font-weight: 500;
  padding: 10px 0;

  /* This centers the button horizontally while keeping the bottom margin */
  margin: 0 auto 15px auto;

  cursor: pointer;
  font-family: inherit;
}

/* Chevron icon styling */
.checkout-register-toggle-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

/* Rotate arrow when expanded */
.checkout-register-toggle-btn.expanded svg {
  transform: rotate(180deg);
}

/* Sliding effect styles for the fieldset */
fieldset#edit-login-register {
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
/* ######### End of Checkout Registration Form ######### */

/* Delete order item overlays (templates/includes/delete-order-item-overlays.html.twig, js/custom.js) */
#custom-fullscreen-confirm.delete-order-item-overlay--confirm {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
}

#custom-fullscreen-confirm .delete-order-item-overlay__dialog {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#custom-fullscreen-confirm .delete-order-item-overlay__title {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
}

#custom-fullscreen-confirm .delete-order-item-overlay__message {
  margin-bottom: 25px;
  color: #555;
}

#custom-fullscreen-confirm .delete-order-item-overlay__actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

#custom-fullscreen-confirm .delete-order-item-overlay__btn {
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
}

#custom-fullscreen-confirm .delete-order-item-overlay__btn--cancel {
  border: 1px solid #ccc;
  background: #eee;
}

#custom-fullscreen-confirm .delete-order-item-overlay__btn--confirm {
  border: none;
  background: #e53e3e;
  color: #fff;
}

#custom-fullscreen-loading.delete-order-item-overlay--loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
}

#custom-fullscreen-loading .delete-order-item-overlay__loading-inner {
  text-align: center;
}

#custom-fullscreen-loading .delete-order-item-overlay__loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: delete-order-item-overlay-spin 1s linear infinite;
  margin: 0 auto 15px auto;
}

#custom-fullscreen-loading .delete-order-item-overlay__loading-text {
  font-size: 18px;
  color: #333;
  font-weight: bold;
}

@keyframes delete-order-item-overlay-spin {
  to {
    transform: rotate(360deg);
  }
}
