/* Recommended Products Block - Modern 2026 Design */

/* =============================================
   MAIN CONTAINER
   ============================================= */
.pw-recommended-products {
    margin: 2rem 0;
    padding: 0;
}

/* Section Header */
.pw-recommended-products__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0;
}

.pw-recommended-products__title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.3;
}

.pw-recommended-products__title-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #6b7280;
}

/* =============================================
   PRODUCTS GRID / SCROLL CONTAINER
   ============================================= */
.pw-recommended-products__list {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0 1rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

/* Custom scrollbar */
.pw-recommended-products__list::-webkit-scrollbar {
    height: 6px;
}

.pw-recommended-products__list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.pw-recommended-products__list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.pw-recommended-products__list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* =============================================
   PRODUCT CARD
   ============================================= */
.pw-recommended-products__card {
    flex: 1 1 200px;
    min-width: 180px;
    max-width: 220px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pw-recommended-products__card:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* Card Label (Best Overall, etc.) */
.pw-recommended-products__label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 4px 8px;
    border-radius: 11px 11px 0 0;
    z-index: 5;
}

/* Product Image */
.pw-recommended-products__image {
    width: 100%;
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    overflow: hidden;
    border-radius: 8px;
    background: #f9fafb;
}

.pw-recommended-products__image figure {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-recommended-products__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

/* Product Title Badge */
.pw-recommended-products__product-title {
    display: inline-block;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

/* Product Subtitle (Linked) */
.pw-recommended-products__subtitle {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 0.5rem;
}

.pw-recommended-products__subtitle a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.pw-recommended-products__subtitle a:hover {
    color: #2563eb;
}

/* Description Text */
.pw-recommended-products__description {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 0.75rem;
    flex-grow: 1;
}

/* =============================================
   BUYING OPTIONS
   ============================================= */
.pw-recommended-products__buying-options {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* Primary CTA Button */
.pw-recommended-products__cta {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #000;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 8px;
    box-shadow:
        0 2px 4px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: none;
    line-height: 1.3;
}

.pw-recommended-products__cta:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-1px);
    box-shadow:
        0 4px 8px rgba(245, 158, 11, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    color: #000;
    text-decoration: none;
}

/* Secondary Link */
.pw-recommended-products__secondary-link {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    color: #2563eb;
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.15s ease;
}

.pw-recommended-products__secondary-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Price Note */
.pw-recommended-products__price-note {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.6875rem;
    font-weight: 400;
    color: #9ca3af;
    text-align: center;
    margin: 0.25rem 0 0;
    line-height: 1.4;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 540px) {
    .pw-recommended-products__title {
        font-size: 1.5rem;
    }
}

/* =============================================
   EDITOR PREVIEW STYLES
   ============================================= */
.pw-recommended-products--preview {
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
}

.pw-recommended-products--preview .pw-recommended-products__card {
    background: #fff;
}

.pw-recommended-products--preview .pw-recommended-products__image {
    background: #e5e7eb;
}

.pw-recommended-products--preview .pw-recommended-products__image img {
    opacity: 0.8;
}
