/* ═══════════════════════════════════════════════════════════════
   Shopnex Pro Addons — Product Carousel Widget
   ═══════════════════════════════════════════════════════════════ */

/* ==========================================
   SECTION HEADER
   ========================================== */

.snpa-pc-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.snpa-pc-section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #B8977E;
    margin-bottom: 8px;
}

.snpa-pc-section-title {
    font-size: 40px;
    font-weight: 500;
    color: #1C1C1C;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.snpa-pc-section-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #6B6560;
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   SWIPER BASE STRUCTURAL STYLES
   (Required for proper carousel layout)
   ========================================== */

.snpa-pc-carousel .swiper {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
    display: block;
}

.snpa-pc-carousel .swiper-vertical > .swiper-wrapper {
    flex-direction: column;
}

.snpa-pc-carousel .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.snpa-pc-carousel .swiper-android .swiper-slide,
.snpa-pc-carousel .swiper-wrapper {
    transform: translate3d(0, 0, 0);
}

.snpa-pc-carousel .swiper-horizontal {
    touch-action: pan-y;
}

.snpa-pc-carousel .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
    display: block;
}

.snpa-pc-carousel .swiper-slide-invisible-blank {
    visibility: hidden;
}

/* Auto-height */
.snpa-pc-carousel .swiper-autoheight,
.snpa-pc-carousel .swiper-autoheight .swiper-slide {
    height: auto;
}

.snpa-pc-carousel .swiper-autoheight .swiper-wrapper {
    align-items: flex-start;
    transition-property: transform, height;
}

