/* ==========================================================================
   Wildpack Affiliate Block — Frontend & Editor Styles
   ========================================================================== */

.wpa-affiliate {
    background: #faf7f2;
    border-radius: 10px;
    padding: 28px 30px;
    margin: 28px 0;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wpa-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #1e3b28;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #c76b2b;
}

/* Carousel wrapper */
.wpa-carousel-wrap {
    position: relative;
}

.wpa-carousel {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wpa-carousel::-webkit-scrollbar {
    display: none;
}

.wpa-track {
    display: flex;
    gap: 16px;
    padding: 4px 0;
}

/* Arrows */
.wpa-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid #d6d0c7;
    background: #fff;
    color: #1e3b28;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    z-index: 3;
    padding: 0;
    line-height: 0;
}

.wpa-arrow svg {
    display: block;
}

.wpa-arrow:hover {
    border-color: #c76b2b;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.16);
}

.wpa-arrow:hover svg {
    stroke: #c76b2b;
}

.wpa-arrow-left {
    left: -18px;
}

.wpa-arrow-right {
    right: -18px;
}

/* Product card */
.wpa-card {
    flex: 0 0 180px;
    min-width: 160px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2ddd5;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.wpa-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.wpa-card-img-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f5f0e8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.wpa-card-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s;
}

.wpa-card:hover .wpa-card-img {
    transform: scale(1.06);
}

.wpa-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wpa-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e3b28;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpa-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c2c2c;
    margin-bottom: 12px;
}

.wpa-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 14px;
    background: #c76b2b;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s;
    margin-top: auto;
    text-decoration: none;
    white-space: nowrap;
}

.wpa-card:hover .wpa-card-cta {
    background: #b55e22;
}

/* Disclosure */
.wpa-disclosure {
    font-size: 0.72rem;
    color: #999;
    text-align: center;
    margin: 14px 0 0 0;
    font-style: italic;
}

/* ==========================================================================
   Editor preview
   ========================================================================== */

.wpa-editor-wrap {
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wpa-editor-preview .wpa-track {
    scrollbar-width: thin;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .wpa-affiliate {
        padding: 20px 18px;
    }

    .wpa-card {
        flex: 0 0 160px;
        min-width: 140px;
    }

    .wpa-card-img-wrap {
        height: 130px;
        padding: 10px;
    }

    .wpa-arrow {
        width: 36px;
        height: 36px;
    }

    .wpa-arrow-left {
        left: -10px;
    }

    .wpa-arrow-right {
        right: -10px;
    }
}

@media (max-width: 480px) {
    .wpa-card {
        flex: 0 0 150px;
        min-width: 130px;
    }

    .wpa-card-img-wrap {
        height: 120px;
    }

    .wpa-arrow {
        display: none;
    }
}
