/* Default soft shadow style override & compact sleek dimensions */
.product-card {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid rgba(236, 231, 221, 0.7) !important;
    transition: all 0.25s ease-in-out;
}

/* Image hover transition */
.product-card .product-card-img-primary {
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card .product-card-img-hover {
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Hover effects only on real hover devices (mouse). On touch screens a :hover
   that reveals content (the alternate image fading in) makes iOS/Android treat
   the first tap as "hover" and swallow it, so tapping a card did nothing. */
@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06) !important;
        transform: translateY(-2px);
    }
    .product-card:hover .product-card-img-primary {
        transform: scale(1.03);
    }
    .product-card:hover .product-card-img-hover {
        opacity: 1 !important;
        transform: scale(1.03);
    }
    .product-card:hover .product-actions {
        transform: translateY(0) !important;
    }
}

/* Touch devices: never render the hover-only image, and remove tap delay. */
@media (hover: none), (pointer: coarse) {
    .product-card .product-card-img-hover {
        display: none;
    }
    .product-card a {
        touch-action: manipulation;
    }
}

.product-card .card-body {
    padding: 8px 12px 10px 12px !important;
}

.product-card .product-card-title {
    font-size: 0.90rem;
    font-weight: 500;
    line-height: 1.3;
}

.product-card .card-title {
    min-height: 2.3rem;
    margin-bottom: 4px !important;
}

.product-card .price-select-row {
    margin-bottom: 6px !important;
    padding-top: 5px !important;
}

.product-card .card-sale-price {
    font-size: 1.02rem;
}

.product-card .card-mrp-price {
    font-size: 0.72rem;
}

.product-card .btn-premium {
    padding: 6px 10px !important;
    font-size: 0.73rem !important;
    letter-spacing: 0.2px !important;
}

.product-card .btn-premium i {
    font-size: 0.85rem;
}

.product-card .card-best-price {
    font-size: 0.62rem !important;
    padding: 2px 7px !important;
}

.product-card .product-badge-row {
    min-height: 24px !important;
    padding-top: 6px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Responsive custom compact classes for product card in mobile viewports */
@media (max-width: 767px) {
    .product-card {
        border-radius: 12px !important;
    }
    .product-card .product-card-title {
        font-size: 0.78rem !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
    }
    .product-card .card-title {
        min-height: 2rem !important;
        margin-bottom: 4px !important;
    }
    .product-card .price-select-row {
        padding-top: 4px !important;
        margin-bottom: 6px !important;
    }
    .product-card .card-sale-price {
        font-size: 0.88rem !important;
        font-weight: 700 !important;
    }
    .product-card .card-mrp-price {
        font-size: 0.68rem !important;
    }
    .product-card .btn-premium {
        font-size: 0.66rem !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
        letter-spacing: 0.2px !important;
    }
    .product-card .btn-premium i {
        font-size: 0.76rem !important;
    }
    .product-card .card-best-price {
        font-size: 0.56rem !important;
        padding: 2px 5px !important;
    }
    .product-card .badge {
        font-size: 0.54rem !important;
    }
    .product-card .product-badge-row {
        min-height: 20px !important;
        padding-top: 4px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    .product-card .card-body {
        padding: 6px 8px 8px 8px !important;
    }
    .product-image-container {
        border-radius: 12px 12px 0 0 !important;
    }
}

/* On narrow devices, stack price and variant dropdown */
@media (max-width: 480px) {
    .product-card .price-select-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 3px !important;
    }
    .product-card .price-select-row > .w-50 {
        width: 100% !important;
    }
    /* Price block first */
    .product-card .price-select-row > .price-container {
        order: 1;
        align-items: flex-start !important;
        margin-bottom: 2px;
    }
    .product-card .price-select-row > .price-container .d-flex {
        justify-content: flex-start !important;
    }
    /* Variant select second, directly above Add to Cart */
    .product-card .price-select-row > div:not(.price-container) {
        order: 2;
    }
    .product-card .price-select-row .variant-selector {
        width: 100% !important;
        padding: 2px 5px !important;
        font-size: 0.7rem !important;
    }
}
