/* =================================================================
   COMPONENT STYLES - Buttons, Cards, etc.
   ================================================================= */

/* Global Component Overrides */
.btn,
.form-control,
.card {
  border-radius: 0;
}

/* Buttons */
.btn-outline-light {
  border: 1px solid #ffffff;
  padding: 0.8rem 2.5rem;
  text-transform: uppercase;
  font-family: sans-serif;
  font-size: 0.9rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-outline-light:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Product Card */
.product-card {
  background-color: transparent;
  border: none;
  color: #ffffff;
  text-align: left;
}

.product-card img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.product-card .card-title {
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
}

.product-card .card-text {
  font-family: sans-serif;
  font-size: 1rem;
}

.product-image-wrap {
  position: relative;
  display: block;
}

.product-stock-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.35rem 0.65rem;
  font-family: sans-serif;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  pointer-events: none;
}

.product-card.is-out-of-stock .card-img-top,
.bonjour-product-card.outofstock .product-image-link img {
  opacity: 0.65;
}

/* WooCommerce Breadcrumbs */
.woocommerce-breadcrumb,
.woocommerce-breadcrumb a,
.woocommerce-breadcrumb span {
  color: #ffffff;
}

.woocommerce-breadcrumb {
  padding: 1rem;
}

.woocommerce-breadcrumb a:hover,
.woocommerce-breadcrumb a:focus {
  color: #ffffff;
}

/* Product Category Card (Product Categories page template) */
.product-category-card {
  display: block;
  text-decoration: none;
  color: #ffffff;
}

.product-category-card:hover,
.product-category-card:focus {
  color: #ffffff;
}

.product-category-card__img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  margin-bottom: 1rem;
}

.product-category-card__img--empty {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.product-category-card__title {
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =================================================================
   WooCommerce Category/Product Grid Cards
   ================================================================= */

.bonjour-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: #ffffff;
  transition: opacity 0.3s ease;
}

.bonjour-product-card:hover {
  opacity: 0.92;
}

.bonjour-product-card .product-image-link {
  display: block;
  overflow: hidden;
  margin-bottom: 1rem;
}

/* Ensure product images are uniform */
.bonjour-product-card img,
.bonjour-product-card .product-image-link img {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.bonjour-product-card:hover .product-image-link img {
  transform: scale(1.03);
}

/* Make the card a flex child that can size properly inside the flex item */
.product-flex-item > .bonjour-product-card {
  flex: 1 1 auto;
  max-width: 100%;
}

.bonjour-product-card .product-details {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.5rem;
}

.bonjour-product-card .product-title {
  font-family: sans-serif;
  font-size: 0.875rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.35;
  margin: 0;
}

.bonjour-product-card .product-title a {
  color: #ffffff;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bonjour-product-card .product-title a:hover {
  color: #ffffff;
  opacity: 0.85;
}

.bonjour-product-card .product-price {
  font-family: sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
}

.bonjour-product-card .product-price .amount {
  color: #ffffff;
}

.bonjour-product-card .product-add-to-cart {
  margin-top: auto;
  display: flex;
  width: 100%;
  padding-top: 0.5rem;
}

.bonjour-product-card .product-add-to-cart .button {
  width: 100%;
  border: 1px solid #ffffff;
  background-color: transparent;
  color: #ffffff;
  padding: 0.65rem 1rem;
  text-transform: uppercase;
  font-family: sans-serif;
  font-size: 0.75rem;
  letter-spacing: 1px;
  border-radius: 0;
  text-align: center;
  transition: all 0.3s ease;
}

.bonjour-product-card .product-add-to-cart .button:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Responsive flex-based product grid for archive/category pages */
.bonjour-products-grid {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.bonjour-products-grid .product-flex-item {
  padding: 0.5rem;
  box-sizing: border-box;
  flex: 0 0 100%;
  display: flex;
}
/* Small screens: 2 columns */
@media (min-width: 576px) {
  .bonjour-products-grid .product-flex-item {
    flex: 0 0 50%;
  }
}
/* Large screens: 3 columns */
@media (min-width: 992px) {
  .bonjour-products-grid .product-flex-item {
    flex: 0 0 33.3333%;
  }
}
/* Extra large: 4 columns */
@media (min-width: 1200px) {
  .bonjour-products-grid .product-flex-item {
    flex: 0 0 25%;
  }
}

/* =================================================================
   CUSTOM PRODUCT POPUP (EXTENDED DELIVERY NOTICE)
   ================================================================= */

.bonjour-custom-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1050;
}

.bonjour-custom-popup-dialog {
  background-color: #ffffff;
  color: #000000;
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.6);
  text-align: left;
}

.bonjour-custom-popup-title {
  font-family: sans-serif;
  font-size: 1.4rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 1rem 0;
}

.bonjour-custom-popup-message {
  font-family: sans-serif;
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
}

.bonjour-custom-popup-button {
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.75rem 2rem;
}

.bonjour-custom-popup-hidden {
  display: none !important;
}
