/* =====================================================
   Product Card Styles - Unified Desktop & Mobile
   ===================================================== */

/* ===== Desktop Card Styles ===== */

.woo-desktop-section {
  margin-bottom: 40px;
}

.woo-desktop-header {
  margin-bottom: 20px;
}

.woo-product-card-desktop {
  width: 100%;
  border: 1px solid #eee;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 4px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.3s ease;
}

.woo-product-card-desktop:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-content-top-desktop {
  min-height: 260px;
  border-bottom: 1px dashed #e5e7eb;
  position: relative;
}

.woo-product-card-desktop img {
  height: 200px !important;
  object-fit: contain;
  border-radius: 5px;
  margin-bottom: 10px;
  justify-self: center;
  width: 100%;
  min-height: 200px;
}

.product-title-desktop {
  font-size: 16px;
  line-height: 1.4;
  min-height: 45px;
  text-align: center;
  font-weight: 600;
}

.product-title-desktop a {
  color: #111827;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
}

.product-price-desktop {
  font-weight: bold;
  margin: 5px 0;
  min-height: 24px;
}

.price-regular-desktop {
  text-decoration: line-through;
  color: #999;
  margin-right: 8px;
}

.price-sale-line-desktop {
  font-weight: bold;
  min-height: 25px;
  margin-bottom: 0 !important;
  margin-left: 10px;
}

.qty-info-desktop {
  font-size: 14px;
  color: #666;
  margin: 5px 0;
  min-height: 20px;
}

.add-to-cart-wrapper-desktop {
  margin-top: auto;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.qty-input-desktop {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.go-to-cart-btn-desktop {
  background-color: #4caf50;
  color: white;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.go-to-cart-btn-desktop:hover {
  background-color: #388e3c;
}

.cart-quantity-info-desktop {
  text-align: center;
  font-size: 14px;
  margin-bottom: 10px;
}

.woo-desktop-grid-item {
  background-color: #ffffff;
  height: 100%;
  display: flex;
  border-radius: 8px;
}

/* ===== Mobile Card Styles ===== */

.woo-mobile-card-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.woo-mobile-section .woo-mobile-header {
  padding: 0px 12px;
}

.woo-mobile-card-table td {
  vertical-align: top;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 0px;
  height: auto;
}

.card-relative {
  position: relative;
}

.wishlist-wrapper-abs {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.current-discount-info {
  min-height: 20px;
  font-size: 18px;
  color: #16a34a;
  margin: 5px 0;
  font-weight: bold;
  display: block;
  text-align: center;
  align-content: center;
}

.next-offer-info {
  min-height: 20px;
  font-size: 14px;
  color: #15803d;
  margin: 5px 0;
  font-weight: 800;
  text-align: center;
  align-content: center;
  display: block;
}

.woo-product-card .product-title a {
  color: #111827;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.3em;
  height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 600;
  margin: 0 0 4px;
  text-align: center;
  padding-top: 2px;
}

.woo-mobile-section .woo-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
}

.woo-mobile-section .woo-product-card .card-content-top {
  flex-grow: 1;
  border-bottom: 1px dashed #e5e7eb;
  min-height: 300px;
}

.woo-mobile-section .woo-product-card .add-to-cart-wrapper {
  margin-top: auto;
  padding-top: 5px;
  min-height: 85px;
  align-content: end;
}

.woo-mobile-section table {
  table-layout: fixed;
  width: 100%;
}

.woo-mobile-section tr {
  border: 1px solid #ddd;
}

.woo-mobile-section td {
  width: 50%;
  overflow: hidden;
  vertical-align: top;
  border-right: 1px solid #ddd;
}

.woo-mobile-section .product-price {
  margin-bottom: 0;
  font-size: 14px;
}

.woo-mobile-section .price-regular {
  text-decoration: line-through;
  color: #888;
  font-size: 14px;
}

.woo-mobile-section .price-sale-line {
  font-weight: bold;
  margin-bottom: 0 !important;
  font-size: 14px;
  min-height: 22px;
}

.woo-mobile-section .price-sale-line .discount-percent {
  margin-left: 8px;
  font-size: 14px;
}

.woo-mobile-section .qty-input.form-control {
  padding: 4px 6px;
  font-size: 14px;
  height: auto;
  text-align: center;
}

input.qty-input[type="number"] {
  -webkit-appearance: number-input !important;
  -moz-appearance: number-input !important;
  appearance: number-input !important;
  padding-top: 2px;
  padding-bottom: 2px;
  line-height: 1.2;
}

.woo-mobile-section .woo-product-card img {
  height: 125px;
  object-fit: contain;
  width: 100%;
}

.text-danger {
  margin-bottom: 0 !important;
}

/* Shared button styles for both desktop and mobile */
.custom-add-to-cart-button,
.custom-add-to-cart-button-desktop {
  background-color: #2563eb;
  border-color: #2563eb;
  color: white;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.custom-add-to-cart-button:hover,
.custom-add-to-cart-button-desktop:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.add-to-cart-wrapper {
  text-align: center;
}
