/**
 * Latest products Elementor widget
 */

.mn-latest-products {
    --mn-lp-cols: 4;
    --mn-lp-primary: var(--mn-theme-primary, #2563eb);
    --mn-lp-text: var(--mn-theme-text, #334155);
    --mn-lp-muted: color-mix(in srgb, var(--mn-theme-text, #334155) 58%, #fff);
    --mn-lp-border: #e8edf2;
    --mn-lp-soft: #f8fafc;
}

.mn-latest-products--notice {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.mn-latest-products__header {
    margin: 0 0 1.25rem;
    text-align: center;
}

.mn-latest-products__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    color: color-mix(in srgb, var(--mn-lp-text) 88%, #000);
    letter-spacing: -0.02em;
}

.mn-latest-products__subtitle {
    margin: 0 auto;
    max-width: 640px;
    color: var(--mn-lp-muted);
    line-height: 1.8;
}

.mn-latest-products__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding: 0.15rem 0.1rem 0.55rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.mn-latest-products__tab {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--mn-lp-border);
    border-radius: 999px;
    background: #fff;
    color: var(--mn-lp-muted);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mn-latest-products__tab:hover,
.mn-latest-products__tab.is-active {
    background: var(--mn-lp-primary);
    border-color: var(--mn-lp-primary);
    color: #fff;
}

.mn-latest-products__body {
    min-height: 120px;
}

.mn-latest-products__body.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.mn-latest-products__grid {
    display: grid;
    grid-template-columns: repeat(var(--mn-lp-cols, 4), minmax(0, 1fr));
    gap: 1.15rem;
}

.mn-lp-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--mn-lp-border);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.mn-lp-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--mn-lp-primary) 28%, var(--mn-lp-border));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.mn-lp-card__media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(145deg, color-mix(in srgb, var(--mn-lp-primary) 8%, #fff), #fff);
}

.mn-lp-card__media img,
.mn-lp-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mn-lp-card:hover .mn-lp-card__media img {
    transform: scale(1.05);
}

.mn-lp-card__badge {
    position: absolute;
    top: 0.75rem;
    inset-inline-start: 0.75rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e11d48, #f43f5e);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
}

.mn-lp-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.95rem 1rem 1.05rem;
    flex: 1;
}

.mn-lp-card__cat {
    align-self: flex-start;
    padding: 0.18rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mn-lp-primary) 10%, transparent);
    color: var(--mn-lp-primary);
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
}

.mn-lp-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
}

.mn-lp-card__title a {
    color: color-mix(in srgb, var(--mn-lp-text) 88%, #000);
    text-decoration: none;
}

.mn-lp-card__title a:hover {
    color: var(--mn-lp-primary);
}

.mn-lp-card__price {
    color: var(--mn-lp-primary);
    font-weight: 800;
}

.mn-lp-card__price del {
    opacity: 0.55;
    margin-inline-end: 0.3rem;
    color: var(--mn-lp-muted);
}

.mn-lp-card__action {
    margin-top: auto;
    padding-top: 0.4rem;
}

.mn-lp-card__action .button,
.mn-lp-card__action .add_to_cart_button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--mn-lp-primary), color-mix(in srgb, var(--mn-theme-secondary, var(--mn-lp-primary)) 55%, var(--mn-lp-primary)));
    color: #fff !important;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
}

.mn-latest-products__empty {
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--mn-lp-muted);
    background: var(--mn-lp-soft);
    border: 1px dashed var(--mn-lp-border);
    border-radius: 14px;
}

.mn-latest-products__footer {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.mn-latest-products__shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    background: var(--mn-lp-primary);
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--mn-lp-primary) 28%, transparent);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.mn-latest-products__shop-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    color: #fff !important;
}

@media (max-width: 1024px) {
    .mn-latest-products__grid {
        grid-template-columns: repeat(var(--mn-lp-cols, 2), minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .mn-latest-products__grid {
        grid-template-columns: repeat(var(--mn-lp-cols, 1), minmax(0, 1fr));
        gap: 0.9rem;
    }

    .mn-latest-products__tabs {
        margin-inline: -0.25rem;
        padding-bottom: 0.75rem;
    }
}
