/* =============================
   PRODUCT (BEM) — presentation
   ============================= */

.product { /* block wrapper */ }

/* Gallery */
.product__gallery-image { transition: opacity .25s ease; }

.product__thumbs { /* container for thumbs */ }
.product__thumb {
  width: 68px;
  height: 68px;
  border-radius: .5rem;
  border: 2px solid transparent;
  object-fit: cover;
  cursor: pointer;
  transition: border-color .2s ease, transform .08s ease-in;
}
.product__thumb:hover { border-color: #e53935; }
.product__thumb--active { border-color: #e53935; }

/* Info */
.product__title { letter-spacing: .1px; }
.product__rating .star-rating { transform: translateY(-1px); }
.product__excerpt { font-size: .95rem; line-height: 1.65; }

/* Book Details card */
.product__details .card-body {
  font-size: .95rem;
}

.product__details-list li {
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.product__details-list li i {
  width: 18px;
  text-align: center;
  color: #1E3D73; /* adjust to your brand color */
}

/* Sections */
.product__section-title { color: #1E3D73; }
.product__desc, .product__reviews { font-size: .95rem; line-height: 1.7; }

/* Related slider helpers */
.product .row.row-cols-md-5 > .col { display: flex; }
.related-products-section .product-card,
.product .product-card { width: 100%; display: flex; flex-direction: column; }
.product .carousel-control-prev-icon,
.product .carousel-control-next-icon { filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }

/* Fancybox (z-index above Bootstrap modals) */
.fancybox__container { z-index: 1085; }

/* Responsive trims */
@media (max-width: 992px) {
  .product__meta { gap: .5rem 1rem; }
}


/* ==== CHECKOUT PAGE ==== */
.woocommerce-checkout .button {
  background-color: #184B8B !important;
  color: #fff !important;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 12px 24px;
  border: none;
  width: 100%;
  margin-top: 1rem;
}

.woocommerce-checkout .button:hover {
  background-color: #0f3870 !important;
}

/* ========================
SINGLE PRODUCT ACTION BUTTON
=========================== */
/* === Action row layout === */
.single-product form.cart,
.product__actions {
  display: flex;
  align-items: center;
  gap: 12px;                 /* spacing between qty and buttons */
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* === Pretty quantity group (pill with ±) === */
.single-product form.cart .quantity {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 4px;
  border: 1px solid #e6e6e6;
  border-radius: 999px;      /* pill */
  background: #fff;
}

/* Remove native number spinners */
.single-product form.cart .qty::-webkit-outer-spin-button,
.single-product form.cart .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.single-product form.cart .qty[type=number] { -moz-appearance: textfield; }

/* Qty input */
.single-product form.cart .qty {
  width: 72px;
  height: 40px;
  line-height: 40px;
  border: 0;
  outline: 0;
  text-align: center;
  font-weight: 600;
  background: transparent;
}

/* ± buttons injected by JS */
.single-product .qty-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f6f6f6;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter .15s;
}
.single-product .qty-btn:hover { filter: brightness(0.95); }
.single-product .qty-btn:active { filter: brightness(0.9); }
.single-product .qty-btn--minus { margin-right: 4px; }
.single-product .qty-btn--plus  { margin-left: 4px; }

/* === Buttons look & spacing === */
/* Woo default add-to-cart gets classes via JS; this ensures consistent look */
.single-product .single_add_to_cart_button.btn {
  min-height: 48px;
}

/* Your injected Buy Now */
.single-product .buy-now-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid #0061CF; 
  color: #0061CF;
  background: transparent;
  font-weight: 600;
  transition: all .18s ease-in-out;
}
.single-product .buy-now-btn:hover {
  background: #0061CF;
  color: #fff;
}

/* If you prefer Bootstrap danger (#dc3545), swap the color above; or set your brand color: */
:root {
  --brand-red: #dd2a1e; /* change if needed */
}
.single-product .buy-now-btn { border-color: var(--brand-red); color: var(--brand-red); }
.single-product .buy-now-btn:hover { background: var(--brand-red); }

/* Disabled / loading state (optional) */
.single-product .single_add_to_cart_button[disabled],
.single-product .buy-now-btn[disabled],
.single-product .single_add_to_cart_button.is-loading,
.single-product .buy-now-btn.is-loading {
  opacity: .65;
  pointer-events: none;
}
.single-product .single_add_to_cart_button.is-loading::after,
.single-product .buy-now-btn.is-loading::after {
  content: "";
  width: 1rem; height: 1rem;
  margin-left: .5rem;
  border: .18rem solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: mgspin .6s linear infinite;
}
@keyframes mgspin { to { transform: rotate(360deg); } }

/* Mobile stacking */
@media (max-width: 575.98px) {
  .single-product form.cart { gap: 8px; }
  .single-product form.cart .quantity,
  .single-product .single_add_to_cart_button.btn,
  .single-product .buy-now-btn { flex: 1 1 100%; }
}

/* ====== LOGIN/REGISTER ===
  ============================ */
.woocommerce-form .btn-primary {
  background-color: rgb(247, 125, 0); /* Register */
  border: none;
}

.woocommerce-form .btn-danger {
  background-color: #0061CF; /* Login */
  border: none;
}

.woocommerce-form .btn:hover {
  opacity: 0.9;
}

.woocommerce-form input {
  border-radius: 0.3rem;
}

/* ==== LOST PASSWORD FORM==== */
.woocommerce-ResetPassword .btn {
  background-color: #0061CF; /* Forgot Password */
  color: #fff;
  padding: 10px 20px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.3s ease;
  border: none;
}

.woocommerce-ResetPassword .btn:hover {
  background-color: #004a9d; /* Slightly darker on hover */
}

.woocommerce-ResetPassword input {
  border-radius: 0.3rem;
}


/* == DASHBOARD PAGE == */
.woocommerce .list-group-item.active {
  background-color: #184B8B;
  color: white;
  font-weight: bold;
}

.woocommerce .list-group-item-action:hover {
  background-color: #f2f2f2;
}

.woocommerce .dashboard-card {
  border-radius: 6px;
  transition: all 0.3s ease-in-out;
}

.woocommerce .dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}


/* === WISHLIST PAGE === */
/* Wishlist Cards */
.card {
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card-img-top {
  object-fit: cover;
  height: 200px;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.card-title {
  font-size: 1rem;
  color: #333;
}

/* Empty and Logged-out States */
.wishlist-empty,
.not-logged-in-box {
  text-align: center;
  background-color: #f8f9fa;
  padding: 2.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.wishlist-empty i,
.not-logged-in-box i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #B41E24;
}

.wishlist-empty h4,
.not-logged-in-box h4 {
  font-weight: bold;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.wishlist-empty p,
.not-logged-in-box p {
  color: #6c757d;
  font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
  background-color: #184B8B;
  border: none;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 4px;
}

.btn-primary:hover {
  background-color: #0f3870;
}

.btn-outline-primary {
  border-color: #184B8B;
  color: #184B8B;
}

.btn-outline-primary:hover {
  background-color: #184B8B;
  color: #fff;
}

.btn-outline-danger {
  border-color: #B41E24;
  color: #B41E24;
}

.btn-outline-danger:hover {
  background-color: #B41E24;
  color: #fff;
}

/* Responsive Fixes */
@media (max-width: 576px) {
  .card-img-top {
    height: 160px;
  }

  .btn {
    width: 100%;
  }

  .d-flex.justify-content-center.gap-2 {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =====================
 SINGLE PRODUCT CARD
===================== */

/* Product Card */
.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Square Background Image */
.product-image-wrapper {
  width: 100%;
  padding-top: 100%;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f5f5;
}

/* Badges */
.bg-sale { background-color: #4178B8; color: #fff; }
.bg-hot  { background-color: #B22222; color: #fff; }

/* (Wishlist icon removed)
.wishlist-icon { ... }  -- delete if unused
*/

/* Add to Cart Button — outline default, solid on hover */
.btn-add-to-cart {
  background-color: transparent;
  color: #0061CF;
  border: 2px solid #0061CF;
  width: 100%;
  padding: 0.5rem 0.75rem;        /* smaller than before */
  border-radius: 8px;             /* minimal radius (rectangular look) */
  font-weight: 600;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 42px;                   /* smaller than previous 48px */
  font-size: 0.85rem;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.btn-add-to-cart:hover {
  background-color: #0061CF;
  color: #fff;
}
.btn-add-to-cart:focus-visible {
  outline: 2px solid #0061CF;
  outline-offset: 2px;
}

/* Label + center icon hover animation (kept) */
.btn-add-to-cart .add-label {
  transition: all 0.25s ease;
}
.btn-add-to-cart .cart-icon-centered {
  position: absolute;
  font-size: 1.1rem;
  opacity: 0;
  transition: all 0.25s ease;
  color: #fff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
}
.btn-add-to-cart:hover .add-label {
  opacity: 0;
  transform: scale(0.9);
}
.btn-add-to-cart:hover .cart-icon-centered {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .btn-add-to-cart,
  .btn-add-to-cart .add-label,
  .btn-add-to-cart .cart-icon-centered {
    transition: none !important;
  }
}

/* Price Styling */
.product-card .price,
.product-card .price ins {
  color: #a83032 !important;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-block;
}
.product-card .price del {
  color: #888 !important;
  font-size: 0.95rem;
  margin-right: 0.3rem;
}
.product-card .price ins { text-decoration: none; }

/* Track Order (unchanged) */
.woocommerce-order-tracking input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
}
.woocommerce-order-tracking button {
  padding: 0.75rem 1.5rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  transition: all 0.3s ease-in-out;
  width: 100%;
}
.woocommerce-order-tracking button:hover { background-color: #0056b3; }
