/* Premium Product Grid Styles */
.ez-product-grid-wrap {
    width: 100%;
    padding: 20px 0;
}

.ez-product-grid {
    display: grid;
    background-color: transparent;
    border: none;
    /* Dynamic variables from Elementor */
    --ez-img-zoom-default: 1.12;
    --ez-img-zoom-hover: 1.05;
    --ez-img-brightness-hover: 1.05;
    --ez-img-transition: 0.6s;
    --ez-img-slide-y: 0px;
}

.ez-grid-card {
    background: #fff;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 25px;
}

.ez-grid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.ez-grid-img-link {
    display: block;
    width: 100%;
    text-decoration: none;
}

.ez-grid-img-wrap {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid #00000011;
    position: relative;
    background: #ffffff;
}

.ez-grid-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all var(--ez-img-transition) cubic-bezier(0.165, 0.84, 0.44, 1);
    padding: 0;
    transform: scale(var(--ez-img-zoom-default)) translateY(0);
}

.ez-grid-img.secondary-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}

/* Effects Definitions */
.ez-hover-none .ez-grid-card:hover .ez-grid-img { transform: scale(var(--ez-img-zoom-default)); }

.ez-hover-zoom-in .ez-grid-card:hover .ez-grid-img { transform: scale(var(--ez-img-zoom-hover)); }
.ez-hover-zoom-out .ez-grid-card:hover .ez-grid-img { transform: scale(var(--ez-img-zoom-hover)); }

.ez-hover-slide-up .ez-grid-card:hover .ez-grid-img { transform: scale(var(--ez-img-zoom-default)) translateY(-15px); }
.ez-hover-slide-down .ez-grid-card:hover .ez-grid-img { transform: scale(var(--ez-img-zoom-default)) translateY(15px); }

.ez-hover-grow .ez-grid-card:hover .ez-grid-img { transform: scale(var(--ez-img-zoom-hover)) translateY(-10px); }

/* Apply Brightness to all effects on hover */
.ez-grid-card:hover .main-img, 
.ez-grid-card:hover .secondary-img {
    filter: brightness(var(--ez-img-brightness-hover));
}

/* Secondary Image Swap with Effects */
.has-secondary:not(.variation-active):hover .main-img {
    opacity: 0;
    visibility: hidden;
}

.has-secondary:not(.variation-active):hover .secondary-img {
    opacity: 1;
    visibility: visible;
}

/* Variation Active Hover override if needed */
.variation-active:hover .main-img {
    opacity: 1;
    visibility: visible;
}

.variation-active:hover .secondary-img {
    opacity: 0;
    visibility: hidden;
}

.ez-grid-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 5px 0;
}

.ez-grid-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #000;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
}

.ez-grid-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ez-grid-title a:hover {
    opacity: 0.7;
}

.ez-grid-meta {
    margin-bottom: 15px;
}

.ez-grid-sku, .ez-grid-price, .ez-grid-tax, .ez-grid-custom-info {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #888;
    margin-bottom: 4px;
    line-height: 1.4;
    font-weight: 400;
}

.ez-grid-sku .sku-val, 
.ez-grid-price .price-val,
.ez-grid-custom-info .info-val {
    color: #444;
}

.ez-info-tags-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-left: 5px;
    vertical-align: middle;
}

.ez-info-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 13px;
    color: #444;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ez-info-tag:hover {
    border-color: #999;
}

.ez-info-tag.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.ez-grid-tax {
    font-size: 11px;
    color: #bbb;
    margin-top: 2px;
}

.ez-grid-price-row {
    font-size: 15px;
    color: #888;
    margin-bottom: 4px;
}

.ez-grid-price-row .p-val {
    color: #444;
}

/* Color Swatches */
.ez-grid-swatches {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.ez-grid-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.ez-grid-swatch:hover {
    transform: scale(1.3);
}

.ez-grid-swatch.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #000;
}

/* Footer Button - Link Style */
.ez-grid-footer {
    margin-top: auto;
}

.ez-grid-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #666;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0;
}

.ez-grid-btn svg {
    transition: transform 0.3s ease;
}

.ez-grid-btn:hover {
    color: #000;
    background: transparent;
}

.ez-grid-btn:hover svg {
    transform: translateX(5px);
}

/* Mobile Adjustments */
@media (max-width: 767px) {
    .ez-grid-card {
        padding: 20px;
        min-height: auto;
    }
    .ez-grid-img-wrap {
        height: 200px;
    }
    .ez-grid-title {
        font-size: 16px;
    }
}
