
/* ==========================================
   ARTIZANA - PRODUCT SHOWCASE
   ========================================== */

.vp-products {
    --vp-primary: var(--wp--preset--color--primary, #00432f);
    --vp-olive: var(--wp--preset--color--olive, #48664e);
    --vp-cream: var(--wp--preset--color--cream, #f8f5ee);
    --vp-ink: var(--wp--preset--color--ink, #292929);
    --vp-white: var(--wp--preset--color--white, #ffffff);
    --vp-display: var(--wp--preset--font-family--display, Georgia, serif);
    --vp-body: var(--wp--preset--font-family--body, Arial, sans-serif);

    width: 100%;
    overflow: hidden;
    padding: 40px 0 55px;
    color: var(--vp-ink);
    font-family: var(--vp-body);
}

.vp-products .vp-wrap {
    width: 100%;
    max-width: var(--wp--style--global--wide-size, 1600px);
    margin-inline: auto;
}

/* Section heading */

.vp-products .vp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.vp-products .vp-section-head h2 {
    margin: 0;
    color: var(--vp-primary);
    font-family: var(--vp-display);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 400;
    line-height: 1.15;
}

.vp-products .vp-section-head > a {
    color: var(--vp-primary);
    font-family: var(--vp-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.vp-products .vp-section-head > a:hover {
    color: var(--vp-olive);
}

/* ==========================================
   SWIPER
   ========================================== */

.vp-product-slider-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.vp-product-swiper {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 5px 3px 20px;
}

.vp-product-swiper > .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.vp-product-swiper .swiper-slide {
    display: flex;
    flex-shrink: 0;
    height: auto;
    box-sizing: border-box;
}

/* ==========================================
   PRODUCT CARD
   ========================================== */

.vp-product-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: var(--vp-white);
    border: 1px solid #eee6da;
    border-radius: 13px;
    box-shadow: 0 5px 18px rgba(0, 67, 47, 0.04);
    transition:
        box-shadow 200ms ease,
        transform 200ms ease;
}

.vp-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0, 67, 47, 0.09);
}

/* Product image */

.vp-product-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 255px;
    padding: 12px;
    overflow: hidden;
    background: #faf9f6;
}

.vp-product-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.vp-product-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 250ms ease;
}

.vp-product-card:hover .vp-product-card__image img {
    transform: scale(1.03);
}

/* Sale badge */

.vp-product-card__sale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 12px;
    color: var(--vp-primary);
    background: var(--vp-cream);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Product content */

.vp-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px 20px;
}

.vp-product-card__title {
    margin: 0 0 12px;
    font-family: var(--vp-display);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.3;
}

.vp-product-card__title a {
    display: -webkit-box;
    overflow: hidden;
    color: var(--vp-primary);
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.vp-product-card__title a:hover {
    color: var(--vp-olive);
}

/* Short description */

.vp-product-card__description {
    margin: 0 0 14px;
    color: #69716e;
    font-family: var(--vp-body);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ==========================================
   PRICE AND ADD TO CART
   ========================================== */

.vp-product-card__footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    margin-top: auto;
}

.vp-product-card__price {
    margin: 0;
    color: var(--vp-primary);
    font-family: var(--vp-body);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}

.vp-product-card__price del {
    margin-right: 6px;
    color: #929a96;
    font-size: 0.8rem;
    font-weight: 400;
}

.vp-product-card__price ins {
    color: var(--vp-primary);
    text-decoration: none;
}

.vp-product-card__cart {
    display: flex;
    width: 100%;
    margin: 0;
}

.vp-products .vp-product-card__action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100% !important;
    min-height: 50px;
    padding: 12px 18px !important;
    margin: 0 !important;

    color: var(--vp-white) !important;
    background: var(--vp-primary) !important;
    border: 1px solid var(--vp-primary) !important;
    border-radius: 4px !important;

    font-family: var(--vp-body);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;

    box-shadow: none !important;
    cursor: pointer;

    transition:
        background-color 180ms ease,
        border-color 180ms ease;
}

.vp-products .vp-product-card__action:hover {
    color: var(--vp-white) !important;
    background: var(--vp-olive) !important;
    border-color: var(--vp-olive) !important;
}

.vp-products .vp-product-card__action:focus-visible {
    outline: 2px solid var(--vp-primary);
    outline-offset: 3px;
}

.vp-product-card__cart-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.vp-product-card__out-of-stock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 12px;
    color: #777;
    background: var(--vp-cream);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ==========================================
   NAVIGATION ARROWS
   ========================================== */

.vp-product-slider-arrow {
    position: absolute;
    top: 45%;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;
    padding: 0 0 3px;

    color: var(--vp-primary);
    background: var(--vp-white);
    border: 1px solid #edf0ed;
    border-radius: 50%;

    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 1.8rem;
    line-height: 1;

    transform: translateY(-50%);
    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.vp-product-slider-arrow:hover {
    color: var(--vp-white);
    background: var(--vp-primary);
    transform: translateY(-50%) scale(1.05);
}

.vp-product-slider-arrow--prev {
    left: -22px;
}

.vp-product-slider-arrow--next {
    right: -22px;
}

.vp-product-slider-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.vp-product-slider-arrow.swiper-button-lock {
    display: none;
}

/* ==========================================
   PAGINATION
   ========================================== */

.vp-product-slider-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 15px;
    margin-top: 12px;
}

.vp-product-slider-pagination .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    margin: 0 !important;
    background: #d1d5d2;
    border-radius: 50%;
    opacity: 1;
    transition:
        background-color 200ms ease,
        width 200ms ease;
}

.vp-product-slider-pagination .swiper-pagination-bullet-active {
    background: var(--vp-primary);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1280px) {
    .vp-products .vp-wrap {
        padding-inline: 24px;
    }

    .vp-product-slider-arrow--prev {
        left: 0;
    }

    .vp-product-slider-arrow--next {
        right: 0;
    }
}

@media (max-width: 767px) {
    .vp-products {
        padding: 28px 0 40px;
    }

    .vp-products .vp-wrap {
        padding-inline: 16px;
    }

    .vp-products .vp-section-head {
        gap: 12px;
        margin-bottom: 22px;
    }

    .vp-products .vp-section-head h2 {
        font-size: 1.5rem;
    }

    .vp-products .vp-section-head > a {
        font-size: 0.75rem;
    }

    .vp-product-swiper {
        padding-bottom: 16px;
    }

    .vp-product-card__media {
        height: 195px;
        padding: 10px;
    }

    .vp-product-card__body {
        padding: 15px;
    }

    .vp-product-card__title {
        font-size: 1.05rem;
    }

    .vp-product-card__description {
        font-size: 0.8rem;
    }

    .vp-product-card__price {
        font-size: 1rem;
    }

    .vp-products .vp-product-card__action {
        min-height: 44px;
        padding: 10px 12px !important;
        font-size: 0.78rem;
    }

    .vp-product-card__cart-icon {
        width: 18px;
        height: 18px;
    }

    .vp-product-slider-arrow {
        display: none;
    }
}

/* Hide unused elements */

.vp-products .vp-product-card__wishlist,
.vp-products .vp-product-card__rating,
.vp-products .vp-product-card__review-count,
.vp-products .vp-product-card__no-rating {
    display: none !important;
}
