/*
* Inprotech Product Card Stylesheet - REDESIGNED
* Modern product card design with orange header, yellow-background images,
* and prominent pricing display matching the new brand guidelines.
*/

/* Unified Product Card Styles for Inprotech */
.card,
.product-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 8px !important;
    background: #fff;
    cursor: pointer;
    min-width: 240px !important;
    max-width: 240px !important;
    margin: 0 auto 15px auto;
    overflow: hidden !important;
    position: relative;
    padding: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* --- Discount Banner - Dynamic Header --- */
.discount-banner {
    width: 100% !important;
    background: var(--pink) !important;
    color: #fff !important;
    font-weight: bold !important;
    font-size: 13px !important;
    text-align: center !important;
    padding: 12px 10px !important;
    letter-spacing: 0.6px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    border-radius: 0 !important;
    text-transform: uppercase !important;
}

/* --- Product Image --- */
.product-image {
    position: relative;
    background: #FFFFFF;
    padding: 15px 12px;
    height: 180px;
    /* Height for better proportion */
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image.no-image {
    padding: 0;
}

.no-image-placeholder {
    background: #FFFFFF;
    border: 1px dashed #ddd;
    color: #999;
    height: 180px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 0;
}

.product-image img {
    max-height: 180px;
    min-height: 180px;
    height: 180px !important;
    max-width: 88%;
    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-info {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    flex: 1;
}

.product-details {
    padding: 12px 10px !important;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    box-sizing: border-box !important;
    gap: 10px !important;
    width: 100% !important;
}

.product-title-link {
    text-decoration: none !important;
}

.product-details h3 {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-align: center !important;
    margin: 0 !important;
    text-transform: capitalize !important;
    letter-spacing: 0.2px !important;
    line-height: 1.35 !important;
    min-height: 38px !important;
    max-height: 38px !important;
    height: 38px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    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,
.price-buttons1,
.modern-prices,
.cart-actions {
    margin: 0 !important;
}

/* --- Price Buttons: Side-by-Side Layout --- */
.price-buttons,
.price-buttons1,
.modern-prices {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    flex-wrap: nowrap;
    justify-content: flex-start !important;
}

.price-btn,
.mrp,
.pay {
    flex: 1 1 48% !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
}

.wishlist,
.wishlist-label,
.wishlist input[type="checkbox"] {
    flex: 0 0 22px !important;
    width: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    align-self: center !important;
}

.price-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    border-radius: 5px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border: 1px solid #ddd !important;
    letter-spacing: 0.2px !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: auto !important;
    gap: 6px !important;
}

.price-btn.mrp {
    background: #D5E1ED !important;
    color: #1565C0 !important;
    margin-right: 0px !important;
    border: 1px solid #D5E1ED !important;
}

.price-btn.mrp .label {
    margin-right: 0px !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    color: #000000 !important;
    white-space: nowrap !important;
}

.price-btn.mrp .value {
    text-decoration: line-through !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-top: 0px !important;
    color: #000000 !important;
    white-space: nowrap !important;
}

.price-btn.pay {
    color: #D84315 !important;
    background: #ffe1c7 !important;
    margin-left: 0px !important;
    border: 1px solid #ffe1c7 !important;
}

.price-btn.pay .label {
    margin-right: 0px !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    color: #000000 !important;
    white-space: nowrap !important;
}

.price-btn.pay .value {
    font-size: 12px !important;
    font-weight: 700 !important;
    margin-top: 0px !important;
    color: #000000 !important;
    white-space: nowrap !important;
}

.price-btn .label {
    font-size: 9px !important;
    font-weight: 700 !important;
}

.price-btn .value {
    font-size: 13px !important;
    font-weight: 700 !important;
}

/* --- Wishlist Heart: Side Position --- */
.price-buttons .wishlist {
    border-radius: 0 !important;
    width: 22px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 10 !important;
    margin-left: auto !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.price-buttons .wishlist-label {
    font-size: 16px !important;
    color: #ccc !important;
    filter: drop-shadow(0 0.5px 0.5px rgba(0, 0, 0, 0.04)) !important;
    transition: all 0.3s ease-in-out !important;
    display: flex !important;
    padding: 0 4px !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.price-buttons .wishlist-label.wishlist-active {
    color: #E91E63 !important;
}

/* =========================================================
   CART ACTIONS — Single authoritative definition
   All quantity control and add-to-cart button styles live here.
   ========================================================= */

/* Wrapper row for quantity control + add-to-cart button */
.cart-actions,
.cart-controls {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* For inline cart actions layout */
.cart-actions.d-flex {
    flex-direction: row !important;
    gap: 5px !important;
}

.cart-actions.d-flex .quantity-control {
    flex: 0 0 calc((100% - 32px) / 2) !important;
    width: calc((100% - 32px) / 2) !important;
    min-width: 0 !important;
    max-width: none !important;
}

.cart-actions.d-flex .add-to-cart-btn,
.cart-actions.d-flex .add-to-cart {
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important;
}

/* Quantity control pill: [–] [input] [+] */
.quantity-control {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    height: 30px !important;
    box-sizing: border-box !important;
    background: #fff !important;
}

/* Minus / Plus buttons */
.quantity-control .btn-qty {
    width: 26px !important;
    min-width: 26px !important;
    max-width: 26px !important;
    height: 30px !important;
    font-size: 15px !important;
    font-weight: bold !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.15s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    color: #333 !important;
}

.quantity-control .btn-qty-minus {
    border-right: 1px solid #e0e0e0 !important;
}

.quantity-control .btn-qty-plus {
    border-left: 1px solid #e0e0e0 !important;
}

.quantity-control .btn-qty:hover {
    background: #f1f1f1 !important;
}

.quantity-control .btn-qty:disabled {
    background: #ddd !important;
    cursor: not-allowed !important;
    color: #999 !important;
}

/* Number input inside quantity control */
.quantity-control .quantity-input {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 30px !important;
    font-size: 13px !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 button */
.add-to-cart-btn,
.add-to-cart {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    background: #155C9B !important;
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease !important;
}

.add-to-cart-btn i,
.add-to-cart i {
    font-size: 12px !important;
    flex-shrink: 0 !important;
    transform: scaleX(-1);
}

.add-to-cart-btn:hover,
.add-to-cart:hover {
    background: #003D99 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(0, 82, 204, 0.3) !important;
}


/* --- Read More Button --- */
.read-more {
    background: #155C9B;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: 3px;
    padding: 8px 0;
    width: 100%;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.read-more:hover {
    background: #003D99;
}

/* --- Responsive Tweaks --- */
@media (max-width: 1200px) {

    .card,
    .product-card {
        max-width: 200px !important;
        min-width: 140px !important;
    }

    .discount-banner {
        font-size: 12px !important;
        padding: 10px 8px !important;
        min-height: 36px !important;
    }

    .product-image {
        height: 160px !important;
        min-height: 160px !important;
        padding: 12px 10px !important;
    }

    .product-image img {
        max-height: 160px !important;
        min-height: 160px !important;
        height: 160px !important;
    }

    .product-details {
        padding: 10px 9px !important;
        gap: 8px !important;
    }

    .product-details h3 {
        font-size: 12px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        height: 34px !important;
    }

    .price-btn {
        height: 30px !important;
        min-height: 30px !important;
        padding: 5px 3px !important;
        font-size: 10px !important;
    }

    .price-btn.mrp .value,
    .price-btn.pay .value {
        font-size: 12px !important;
        margin-top: 1px !important;
    }

    .quantity-control {
        height: 34px !important;
    }

    .quantity-control .btn-qty {
        width: 26px !important;
        min-width: 26px !important;
        height: 34px !important;
        font-size: 14px !important;
    }

    .quantity-control .quantity-input {
        width: 36px !important;
        min-width: 36px !important;
        height: 34px !important;
        font-size: 12px !important;
    }

    .add-to-cart-btn,
    .add-to-cart {
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 900px) {

    .card,
    .product-card {
        max-width: 48vw !important;
        min-width: 140px !important;
    }

    .product-image {
        height: 160px !important;
        min-height: 160px !important;
    }

    .product-image img {
        max-height: 160px !important;
        min-height: 160px !important;
        height: 160px !important;
    }

    .price-btn {
        height: 58px !important;
        min-height: 58px !important;
    }
}

@media (max-width: 768px) {

    .card,
    .product-card {
        max-width: 45vw !important;
        min-width: 130px !important;
    }

    .discount-banner {
        font-size: 11px !important;
        padding: 8px 6px !important;
        min-height: 32px !important;
    }

    .product-image {
        height: 140px !important;
        min-height: 140px !important;
        padding: 10px 8px !important;
    }

    .product-image img {
        max-height: 140px !important;
        min-height: 140px !important;
        height: 140px !important;
    }

    .product-details {
        padding: 9px 8px !important;
        gap: 7px !important;
    }

    .product-details h3 {
        font-size: 11px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        height: 32px !important;
    }

    .price-btn {
        height: 42px !important;
        min-height: 42px !important;
        padding: 4px 2px !important;
        font-size: 9px !important;
    }

    .price-btn.mrp .label,
    .price-btn.pay .label {
        font-size: 12px !important;
    }

    .price-btn.mrp .value,
    .price-btn.pay .value {
        font-size: 12px !important;
    }

    .wishlist {
        width: 20px !important;
        min-width: 20px !important;
    }

    .quantity-control {
        height: 32px !important;
    }

    .quantity-control .btn-qty {
        width: 24px !important;
        min-width: 24px !important;
        height: 32px !important;
        font-size: 12px !important;
    }

    .quantity-control .quantity-input {
        width: 34px !important;
        min-width: 34px !important;
        height: 32px !important;
        font-size: 11px !important;
    }

    .add-to-cart-btn,
    .add-to-cart {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        font-size: 9px !important;
    }
}

@media (max-width: 480px) {

    .card,
    .product-card {
        max-width: 100% !important;
        min-width: 100% !important;
        margin: 0 auto 10px auto !important;
    }

    .discount-banner {
        font-size: 10px !important;
        padding: 6px 4px !important;
        min-height: 30px !important;
    }

    .product-image {
        height: 130px !important;
        min-height: 130px !important;
    }

    .product-image img {
        max-height: 130px !important;
        min-height: 130px !important;
        height: 130px !important;
    }

    .product-details h3 {
        font-size: 10px !important;
        min-height: 28px !important;
        max-height: 28px !important;
        height: 28px !important;
    }

    .price-btn {
        height: 40px !important;
        min-height: 40px !important;
    }

    .price-btn.pay .value {
        font-size: 12px !important;
    }
}


/* --- Discount Bar (fallback) --- */
.discount-bar {
    background: #FF6600 !important;
    color: #fff !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 8px 0 !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    min-height: unset !important;
}

/* --- Out of Stock Overlay --- */
.out-of-stock {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: #FFE4E1 !important;
    color: #C2185B !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 12px 16px !important;
    border-radius: 3px !important;
    z-index: 10 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 180px !important;
    width: auto !important;
}

/* --- Cart Added Highlight --- */
.add-to-cart-btn.cart-added-highlight {
    border: 2px solid #FFD600 !important;
    background: #FF7700 !important;
    color: #fff !important;
    box-shadow: 0 0 0 4px rgba(255, 214, 0, 0.2), 0 2px 8px rgba(255, 119, 0, 0.3) !important;
}

/* --- Product Grid Layouts --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

.products-grid .product-card {
    width: 100% !important;
    max-width: 240px !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-self: center;
}

@media (min-width: 992px) {
    .products-grid.wishlist-grid {
        gap: 20px !important;
    }
}

.wishlist-grid .card.product-card {
    height: 100%;
    max-width: 240px !important;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
    }

    .product-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
}

/* --- Wishlist Icon Active State --- */
.wishlist-label.wishlist-active,
.heart-checkbox:checked+.wishlist-label {
    color: #E91E63 !important;
    -webkit-text-stroke: 0.5px #E91E63 !important;
    filter: drop-shadow(0 2px 4px rgba(233, 30, 99, 0.3)) !important;
}

/* --- Additional Utility Styles --- */
.product-card.out-of-stock .read-more {
    cursor: pointer;
}

/* Ensure consistent box-sizing across all product card elements */
* {
    box-sizing: border-box;
}

    {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1000px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {

    /* Switch grid to 1 column for horizontal cards for all mobile devices */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 0 5px !important;
    }

    .products-grid .product-card,
    .card.product-card {
        max-width: 100% !important;
        flex-direction: column !important;
        /* Banner on top, then info below */
        align-items: stretch !important;
        text-align: left !important;
        width: 100%;
        margin: 0 auto 8px auto !important;
    }

    /* Keep the SAVE banner at the top */
    .discount-banner {
        width: 100% !important;
        border-radius: 8px 8px 0 0 !important;
        padding: 4px 10px !important;
        /* Tighter padding */
        font-size: 11px !important;
        /* Smaller banner text */
    }

    /* Horizontal layout for image and details */
    .product-info {
        flex-direction: row !important;
        align-items: flex-start !important;
        padding: 8px !important;
        /* Reduced padding to gain space */
        gap: 6px !important;
    }

    .product-image {
        flex: 0 0 75px !important;
        /* Reduced from 85px/100px to gain massive space for text */
        width: 75px !important;
        max-width: 75px !important;
        height: 75px !important;
        min-height: 75px !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .product-image img {
        height: 100% !important;
        width: 100% !important;
        object-fit: contain !important;
    }

    .product-details {
        flex: 1 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        /* Tighter gap between rows */
        min-width: 0 !important;
    }

    .product-details h3 {
        text-align: left !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        color: #333 !important;
        min-height: 29px !important;
        max-height: unset !important;
        height: auto !important;
        margin: 0 0 2px 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }

    .price-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        /* Spread items across full width */
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .price-btn {
        flex: 1 !important;
        min-width: 0 !important;
        height: 30px !important;
        /* Standardized height */
        font-size: 12px !important;
        color: #000000 !important;
        padding: 0 6px !important;
        /* Increased padding to prevent cropping */
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .price-btn.mrp {
        flex: 18% !important;
        /* Slightly smaller to give more space */
        width: 70px !important;
        background: #D5E1ED !important;
        border-color: #D5E1ED !important;
    }

    .price-btn.pay {
        background: #ffe1c7 !important;
        border-color: #ffe1c7 !important;
    }

    .price-btn .label {
        font-size: 12px !important;
        color: #000000 !important;
    }

    .price-btn .value {
        font-size: 12px !important;
        color: #000000 !important;
    }

    .price-buttons .wishlist {
        flex: 0 0 28px !important;
        height: 30px !important;
        width: 28px !important;
        margin: 0 !important;
        margin-left: auto !important;
        /* PUSH to far right to align with cart edge */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .price-buttons .wishlist-label {
        font-size: 16px !important;
        /* Increased font-size for heart icon */
        padding: 0 !important;
    }

    .cart-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        /* 2px gap as requested */
        margin-top: 2px !important;
        align-items: center !important;
    }

    .add-to-cart-btn,
    .add-to-cart {
        /*flex: 0.75 !important;*/
        height: 30px !important;
        /* MATCH quantity control height */
        font-size: 10px !important;
        padding: 0 6px !important;
        /* Increased padding */
        white-space: nowrap !important;
        letter-spacing: 0 !important;
    }

    .add-to-cart-btn i,
    .add-to-cart i {
        font-size: 10px !important;
    }

    .quantity-control {
        flex: 0 0 39% !important;
        /* Match MRP width */
        width: 69px !important;
        height: 27px !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
    }

    .quantity-control .btn-qty {
        width: 22px !important;
        height: 30px !important;
        font-size: 14px !important;
    }

    .quantity-control .quantity-input {
        width: 22px !important;
        height: 30px !important;
        font-size: 12px !important;
    }
}

/* Ensure wishlist overlay positions correctly on card */
.product-info {
    position: relative;
}

/* ===== MOBILE ONLY OVERRIDES FOR MRP / QUANTITY MATCHING ===== */
@media (max-width: 767px) {

    /* Set manual row layouts, avoiding flex gap for absolute consistency */
    html body .product-card .price-buttons,
    html body .product-card .cart-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        /* disabled gap, using margin */
        width: 100% !important;
        padding: 0 !important;
    }

    /* Exact Math: W_mrp + 5 + W_pay + 5 + 26 = 100% */
    /* 2 * W + 36 = 100% => W = 50% - 18px */
    html body .product-card .price-buttons .price-btn.mrp {
        flex: 0 0 calc(50% - 18px) !important;
        min-width: calc(50% - 18px) !important;
        max-width: calc(50% - 18px) !important;
        width: calc(50% - 18px) !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 2px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: #D5E1ED !important;
        border-color: #D5E1ED !important;
        color: #000000 !important;
        font-size: 12px !important;
    }

    html body .product-card .price-buttons .price-btn.pay {
        flex: 0 0 calc(50% - 18px) !important;
        min-width: calc(50% - 18px) !important;
        max-width: calc(50% - 18px) !important;
        width: calc(50% - 18px) !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 2px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: #ffe1c7 !important;
        border-color: #ffe1c7 !important;
        color: #000000 !important;
        font-size: 12px !important;
    }

    html body .product-card .cart-actions .quantity-control {
        flex: 0 0 calc(50% - 18px) !important;
        min-width: calc(50% - 18px) !important;
        max-width: calc(50% - 18px) !important;
        width: calc(50% - 18px) !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 2px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
    }

    /* Set exact 5px gaps */
    html body .product-card .price-buttons .price-btn.mrp,
    html body .product-card .price-buttons .price-btn.pay,
    html body .product-card .cart-actions .quantity-control {
        margin-right: 5px !important;
    }

    /* Fix internal quantity bounds */
    html body .product-card .cart-actions .quantity-control .btn-qty {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        flex: 0 0 20px !important;
        width: 20px !important;
        min-width: 20px !important;
        max-width: 20px !important;
        padding: 0 !important;
        background: transparent !important;
        transition: background-color 0.15s ease !important;
    }

    html body .product-card .cart-actions .quantity-control .btn-qty:hover,
    html body .product-card .cart-actions .quantity-control .btn-qty:active {
        background: #f1f1f1 !important;
    }

    html body .product-card .cart-actions .quantity-control .quantity-input {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    /* Force Wishlist exact width to complete 100% equation */
    html body .product-card .price-buttons .wishlist {
        flex: 0 0 26px !important;
        width: 26px !important;
        min-width: 26px !important;
        max-width: 26px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    /* Allow ADD TO CART to identically fill the remaining 50% + 13px */
    html body .product-card .cart-actions .add-to-cart-btn,
    html body .product-card .cart-actions .add-to-cart {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        margin: 0 !important;
    }

    /* Home Page Sliders Alignment Fixes (Discounted & Featured) */
    html body .discounted-products-container,
    html body .featured-products-container {
        scroll-snap-type: x mandatory !important;
        scroll-padding-left: 10px !important;
        padding: 5px 10px 5px 10px !important;
        /* Add left/right padding to start off the edge */
    }

    html body .discounted-products-container .product-card,
    html body .featured-products-container .product-card {
        scroll-snap-align: start !important;
    }
}

/* Standardised Wishlist Icon (Bootstrap style ala Header) */
.header-wishlist-icon {
    font-size: 16px !important;
    color: #a0a0a0 !important;
    -webkit-text-stroke: 0px transparent !important;
    text-stroke: 0px transparent !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}

.wishlist-active .header-wishlist-icon,
.heart-checkbox:checked+.wishlist-label .header-wishlist-icon {
    color: #FF7700 !important;
}

.product-unit-price {
    color: #666;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 2px 0 8px;
    text-align: right;
}

.product-detail-unit-price {
    align-self: center;
    color: #666;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1;
    padding: 0 8px;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .product-details .product-unit-price {
        order: 1 !important;
        margin: 0 0 4px !important;
        text-align: right !important;
    }

    .product-details .product-title-link {
        order: 2 !important;
    }

    .product-details > h3 {
        order: 2 !important;
    }

    .product-details .price-buttons,
    .product-details .price-buttons1,
    .product-details .modern-prices {
        order: 3 !important;
    }

    .product-details .cart-actions,
    .product-details .cart-controls,
    .product-details .read-more {
        order: 4 !important;
    }
}
