/*
* EverythingB2C Product Card Stylesheet
* This file contains all styles for the product card component to ensure
* a consistent look and feel across the entire site.
* It is designed to be forceful and override other styles if necessary.
*/

/* Unified Product Card Styles for EverythingB2C */
.card, .product-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border: 1px solid #ccc;
    text-align: center;
    border-radius: 0 !important;
    background: #fff;
    min-width: 240px !important;
    max-width: 240px !important;
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.08); */
    margin: 0 auto 8px auto;
    overflow: hidden !important;
    position: relative;
    padding: 0 !important;
    box-sizing: border-box !important;
    background: #fff;
    border-radius: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto 8px auto;
    padding-bottom: 6px !important;
}

.card:hover, .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.13);
}

/* --- Discount Banner --- */
.discount-banner {
    width: 100% !important;
    background: #9FBF1C !important;
    color: #fff !important;
    font-weight: bold !important;
    font-size: 11px !important;
    text-align: center !important;
    padding: 10px 14px !important;
    letter-spacing: 0.7px !important;
    line-height: 1.1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* min-height: 48px !important; */
}

/* --- Product Image --- */
.product-image {
    position: relative;
    background: #fff;
    padding: 5px 14px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    max-height: 120px;
    max-width: 92%;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* --- Out of Stock Overlay --- */
.out-of-stock {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #f9c9c9 !important;
    color: #000000 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 16px 12px !important;
    border-radius: 2px !important;
    z-index: 10 !important;
    text-align: center !important;
    text-transform: capitalize !important;
    letter-spacing: 1.2px !important;
    line-height: 1.1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 220px !important;
    width: 100% !important;
}

/* --- Product Details --- */
.product-details {
    padding: 0 2px !important;
    background: #fff;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box !important;
}

.product-details h3 {

    font-size: 12px !important;
    font-weight: bold !important;
    color: #222 !important;
    text-align: center !important;
    margin: 10px 0 !important;
    text-transform: capitalize !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2 !important;
    min-height: 32px !important;
    max-height: 32px !important;
    height: 32px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* --- Price Buttons: Pill, Horizontal --- */
.price-buttons, .price-buttons1, .modern-prices {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}
.price-btn, .mrp, .pay {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
}
.wishlist, .wishlist-label, .wishlist input[type="checkbox"] {
  flex: 0 0 38px !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.price-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 2px !important;
    
    font-size: 12px !important;
    font-weight: bold !important;
    padding: 10 6px !important;
    border: none !important;
    letter-spacing: 0.5px !important;
    box-sizing: border-box !important;
}
.price-btn.mrp {
    /* border: 1px solid #038CC3 !important; */
    background: #007bff44 !important;
    color: #038CC3 !important;
    margin-right: 0px !important;
}
.price-btn.mrp .label {
    margin-right: 4px !important;
    text-transform: uppercase !important;
}
.price-btn.mrp .value {
    text-decoration: line-through !important;
}
.price-btn.pay {
    /* border: 1px solid #9fbe1b !important; */
    color: #9fbe1b !important;
    background: #28a7463a !important;
    margin-left: 0px !important;
}
.price-btn.pay .label {
    margin-right: 4px !important;
    text-transform: uppercase !important;
}
.price-btn .label {
    font-size: 12px !important;
    font-weight: bold !important;
}
.price-btn .value {
    font-size: 12px !important;
    font-weight: bold !important;
}

/* --- Wishlist Heart: Circle --- */
.price-buttons .wishlist {
    border-radius: 2px !important;
    width: 25px !important;
    height: 25px !important;    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 10 !important;
    margin-left: 0 !important;
    align-self: auto !important;
    box-sizing: border-box !important;
}
.price-buttons .wishlist-label {
    font-size: 12px !important;
    color: transparent !important;
    -webkit-text-stroke: 1px #666 !important;
    text-stroke: 1px #666 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
    transition: all 0.3s ease-in-out !important;
    display: flex !important;
    padding: 0 6px !important;
    align-items: center !important;
    justify-content: center !important;
}

/* --- Cart Actions: Improved Alignment --- */
.cart-actions, .cart-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
}
.quantity-control {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  border: 1px solid #b3b3b3 !important;
  border-radius: 4px !important;
  background: #b3b3b382 !important;
  overflow: hidden !important;
}
.quantity-input {
  width: 48px !important;
  min-width: 0 !important;
  flex: 1 1 0 !important;
}
.add-to-cart-btn, .add-to-cart {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 200px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}

/* Quantity Control Container */
.quantity-control .btn-qty {
    width: 100% !important;
    height: 32px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    border: none !important;
    background: none !important;
    border: 1px solid #b3b3b3 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.2s ease !important;
    padding: 0 !important;
    margin: 0 !important;
}

.quantity-control .btn-qty:hover {
    background: #e4e4e4 !important;
}

.quantity-control .btn-qty:disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
}

