/* Main Product v1.2 - Styles */

.main-product-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
}

.main-product-grid[data-columns="1"] { grid-template-columns: 1fr; }
.main-product-grid[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.main-product-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.main-product-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.main-product-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.main-product-grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

/* Card — no hover animation */
.main-product-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
}

/* Image container — full width mode */
.main-product-image-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.main-product-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Padded image mode (not full width) — aligned with content padding */
.main-product-image-wrap.mp-padded {
    width: auto;
    margin: 16px 16px 0 16px;
}

.main-product-image-wrap.mp-padded img {
    width: 100%;
    border-radius: 8px;
}

/* Full width mode — no border radius on image */
.main-product-image-wrap.mp-full-width img {
    border-radius: 0 !important;
}

/* Hover image — only for hover mode */
.main-product-image-wrap .mp-img-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    object-fit: cover;
    transition: opacity 0.4s ease;
}

.main-product-image-wrap.mp-hover-mode:hover .mp-img-hover {
    opacity: 1;
}

.main-product-image-wrap.mp-hover-mode:hover .mp-img-main {
    opacity: 0;
}

/* Single image mode — NO hover animation at all */
.main-product-image-wrap.mp-single-mode .mp-img-main {
    transition: none;
}

/* Content area */
.main-product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title */
.main-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

/* Info toggle button — with plus icon */
.main-product-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    transition: color 0.2s ease;
    text-align: left;
}

.main-product-info-btn:hover {
    color: #000;
}

.main-product-info-btn .mp-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.main-product-info-btn.active .mp-info-icon {
    transform: rotate(45deg);
}

/* Info content */
.main-product-info-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.main-product-info-content.open {
    opacity: 1;
}

.main-product-info-text {
    padding: 10px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Price */
.main-product-price {
    margin: 10px 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

/* Extra button */
.main-product-extra-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #333;
    color: #fff;
    margin-top: 8px;
    text-align: center;
}

.main-product-extra-btn:hover {
    opacity: 0.85;
}

/* Background image on card */
.main-product-card.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Responsive defaults */
@media (max-width: 1024px) {
    .main-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .main-product-grid {
        grid-template-columns: 1fr;
    }
    .main-product-image-wrap.mp-padded {
        margin: 12px 12px 0 12px;
    }
}
