/* --- Box Product Card Design --- */

/* The Loop Item Container (Targeting Elementor Container) */
.box-product-card-container {
    border: 1px solid #E5E5E5; 
    background-color: #F4F4F4; 
    transition: border-color 0.3s ease;
    height: auto; /* Changed from 100% to auto to allow expansion */
    min-height: 100%;
    display: flex;
    flex-direction: column;
    /* Ensure form overflow is visible */
    overflow: visible !important; 
    position: relative;
}
.box-product-card-container:hover {
    border-color: #000; /* Darker border on hover */
}

/* --- IMAGE WIDGET --- */
.box-card-image-wrapper {
    position: relative;
    width: 100%;
    /* Separator line between image and text */
    border-bottom: 1px solid #E5E5E5; 
    background-color: #F4F4F4; /* Matches card */
}

.box-img-link {
    display: block;
    width: 100%;
}

.box-img-ratio {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Default Square */
    overflow: hidden;
}

.box-img-ratio img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain; /* Keep product ratio intact inside square */
    transition: opacity 0.4s ease;
}

/* Hover Swap Logic */
.img-hover { opacity: 0; z-index: 2; }
.img-main { z-index: 1; }

.box-card-image-wrapper:hover .img-hover { opacity: 1; }


/* --- INFO WIDGET --- */
.box-card-info {
   padding: 15px 20px!important;
    display: flex!important;
    flex-direction: column!important;
    gap: 4px!important;
    font-family: var(--e-global-typography-primary-font-family), "AeonikPro", Sans-serif;
    font-size: 16px!important;
    flex-grow: 1; /* Allow to fill space */
}

/* Top Row: Title + Price */
.info-row-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.box-card-info [type=button], [type=submit], button {padding:0!important}
.p-title {
    font-size: 16px;
    text-transform: uppercase;
    color: #000;
    text-decoration: none;
    font-weight: 400;
    line-height: 1.3;
    flex: 1;
}
.p-price {
    font-size: 16px;
    color: #000;
    text-align: right;
    white-space: nowrap;
    font-weight: 400;
}
/* WooCommerce Price cleanup */
.p-price del { display: none; } /* Hide old price if on sale to keep clean? Or style it */
.p-price ins { text-decoration: none; }

/* Bottom Row: Brand */
.info-row-bot {
    display: flex;
}
.p-brand {
    font-size: 16px;
    text-transform: uppercase;
    color: #000; /* Grey text for brand */
    letter-spacing: 0.5px;
}

/* Mobile Tweak */
@media (max-width: 767px) {
    .box-card-info { padding: 12px; }
    .p-title, .p-price { font-size: 12px; }
}