/* Quantity Input */
.quantity-control .quantity-input {
    width: 56px !important;
    height: 32px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    text-align: center !important;
    border: none !important;
    background: #fff !important;
    color: #333 !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.quantity-control .quantity-input::-webkit-inner-spin-button,
.quantity-control .quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
.add-to-cart {
    background: #222e3a !important;
    color: #fff !important;
    font-weight: bold !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    letter-spacing: 0.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    height: 36px !important;
    text-transform: uppercase !important;
}

.add-to-cart:hover {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}
/* Legacy quantity input styles - only for non-quantity-control inputs */
.quantity-input:not(.quantity-control .quantity-input) {
    width: 100% !important;
    max-width: 50px !important;
    height: 28px !important;
    font-size: 12px !important;
    font-weight: bold !important;
    color: #fff !important;
    background: #007bff !important;
    border: none !important;
    border-radius: 2px !important;
    text-align: center !important;
    margin-left: 2px !important;
    appearance: textfield !important;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.quantity-input:not(.quantity-control .quantity-input)::-webkit-inner-spin-button,
.quantity-input:not(.quantity-control .quantity-input)::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* --- Read More Button --- */
.read-more {
    background: #222e3a;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    padding: 6px 0;
    width: 100%;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: block;
    letter-spacing: 0.7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.read-more:hover, .add-to-cart:hover {
    background: #0056b3;
}

/* --- Responsive Tweaks --- */
@media (max-width: 1200px) {
    .card, .product-card {
        max-width: 220px !important;
        min-width: 140px !important;
    }
    .discount-banner, .out-of-stock, .price-btn, .add-to-cart, .quantity-input, .wishlist {
        height: 28px !important;
        font-size: 0.85rem !important;
        min-width: 50px !important;
        padding: 0 3px !important;
    }
    .product-details h3 {

        font-size: 0.85rem !important;
        min-height: 28px !important;
        max-height: 28px !important;
        height: 28px !important;
        margin: 6px 0 6px 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    /* Adjust button sizes for medium screens */
    .cart-actions {
        gap: 6px !important;
        padding: 0 6px !important;
    }
    
    .add-to-cart {
        font-size: 11px !important;
        height: 32px !important;
        padding: 7px 10px; !important;
    }
    
    .quantity-control {
        max-width: 100px !important;
        height: 28px !important;
    }
    
    .quantity-control .btn-qty {
        width: 100% !important;
        height: 28px !important;
        font-size: 12px !important;
    }
    
    .quantity-control .quantity-input {
        width: 44px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 900px) {
    .card, .product-card {
        max-width: 48vw !important;
        min-width: 120px !important;
    }
}

@media (max-width: 600px) {
    .card, .product-card {
        max-width: 47vw !important;
        min-width: 47vw !important;
        margin: 0 auto 8px auto !important;
    }
    .discount-banner, .out-of-stock, .price-btn, .add-to-cart, .quantity-input, .wishlist {
        height: 22px !important;
        font-size: 0.75rem !important;
        min-width: 30px !important;
        padding: 0 2px !important;
    }
    .product-details h3 {

        font-size: 0.75rem !important;
        min-height: 24px !important;
        max-height: 24px !important;
        height: 24px !important;
        margin: 4px 0 4px 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    /* Mobile-optimized button layout */
    .cart-actions {
        gap: 4px !important;
        padding: 0 4px !important;
        margin-bottom: 0 !important;
    }
    
    .add-to-cart {
        font-size: 10px !important;
        height: 28px !important;
        padding: 6px 8px !important;
        letter-spacing: 0.3px !important;
    }
    
    .quantity-control {
        max-width: 80px !important;
        height: 24px !important;
    }
    
    .quantity-control .btn-qty {
        width: 100% !important;
        height: 24px !important;
        font-size: 10px !important;
    }
    
    .quantity-control .quantity-input {
        width: 32px !important;
        height: 24px !important;
        font-size: 10px !important;
    }
}

/* --- Discount Bar --- */
.discount-bar {
    background: #23a036 !important;
    color: #fff !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 8px 0 !important;
    font-size: 16px !important;
    border-radius: 0 !important;
    min-height: unset !important;
}

.product-image-wrapper {
    position: relative;
    text-align: center;
    padding: 20px 0 10px 0;
    min-height: 140px;
    background: #fff;
}
.product-image-wrapper img.product-image {
    max-width: 120px;
    max-height: 100px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.out-of-stock-overlay {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #f8d7da;
    color: #721c24;
    font-weight: bold;
    font-size: 20px;
    padding: 8px 30px;
    border-radius: 3px;
    z-index: 2;
    display: block;
    text-align: center;
}
.product-card.out-of-stock .out-of-stock-overlay {
    display: block;
}

.product-title {
    font-weight: bold;
    font-size: 17px;
    margin-bottom: 10px;
    min-height: 48px;
    text-align: center;
    text-transform: capitalize !important;
}

.price-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.price-btn.mrp {
    /* border: 1px solid #038CC3 !important; */
    background: #007bff44 !important;
    color: #038CC3 !important;
    border-radius: 6px;
    padding: 3px 10px;
    text-decoration: line-through;
    font-size: 15px;
}
.price-btn.pay {
    /* border: 1px solid #9fbe1b !important; */
    color: #9fbe1b !important;
    background: #28a7463a !important;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 15px;
    font-weight: bold;
}

.wishlist-btn {
    background: #fff;
    border: 2px solid #23a036;
    color: #23a036;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    margin-left: 5px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wishlist-btn.active {
    background: #23a036;
    color: #fff;
}


.cart-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.qty-input {
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #0072ff;
    font-size: 15px;
    background: #0072ff;
    color: #fff;
    width: 40px;
    text-align: center;
}

.product-card {
    width: 270px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 15px;
    display: inline-block;
    vertical-align: top;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    overflow: hidden;
    position: relative;
}

@media (max-width: 600px) {
    .product-card {
        width: 98vw;
        margin: 0 auto 2px auto;
    }
    .product-title {
        font-size: 15px;
        min-height: 32px;
    }
    .discount-bar {
        font-size: 13px;
        padding: 6px 0;
    }
}

/* Wishlist Heart: Pink when checked (in wishlist) */
.heart-checkbox:checked + .wishlist-label .heart-icon,
.heart-checkbox:checked + .wishlist-label {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

.wishlist-label.wishlist-active,
.wishlist-label.wishlist-active .heart-icon {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

/* Additional specific selectors for initial state */
.wishlist .heart-checkbox:checked + .wishlist-label .heart-icon,
.wishlist .wishlist-label.wishlist-active .heart-icon {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

/* Ensure the heart icon itself gets the pink color */
.heart-icon {
  color: transparent !important;
  -webkit-text-stroke: 2px #666 !important;
  text-stroke: 2px #666 !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
  transition: all 0.3s ease-in-out !important;
}

/* Override for wishlist active state */
.wishlist-label.wishlist-active .heart-icon,
.heart-checkbox:checked + .wishlist-label .heart-icon {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

/* Most specific selectors for page load state */
.product-info .wishlist .wishlist-label.wishlist-active .heart-icon,
.product-info .wishlist .heart-checkbox:checked + .wishlist-label .heart-icon,
.card .wishlist .wishlist-label.wishlist-active .heart-icon,
.card .wishlist .heart-checkbox:checked + .wishlist-label .heart-icon,
.product-card .wishlist .wishlist-label.wishlist-active .heart-icon,
.product-card .wishlist .heart-checkbox:checked + .wishlist-label .heart-icon {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

/* Force pink color for wishlist-active state on page load - maximum specificity */
.wishlist-label.wishlist-active .heart-icon,
.wishlist-label.wishlist-active span.heart-icon,
.wishlist-label.wishlist-active .heart-icon,
.wishlist-label.wishlist-active span.heart-icon {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

/* Ultra-aggressive selectors with maximum specificity */
html body .product-info .wishlist .wishlist-label.wishlist-active .heart-icon,
html body .product-info .wishlist .heart-checkbox:checked + .wishlist-label .heart-icon,
html body .card .wishlist .wishlist-label.wishlist-active .heart-icon,
html body .card .wishlist .heart-checkbox:checked + .wishlist-label .heart-icon,
html body .product-card .wishlist .wishlist-label.wishlist-active .heart-icon,
html body .product-card .wishlist .heart-checkbox:checked + .wishlist-label .heart-icon {
  color: #DE0085 !important;
  -webkit-text-stroke: 2px #DE0085 !important;
  text-stroke: 2px #DE0085 !important;
  filter: drop-shadow(0 2px 4px rgba(222, 0, 133, 0.3)) !important;
}

/* Legacy quantity control styles - overridden by new styles above */
/* Mobile quantity control styles are now handled in the main responsive section above */

/* Force-hide spinner arrows for .quantity-input inside .quantity-control */
.quantity-control .quantity-input::-webkit-inner-spin-button,
.quantity-control .quantity-input::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
.quantity-control .quantity-input {
  -moz-appearance: textfield !important;
}

.price-btn, .mrp, .pay, .wishlist, .wishlist-label, .wishlist input[type="checkbox"],
.price-buttons1 button, .modern-prices button, .price-buttons button {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  max-width: 200px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}

.product-detail-card .mrp,
.product-detail-card .pay,
.modern-info .mrp,
.modern-info .pay {
  max-width: 117px !important;
}

.cart-added-highlight {
  border: 2.5px solid #ffd600 !important; /* Yellow border */
  background: #9fbe1b !important; /* Green background */
  color: #fff !important;
  box-shadow: 0 0 0 6px rgba(255,214,0,0.18), 0 2px 12px rgba(40,167,69,0.22) !important;
  transition: box-shadow 0.2s, border 0.2s, background 0.2s, color 0.2s;
}