/* Backface hidden (3D transforms fix) */
.snpa-pc-carousel .swiper-backface-hidden .swiper-slide {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* ─── Notice ─── */
.snpa-pc-notice {
    text-align: center;
    padding: 40px 20px;
    color: #6B6560;
    font-size: 14px;
    background: #FBF9F6;
    border-radius: 10px;
    border: 1px dashed #E8E4DF;
}

/* ─── Carousel Container ─── */
.snpa-pc-carousel {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .snpa-pc-carousel {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ─── Product Card ─── */
.snpa-pc-product-card {
    position: relative;
    background: #FFFFFF;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snpa-pc-product-card:hover {
    box-shadow: 0 12px 40px rgba(28, 28, 28, 0.08);
    transform: translateY(-4px);
}

/* ─── Product Image ─── */
.snpa-pc-product-image-wrapper {
    position: relative;
    overflow: hidden;
}

.snpa-pc-product-link {
    display: block;
    position: relative;
    overflow: hidden;
    background: #F3EFEA;
    /* aspect-ratio is set via inline style, matching theme's .product-card-img-link */
}

.snpa-pc-product-link img,
.snpa-pc-product-image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    max-height: none;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.snpa-pc-product-card:hover .snpa-pc-product-link img {
    transform: scale(1.05);
}

/* ─── Badges ─── */
.snpa-pc-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 500;
    line-height: 1;
}

.snpa-pc-badge-sale {
    background: #C44D4D;
    color: #FFFFFF;
}

.snpa-pc-badge-outofstock {
    background: #9C9792;
    color: #FFFFFF;
}

/* ─── Product Actions (Hover Overlay) ─── */
.snpa-pc-product-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.snpa-pc-product-card:hover .snpa-pc-product-actions {
    opacity: 1;
    transform: translateY(0);
}

.snpa-pc-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #FFFFFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(28, 28, 28, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1C1C1C;
    padding: 0;
    line-height: 1;
}

.snpa-pc-action-btn:hover {
    background: #1C1C1C;
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(28, 28, 28, 0.15);
    transform: translateY(-1px);
}

/* Active / added state for wishlist */
.snpa-pc-wishlist-btn.active svg {
    fill: #C44D4D;
    stroke: #C44D4D;
}

/* Active state for compare */
.snpa-pc-compare-btn.active svg {
    fill: #B8977E;
    stroke: #B8977E;
}

/* ─── Product Info ─── */
.snpa-pc-product-info {
    padding: 16px 14px 18px;
}

/* ─── Product Title ─── */
.snpa-pc-product-title {
    font-size: 15px;
    font-weight: 500;
    color: #1C1C1C;
    letter-spacing: -0.01em;
    margin: 0 0 4px;
    line-height: 1.4;
}

.snpa-pc-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.snpa-pc-product-title a:hover {
    color: #B8977E;
}

/* ─── Star Rating ─── */
.snpa-pc-star-rating {
    display: inline-block;
    position: relative;
    font-family: star;
    font-size: 14px;
    line-height: 1;
    margin-bottom: 6px;
    height: 1em;
    width: 5.3em;
    overflow: hidden;
}

.snpa-pc-star-rating::before {
    content: '\53\53\53\53\53';
    color: #E8E4DF;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    letter-spacing: 2px;
}

.snpa-pc-star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.snpa-pc-star-rating span::before {
    content: '\53\53\53\53\53';
    color: #B8977E;
    top: 0;
    position: absolute;
    left: 0;
    letter-spacing: 2px;
}

/* ─── Product Price ─── */
.snpa-pc-product-price {
    font-size: 15px;
    font-weight: 600;
    color: #1C1C1C;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.snpa-pc-product-price del {
    text-decoration: line-through;
    color: #9C9792;
    font-weight: 400;
    margin-right: 8px;
    font-size: 13px;
    opacity: 0.8;
}

.snpa-pc-product-price ins {
    text-decoration: none;
    color: #C44D4D;
}

.snpa-pc-product-price .woocommerce-Price-amount {
    color: inherit;
}

/* ─── Product Category ─── */
.snpa-pc-product-category {
    font-size: 12px;
    color: #6B6560;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
    margin-top: 2px;
    line-height: 1.4;
}

.snpa-pc-product-category a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.snpa-pc-product-category a:hover {
    color: #B8977E;
}

/* ─── Add to Cart "+" Icon Button ─── */
.snpa-pc-add-to-cart-btn {
    text-decoration: none;
}

.snpa-pc-add-to-cart-btn.added {
    background: #166534;
    color: #FFFFFF;
    pointer-events: none;
}

.snpa-pc-add-to-cart-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Select options link styled as action button */
a.snpa-pc-select-options-btn {
    text-decoration: none;
}

a.snpa-pc-select-options-btn:hover {
    color: #FFFFFF;
}

/* ─── Carousel Navigation Arrows ─── */
.snpa-pc-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(28, 28, 28, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1C1C1C;
    padding: 0;
}

.snpa-pc-carousel-arrow svg {
    width: 18px;
    height: 18px;
}

.snpa-pc-carousel-arrow:hover {
    background: #1C1C1C;
    color: #FFFFFF;
    box-shadow: 0 8px 24px rgba(28, 28, 28, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.snpa-pc-carousel-arrow--prev {
    left: 4px;
}

.snpa-pc-carousel-arrow--next {
    right: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .snpa-pc-carousel-arrow--prev {
        left: 2px;
    }
    .snpa-pc-carousel-arrow--next {
        right: 2px;
    }
    .snpa-pc-carousel-arrow {
        width: 36px;
        height: 36px;
    }
    .snpa-pc-carousel-arrow svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .snpa-pc-product-info {
        padding: 12px 10px 14px;
    }

    .snpa-pc-product-title {
        font-size: 13px;
    }

    .snpa-pc-product-price {
        font-size: 13px;
    }

    .snpa-pc-product-category {
        font-size: 11px;
    }

    /* Always show action buttons on mobile */
    .snpa-pc-product-actions {
        opacity: 1;
        transform: translateY(0);
        bottom: 8px;
        right: 8px;
        gap: 6px;
    }

    .snpa-pc-action-btn {
        width: 32px;
        height: 32px;
    }

    .snpa-pc-action-btn svg {
        width: 14px;
        height: 14px;
    }

    .snpa-pc-carousel-arrow--prev {
        left: 4px;
    }
    .snpa-pc-carousel-arrow--next {
        right: 4px;
    }
    .snpa-pc-carousel-arrow {
        width: 34px;
        height: 34px;
    }
    .snpa-pc-carousel-arrow svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .snpa-pc-product-info {
        padding: 10px 8px 12px;
    }

    .snpa-pc-badge {
        font-size: 9px;
        padding: 4px 10px;
        top: 8px;
        left: 8px;
    }

    .snpa-pc-product-actions {
        gap: 4px;
    }

    .snpa-pc-action-btn {
        width: 28px;
        height: 28px;
    }

    .snpa-pc-action-btn svg {
        width: 12px;
        height: 12px;
    }
}
