/*
 * Affiliate Product Ingest - Frontend Styles
 */

/* Compare Table Styles */
.aff-compare-table-wrapper {
    margin: 20px 0;
    position: relative;
}

.aff-section-title {
    font-size: 16px !important;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.0050rem !important;
}

.aff-winner-badge {
    text-align: center;
    margin-bottom: 15px;
}

.aff-winner-badge .winner-label {
    background: #ff6b35;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
}

.aff-compare-table-container {
    overflow-x: auto;
    margin-bottom: 15px;
}

.aff-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.aff-compare-table th {
    background: #f8f9fa;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
}

.aff-compare-table td {
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    padding: 12px 6px 12px 10px !important;
}

.aff-compare-table .column-action {
    text-align: center;
    min-width: 160px;
    vertical-align: middle !important;
}

.aff-compare-table .wp-block-button {
    margin: 5px 0;
}

.aff-compare-table .wp-block-button__link {
    padding: 8px 16px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    font-family: Arial !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

/* Hover states for compare table buttons */
.aff-compare-table .wp-block-button__link:hover {
    transform: translateY(-1px) !important;
}

/* Regular button (green) hover */
.aff-compare-table .wp-block-button__link.has-secondary-background-color:hover {
    background-color: #218838 !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3) !important;
}

/* Winner button should use accent color (orange) with specific styling */
.aff-compare-table .winner-row .wp-block-button .wp-block-button__link.has-primary-background-color {
    background-color: var(--aff-accent-color, #ff6b35) !important;
    border-color: var(--aff-accent-color, #ff6b35) !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    font-family: Arial !important;
}

/* Winner button (orange) hover */
.aff-compare-table .winner-row .wp-block-button .wp-block-button__link.has-primary-background-color:hover {
    background-color: #e55a2b !important;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3) !important;
}

.aff-compare-table .winner-row {
    background: #fff3cd;
    border-left: 4px solid #ff6b35;
}

/* All non-winner rows: transparent background with light gray border-bottom */
.aff-compare-table .product-row:not(.winner-row) {
    background: transparent;
}

.aff-compare-table .product-row:not(.winner-row) td {
    border-bottom: 1px solid #e9ecef;
}

.aff-compare-table-wrapper .aff-compare-table .product-name {
    margin: 0 0 5px 0 !important;
    font-size: 14px !important;
    color: #212529 !important;
    line-height: 1.3 !important;
}

.aff-compare-table .winner-badge {
    background: #ff6b35;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-right: 8px;
}

.aff-compare-table .product-image {
    max-width: 80px;
    height: 80px;
    border-radius: 4px;
}

/* Remove padding from around the product images themselves */
.aff-compare-table .product-image {
    padding: 0 !important;
    margin: 0 !important;
}

.aff-compare-table .no-image {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* Rating Styles */
.rating-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.star-rating .star {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.star-rating .star svg {
    display: block;
    width: 15px;
    height: 15px;
}

/* Remove old Unicode star styling - now using SVG */
.star-rating .star.half::before {
    display: none;
}

.star-rating .rating-text {
    font-size: 14px;
    color: #495057;
    margin-left: 5px;
}

.review-count {
    font-size: 12px;
    color: #6c757d;
}

/* Price Display */
.price-display {
    font-weight: 600;
}

.price-display.fresh .price-amount {
    color: #28a745;
    font-size: 18px;
}

.price-display.stale .price-check {
    color: #007bff;
    font-size: 14px;
}


.price-unavailable {
    color: #6c757d;
    font-style: italic;
}

/* Feature Lists - Remove double bullets */
.feature-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 2px 0;
    font-size: 14px;
    color: #495057;
    position: relative;
    padding-left: 15px;
}

.feature-list li:before {
    content: "•";
    color: #007bff;
    position: absolute;
    left: 0;
    top: 0;
}

/* Pros and Cons - Clean design without double bullets */
.pros-list, .cons-list {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.pro-item, .con-item {
    color: #495057;
    font-size: 14px;
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
}

.pro-item:before {
    content: "";
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%2328a745"><path d="M13.485 2.515a1 1 0 0 1 0 1.414L6.828 10.586a1 1 0 0 1-1.414 0L2.515 7.687a1 1 0 1 1 1.414-1.414L6 8.343l5.657-5.657a1 1 0 0 1 1.414 0z"/></svg>') no-repeat center;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: absolute;
    left: -20px;
    top: 9px;
}

.con-item:before {
    content: "";
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23dc3545"><path d="M11.354 4.646a.5.5 0 0 0-.708 0L8 7.293 5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0 0-.708z"/></svg>') no-repeat center;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: absolute;
    left: -20px;
    top: 9px;
}

/* ==========================================
   NEW GRID DESIGN STYLES
   ========================================== */

/* Top wrapper with light gray border and 20px padding */
.grid-product-top-wrapper {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    background: white;
}

/* Photo wrapper with 6px radius, photo fills wrapper */
.grid-product-image-wrapper {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.grid-product-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Banner inside photo wrapper */
.grid-product-banner {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #ff6b35;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Title and number wrapper */
.grid-product-title-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.grid-product-number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-top: -5px;
}

.grid-product-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
    color: #212529;
}

/* Small text blurb box */
.grid-product-blurb {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.grid-product-blurb p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Button wrapper with centered text */
.grid-product-button-wrapper {
    text-align: center;
}

.grid-dark-button {
    background-color: #333 !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.grid-dark-button:hover {
    background-color: #000 !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

/* Body content from post */
.grid-product-body-content {
    margin: 25px 0;
    line-height: 1.6;
}

.grid-product-body-content p {
    margin-bottom: 15px;
}

/* Where to find it section */
.grid-product-where-to-find {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.grid-product-where-to-find p {
    margin: 0;
    font-size: 14px;
}

.grid-product-where-to-find a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.grid-product-where-to-find a:hover {
    text-decoration: underline;
}

/* New Pros and Cons styling */
.grid-pros-cons-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 25px 0;
}

.grid-pros-section,
.grid-cons-section {
    background: transparent;
}

.grid-pros-title,
.grid-cons-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.grid-pros-title {
    color: var(--wp--preset--color--success, #28a745);
}

.grid-cons-title {
    color: var(--wp--preset--color--danger, #dc3545);
}

.grid-pros-list,
.grid-cons-list {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.grid-pro-item,
.grid-con-item {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    position: relative;
    padding-left: 25px;
}

/* New SVG icons for grid pros/cons */
.grid-pro-item:before {
    content: "";
    background: url('data:image/svg+xml,<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.456268 5.55229H5.60427V0.0922852H6.98227V5.55229H12.1303V6.93029H6.98227V12.5203H5.60427V6.93029H0.456268V5.55229Z" fill="%23000"/></svg>') no-repeat center;
    width: 13px;
    height: 13px;
    display: inline-block;
    position: absolute;
    left: 0;
    top: 2px;
}

.grid-con-item:before {
    content: "";
    background: url('data:image/svg+xml,<svg width="9" height="3" viewBox="0 0 9 3" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.955863 0.482178H8.28786V2.12018H0.955863V0.482178Z" fill="%23000"/></svg>') no-repeat center;
    width: 9px;
    height: 3px;
    display: inline-block;
    position: absolute;
    left: 2px;
    top: 8px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .grid-pros-cons-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .grid-product-number {
        font-size: 36px;
    }
    
    .grid-product-title {
        font-size: 18px;
    }
}

/* Removed .checkmark and .xmark styles - using :before pseudo-elements instead */

/* Using WordPress Block Button styles from theme instead of custom buttons */
/* Theme handles: .wp-block-button__link styling */

/* Minor adjustments for affiliate buttons */
.product-action .wp-block-button,
.card-action .wp-block-button,
.price-action .wp-block-button {
    margin: 10px 0;
    text-align: center;
}

.product-action .wp-block-button__link,
.card-action .wp-block-button__link,
.price-action .wp-block-button__link {
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    min-width: 180px;
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
}

/* Solid button colors */
.wp-block-button__link.has-primary-background-color {
    background-color: #007cba !important;
    color: #ffffff !important;
}

.wp-block-button__link.has-secondary-background-color {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

/* Table Disclaimer */
.aff-table-disclaimer {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Product Boxes */
.aff-product-boxes-wrapper {
    margin: 20px 0;
}

/* FIXED GRID LAYOUT - Now matches tabbed design structure */
.aff-product-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
    align-items: stretch;
}

.aff-product-grid.columns-1 { grid-template-columns: 1fr; }
.aff-product-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.aff-product-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.aff-product-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .aff-product-grid.columns-3,
    .aff-product-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .aff-product-grid.columns-2,
    .aff-product-grid.columns-3,
    .aff-product-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}

.aff-product-box {
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    border: 1px solid #000;
    /* border-left: 4px solid transparent; */
    overflow: visible;
    display: block;
    min-height: auto;
    margin-bottom: 20px;
}

/* Removed hover effect - keeping boxes static for modern design */

.aff-product-box.winner-box {
    border: 2px solid #ff6b35;
    background: linear-gradient(135deg, #fff 0%, #fff8f0 100%);
}

.aff-product-box .winner-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--aff-accent-color, #dc3545);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grid layout winner badge positioning - ORIGINAL SIMPLE STYLE */
.aff-product-grid .winner-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    z-index: 10;
    background: #ff6b35;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

/* DEFAULT PRODUCT BOX - Horizontal layout for tabbed */
.aff-product-box {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 30px;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    /* border-left: 4px solid transparent; */
}

/* GRID LAYOUT - ROW STRUCTURE: [Image Left] + [Title/Button Right] */
.aff-product-grid .aff-product-box {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    height: 100% !important;
    gap: 0 !important;
    overflow: hidden !important;
}

/* BRUTALIST DARK HEADER */
.aff-product-grid .product-brutalist-header {
    background: #1a1a1a !important;
    color: white !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    border-bottom-right-radius: 8px;    
}

.aff-product-grid .header-label {
    font-size: 14px !important;
    font-weight: 900 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

.aff-product-grid .header-label.winner-label {
    color: #ff6b35 !important;
    margin-right: 24px;
}

.aff-product-grid .header-label.regular-label {
    color: #ffffff !important;
    margin-right: 24px;
}

.aff-product-grid .header-rating {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.aff-product-grid .header-rating .stars {
    color: #ffd700 !important;
}

.aff-product-grid .header-review-count {
    color: #cccccc !important;
    font-size: 12px !important;
}

/* Fix rating text color for dark header accessibility */
.aff-product-grid .header-rating .rating-text {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Adjust main content area */
.aff-product-grid .product-header-row {
    padding: 20px !important;
    margin-bottom: 0 !important;
}

/* ROW 1: Image + Title/Button horizontal layout */
.aff-product-grid .product-header-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

.aff-product-grid .product-image-wrapper {
    flex: 0 0 50% !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}

.aff-product-grid .product-image {
    width: 100% !important;
    height: 200px !important;
    object-fit: contain !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.aff-product-grid .product-title-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.aff-product-grid .product-title {
    font-size: 24px !important;
    font-weight: bold !important;
    margin: 0 !important;
    text-align: left !important;
    line-height: 1.2 !important;
}

.aff-product-grid .product-action {
    margin: 0 !important;
    text-align: left !important;
}

.aff-product-grid .cta-button-primary {
    display: inline-block !important;
    min-width: 200px !important;
    padding: 12px 24px !important;
    margin-top: 10px !important;
}

.aff-product-grid .product-rating {
    order: 2 !important;
    margin-bottom: 15px !important;
}

.aff-product-grid .product-features {
    order: 3 !important;
    margin-bottom: 15px !important;
    width: 100% !important;
}

.aff-product-grid .pros-cons-wrapper-clean {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 25px !important;
    text-align: left !important;
    background: transparent !important;
    padding: 15px !important;
    border-radius: 0 !important;
    margin: 15px 0 !important;
    order: 4 !important;
}

.aff-product-grid .pros-cons-wrapper-clean .pros-section,
.aff-product-grid .pros-cons-wrapper-clean .cons-section {
    margin-bottom: 15px !important;
}

.aff-product-grid .pros-cons-wrapper-clean .pros-section:last-child,
.aff-product-grid .pros-cons-wrapper-clean .cons-section:last-child {
    margin-bottom: 0 !important;
}

.aff-product-grid .product-action {
    margin-top: auto !important;
    width: 100% !important;
    text-align: center !important;
    order: 5 !important;
}

/* Left-align wp-block-button in product grid */
.aff-product-grid .wp-block-button {
    text-align: left !important;
}

/* Ensure no default markers in product grids */
.aff-product-grid ul,
.aff-product-grid li {
    list-style: none !important;
}

.aff-product-grid .cta-button-primary {
    display: inline-block !important;
    min-width: 200px !important;
    padding: 12px 24px !important;
}

/* Grid layout - Row 2 details section */
.aff-product-grid .product-details {
    width: 100% !important;
    margin-top: 0 !important;
    padding: 0 20px 20px 20px !important;
}

.aff-product-grid .product-details .product-rating {
    margin-bottom: 15px !important;
}

.aff-product-grid .product-details .product-features {
    margin-bottom: 15px !important;
}

.aff-product-box.winner-box {
    border: 2px solid #ff6b35;
    background: linear-gradient(135deg, #fff 0%, #fff8f0 100%);
}

.product-image-wrapper {
    flex: 0 0 150px;
    text-align: center;
    margin-bottom: 0;
}

.product-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    background: #fafafa;
    padding: 15px;
    max-width: none;
    max-height: none;
}

.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #212529;
    line-height: 1.2;
}

/* Clean feature list without double bullets */
.feature-list-clean {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.feature-list-clean li {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    line-height: 1.4;
}

.feature-list-clean li:before {
    content: "•";
    color: var(--aff-primary-color, #007bff);
    font-weight: bold;
    position: absolute;
    left: -14px;
    top: 5px;
}

/* Clean pros/cons wrapper */
.pros-cons-wrapper-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 20px;
    background: transparent;
    border-radius: 0;
    margin: 15px 0;
}

/* Primary CTA button */
.cta-button-primary {
    background: var(--aff-primary-color, #000) !important;
    color: white !important;
    padding: 14px 28px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    min-width: 200px !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
}

.cta-button-primary:hover {
    background: var(--aff-primary-color, #333) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* .winner-box .cta-button-primary {
    background: var(--aff-accent-color, #dc3545) !important;
}

.winner-box .cta-button-primary:hover {
    background: var(--aff-accent-color, #c82333) !important;
} */

.product-category {
    display: inline-block;
    background: var(--wp--preset--color--secondary, #007bff);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.product-highlights {
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-highlights li {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    position: relative;
    padding-left: 15px;
}

.product-highlights li:before {
    content: "•";
    color: var(--wp--preset--color--secondary, #007bff);
    position: absolute;
    left: 0;
    top: 0;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-rating .review-count {
    font-size: 13px;
    color: #666;
}

.product-cta {
    margin-top: auto;
}

/* Theme Color Inheritance for CTA Buttons */
.cta-button {
    display: inline-block;
    background: var(--wp--preset--color--primary, #000);
    color: white !important;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
    text-align: center;
    min-width: 180px;
}

.cta-button:hover {
    background: var(--wp--preset--color--primary-dark, #333);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Winner/Top Pick CTA gets theme primary color */
.winner-box .cta-button {
    background: var(--wp--preset--color--accent, #dc3545);
}

.winner-box .cta-button:hover {
    background: var(--wp--preset--color--accent-dark, #c82333);
}

.product-price {
    margin: 10px 0;
}

.product-features {
    margin: 15px 0;
}

.product-features h4 {
    font-size: 14px;
    margin: 0 0 8px 0;
    color: #495057;
}

.product-features ul {
    margin: 0;
    padding-left: 15px;
    list-style: disc;
}

.product-features li {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 3px;
}

/* Additional Features Section */
.additional-features {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.additional-features h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
}

.additional-features .feature-list li {
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

/* Pros and Cons Section - Clean Two Column Layout */
.pros-cons-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 20px 25px;
    background: #fafafa;
}

.pros-column, .cons-column {
    display: flex;
    flex-direction: column;
}

.pros-heading {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--wp--preset--color--success, #28a745);
}

.cons-heading {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--wp--preset--color--danger, #dc3545);
}

.pros-list, .cons-list {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.pro-item, .con-item {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    position: relative;
    padding-left: 20px;
}

.pro-item:before {
    content: "";
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%2328a745"><path d="M13.485 2.515a1 1 0 0 1 0 1.414L6.828 10.586a1 1 0 0 1-1.414 0L2.515 7.687a1 1 0 1 1 1.414-1.414L6 8.343l5.657-5.657a1 1 0 0 1 1.414 0z"/></svg>') no-repeat center;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: absolute;
    left: -20px;
    top: 9px;
}

.con-item:before {
    content: "";
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23dc3545"><path d="M11.354 4.646a.5.5 0 0 0-.708 0L8 7.293 5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0 0-.708z"/></svg>') no-repeat center;
    width: 16px;
    height: 16px;
    display: inline-block;
    position: absolute;
    left: -20px;
    top: 9px;
}

/* Product Description */
.product-description {
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

.product-description p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .product-showcase {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .product-image-wrapper {
        flex: none;
    }
    
    .pros-cons-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-button {
        width: 100%;
    }
}

/* Legacy support - keeping for backward compatibility but hidden EXCEPT in grid layout */
.pros-section, .cons-section {
    display: none;
}

.pros-title, .cons-title {
    display: none;
}

.pros-section ul, .cons-section ul {
    display: none;
}

/* OVERRIDE: Show pros/cons in grid layout */
.aff-product-grid .pros-section,
.aff-product-grid .cons-section {
    display: block !important;
}

.aff-product-grid .pros-title,
.aff-product-grid .cons-title {
    display: block !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
}

.aff-product-grid .pros-section ul,
.aff-product-grid .cons-section ul {
    display: block !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 15px 0 !important;
}

.product-action {
    margin-top: 20px;
    text-align: center;
}

/* Enhanced Full-Width Product Box Layout - Inspired by good UX */
.aff-product-box.full-width {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-areas: 
        "image content";
    gap: 25px;
    align-items: start;
    padding: 25px;
    background: white;
    border-radius: 8px;
    /* Removed elevation from grid */
}

.aff-product-box.full-width .product-image-wrapper {
    grid-area: image;
    margin: 0;
}

.aff-product-box.full-width .product-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aff-product-box.full-width .product-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.aff-product-box.full-width .product-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
}

.aff-product-box.full-width .product-features {
    margin: 0;
}

.aff-product-box.full-width .pros-cons-wrapper {
    margin: 0;
}

.aff-product-box.full-width .product-action {
    margin: 20px 0 0 0;
}

.aff-product-box.full-width .product-action .wp-block-button__link {
    color: white !important;
    font-size: 18px;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 6px;
    text-align: center;
    min-width: 200px;
}

@media (max-width: 768px) {
    .aff-product-box.full-width {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "image"
            "title"
            "features"
            "pros-cons"
            "action";
        gap: 15px;
    }
    
    .aff-product-box.full-width .product-image-wrapper {
        text-align: center;
    }
}

/* Tabbed Layout */
.aff-tabbed-products .tab-nav {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 20px;
    overflow-x: auto;
}

.aff-tabbed-products .tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.aff-tabbed-products .tab-button:hover {
    color: #495057;
    background: #f8f9fa;
}

.aff-tabbed-products .tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.aff-tabbed-products .tab-content {
    position: relative;
}

.aff-tabbed-products .tab-pane {
    display: none;
}

.aff-tabbed-products .tab-pane.active {
    display: block;
}

/* FIXED CAROUSEL LAYOUT - Image top, title bottom, button structure */
.aff-product-carousel {
    position: relative;
    margin: 20px 0;
}

.carousel-container {
    display: flex;
    align-items: stretch; /* Make all slides same height */
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.carousel-container::-webkit-scrollbar {
    height: 6px;
}

.carousel-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.carousel-slide {
    flex: 0 0 260px;
    scroll-snap-align: start;
    border: 1px solid #cfcfcf;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Contain image wrapper that extends to edges */
    position: relative; /* For absolute positioning of ranking badge */
}

/* Carousel specific layout - vertical card style */
.carousel-slide .aff-product-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 20px;
    /* No overflow: hidden here - let negative margins extend, parent .carousel-slide handles clipping */
}

.carousel-slide .product-image-wrapper {
    width: calc(100% + 40px);
    height: 100px !important;
    flex: 0 0 200px;
    margin: 0px 0 0px -20px;
    padding: 10px 0;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.carousel-slide .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Contain image within fixed space */
    object-position: center center; /* Center the image */
    display: block;
    margin: 0; /* No margin on image */
    padding: 0; /* No padding on image */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Carousel Ranking Badge - Top-left corner flag/banner style (per Figma design) */
.carousel-slide .carousel-ranking-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #ff6b35; /* Orange-red/coral color */
    color: white;
    padding: 8px 16px 8px 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    border-top-left-radius: 8px; /* Match card border radius */
    /* Creates banner tail/notch effect - triangular cut-out in bottom-right */
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    line-height: 1.2;
}

.carousel-slide .carousel-rating {
    padding: 0 20px;
    margin: 8px 0;
}

/* TOP GROUP: Image + Rating + Title + Verdict */
.carousel-slide .carousel-top-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 1 auto; /* Don't grow, allow shrink */
}

/* Side padding for top group items (except image) */
.carousel-slide .carousel-top-group .carousel-rating {
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
}

.carousel-slide .carousel-top-group .product-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 10px;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Small headline font for carousel blog layout */
.carousel-slide .carousel-top-group .product-title.carousel-title-small,
.aff-product-carousel .carousel-slide .carousel-top-group .product-title.carousel-title-small,
.aff-product-carousel .carousel-top-group .product-title.carousel-title-small {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #212529;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Verdict text styling for carousel */
.carousel-slide .carousel-top-group .carousel-verdict {
    margin-bottom: 15px;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.carousel-slide .carousel-verdict p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ACTION WRAPPER: Separate div with 20px padding, contains button */
.carousel-slide .carousel-action-wrapper {
    /* Padding is set inline in HTML (20px) */
    margin-top: auto; /* Push button to bottom */
}

/* Button styling for carousel - standalone button per Figma */
.carousel-slide .carousel-action-wrapper .carousel-cta-button,
.carousel-slide .carousel-cta-button {
    display: block;
    width: 100%;
    background-color: #000000;
    background: #000000;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.aff-product-carousel .carousel-slide .carousel-action-wrapper .carousel-cta-button,
.aff-product-carousel .carousel-slide .carousel-cta-button,
.aff-product-carousel .carousel-cta-button {
    display: block;
    width: 100%;
    background-color: #000000;
    background: #000000;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.carousel-slide .carousel-action-wrapper .carousel-cta-button:hover,
.carousel-slide .carousel-cta-button:hover,
.aff-product-carousel .carousel-slide .carousel-action-wrapper .carousel-cta-button:hover,
.aff-product-carousel .carousel-slide .carousel-cta-button:hover,
.aff-product-carousel .carousel-cta-button:hover {
    background: #333333;
    background-color: #333333;
    color: white;
    text-decoration: none;
    border: none;
}

/* Override any theme link styles */
.aff-product-carousel a.carousel-cta-button,
.aff-product-carousel .carousel-slide a.carousel-cta-button,
.carousel-slide a.carousel-cta-button {
    background-color: #000000;
    color: white;
    text-decoration: none;
    border: none;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.carousel-prev, .carousel-next {
    background: #007bff;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.carousel-prev:hover, .carousel-next:hover {
    background: #0056b3;
}

/* Product Grid (for shortcode) */
.aff-product-item {
    margin-bottom: 20px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    /* Removed elevation from grid */
    transition: transform 0.2s ease;
}

/* Removed hover effect - keeping cards static for modern design */

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.card-image:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 15px;
}

.card-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.3;
}

.card-title a {
    color: #212529;
    text-decoration: none;
}

.card-title a:hover {
    color: #007bff;
}

.card-price {
    margin: 10px 0;
}

.card-excerpt {
    font-size: 14px;
    color: #6c757d;
    margin: 10px 0;
    line-height: 1.4;
}

.card-action {
    margin-top: 15px;
}

/* Single Product Layout */
.aff-single-product {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    /* Removed elevation from grid */
}

/* Price Tracker */
.aff-price-tracker {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.current-price-section h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.price-action {
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide table structure on mobile */
    .aff-compare-table-container {
        overflow: visible;
    }
    
    .aff-compare-table,
    .aff-compare-table thead,
    .aff-compare-table tbody,
    .aff-compare-table tr {
        display: block;
        width: 100%;
    }
    
    .aff-compare-table thead {
        display: none; /* Hide headers on mobile */
    }
    
    /* Transform each row into a card */
    .aff-compare-table .product-row {
        display: flex;
        flex-direction: column;
        background: white;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    /* Winner row special styling */
    .aff-compare-table .product-row.winner-row {
        background: #fff3cd;
        border-left: 4px solid #ff6b35;
    }
    
    /* Card layout for mobile */
    .aff-compare-table td {
        display: block;
        border: none;
        padding: 8px 0 !important;
        text-align: left;
    }
    
    /* Image at top */
    .aff-compare-table .column-image {
        order: 1;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .aff-compare-table .column-image img {
        max-width: 120px;
        height: auto;
    }
    
    /* Title below image */
    .aff-compare-table .column-name {
        order: 2;
        margin-bottom: 10px;
    }
    
    .aff-compare-table .column-name .product-name {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }
    
    /* Jump to details link */
    .aff-compare-table .column-details {
        order: 3;
        margin-bottom: 10px;
    }
    
    /* Price */
    .aff-compare-table .column-price {
        order: 4;
        margin-bottom: 15px;
        font-size: 20px;
        font-weight: bold;
        color: #28a745;
    }
    
    /* Button at bottom */
    .aff-compare-table .column-action {
        order: 5;
        text-align: center;
        margin-top: auto;
    }
    
    .aff-compare-table .column-action .wp-block-button__link {
        width: 100%;
        max-width: 280px;
        padding: 12px 24px !important;
    }
    
    .aff-product-box {
        padding: 15px;
    }
    
    .pros-cons-wrapper {
        grid-template-columns: 1fr;
    }
    
    .aff-tabbed-products .tab-nav {
        flex-wrap: wrap;
    }
    
    .carousel-slide {
        flex: 0 0 280px;
    }
}

@media (max-width: 480px) {
    .aff-product-box {
        padding: 12px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .aff-button {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .carousel-slide {
        flex: 0 0 260px;
    }
}

/* Theme Variations */
.theme-dark {
    background: #343a40;
    color: white;
}

.theme-dark .aff-compare-table,
.theme-dark .aff-product-box,
.theme-dark .product-card {
    background: #495057;
    color: white;
}

.theme-dark .aff-compare-table th {
    background: #6c757d;
    color: white;
}

.theme-minimal .aff-compare-table,
.theme-minimal .aff-product-box {
    box-shadow: none;
    border: 1px solid #000;
}

.theme-minimal .aff-product-box.winner-box {
    border: 2px solid #ff6b35;
}

/* Loading States */
.aff-loading {
    opacity: 0.6;
    pointer-events: none;
}

.aff-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================
   CLEAN SIMPLIFIED DESIGN STYLES
   ========================================== */

/* Clean Product Title and Info */
.product-category-badge {
    display: inline-block;
    background: var(--aff-secondary-color, #007bff);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-title-clean {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #212529;
    line-height: 1.2;
}

.product-key-points {
    margin: 0 0 15px 0;
    padding: 0;
    list-style: none;
}

.product-key-points li {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    line-height: 1.4;
}

.product-key-points li:before {
    content: "•";
    color: var(--aff-primary-color, #007bff);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.product-rating-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.product-rating-compact .review-count-compact {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Primary CTA Button - Always Prominent */
.product-cta-clean {
    margin: 25px 0 10px 0;
    text-align: left;
}

.cta-button-clean {
    display: inline-block;
    background: var(--aff-primary-color, #000);
    color: white !important;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 200px;
    border: none;
    cursor: pointer;
}

.cta-button-clean:hover {
    background: var(--aff-primary-color, #333);
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Winner box gets special button color */
/* .winner-box .cta-button-clean {
    background: var(--aff-accent-color, #dc3545) !important;
} */

/* .winner-box .cta-button-clean:hover {
    background: var(--aff-accent-color, #c82333) !important;
} */

/* Clean Additional Features - Only when requested */
.additional-features-clean {
    padding: 20px 30px;
    background: #fafafa;
    border-radius: 6px;
    margin: 15px 0;
}

.additional-features-clean h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
}

.features-clean-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.features-clean-list li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.features-clean-list li:before {
    content: "✓";
    color: var(--aff-secondary-color, #28a745);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Clean Pros/Cons - Only when specifically requested */
.pros-cons-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 15px 0;
}

.pros-clean, .cons-clean {
    display: flex;
    flex-direction: column;
}

.pros-title-clean {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--aff-secondary-color, #28a745);
}

.cons-title-clean {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--aff-accent-color, #dc3545);
}

.pros-list-clean, .cons-list-clean {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.pro-item-clean, .con-item-clean {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
    position: relative;
    padding-left: 0;
}

/* Removed .checkmark and .xmark styles - using :before pseudo-elements instead */

/* Mobile Responsive Updates for Clean Design */
@media (max-width: 768px) {
    .product-clean-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .product-image-section {
        flex: none;
        align-self: center;
    }
    
    .product-image-clean {
        width: 120px;
        height: 120px;
    }
    
    .product-title-clean {
        font-size: 20px;
    }
    
    .pros-cons-clean {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cta-button-clean {
        width: 100%;
        max-width: 280px;
    }
    
    .product-cta-clean {
        text-align: center;
    }
}

/* ==========================================
   NEW GRID BOX DESIGN STYLES
   Complete redesign from old model
   ========================================== */

/* Remove ALL elevation (box-shadow) AND borders from grid elements */
.aff-product-grid .aff-product-item,
.aff-product-grid .grid-product-top-section {
    box-shadow: none !important;
}

/* Remove borders from main grid wrapper */
.aff-product-grid .aff-product-item {
    border: none !important;
    background: transparent !important;
}

.aff-product-grid .aff-product-box {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Top Section Design - Light border ONLY around this section */
.grid-product-top-section {
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 0;
    background: white;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* Photo Wrapper - Contains image + banner and all children - 50% width */
.grid-image-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Product Image - 16:9 aspect ratio with proper object-fit */
.grid-product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    border-radius: 0;
    background: white;
    display: block;
    flex-shrink: 0;
}

/* "BEST OVERALL" Banner - Normal document flow, stacks with image */
/* Grid layout banner overlay - black background with white/teal text (for comparison shortcode only) */
.aff-product-grid .grid-banner-overlay {
    background: #000;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 0 0 6px 6px;
}

.aff-product-grid .grid-banner-text {
    display: block;
    flex-shrink: 0;
    color: var(--aff-primary-color);
}

.aff-product-grid .grid-banner-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    flex-shrink: 1;
    min-width: 0;
    color: var(--aff-primary-color);
}

.aff-product-grid .grid-banner-rating .rating-text {
    color: #ffffff !important;
    font-weight: 500 !important;
    white-space: nowrap;
}

.aff-product-grid .grid-banner-rating .review-count {
    color: #cccccc !important;
    font-weight: 500 !important;
    white-space: nowrap;
}

/* Remove aggressive link styling that might interfere */
.aff-product-grid a {
    text-decoration: none;
}

.aff-product-grid a:hover {
    text-decoration: none;
}

.aff-product-grid .grid-image-container a {
    display: block;
    width: 100%;
}

.aff-product-grid .grid-image-container a:hover {
    text-decoration: none;
    border: none;
    outline: none;
}

/* Content Area - Right side next to image */
.grid-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Title and Verdict Wrapper - groups title and verdict with 8px gap */
.grid-title-verdict-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

/* Title and Number Section */
.grid-title-number-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Grid Main Content Wrapper - Flex container for title+blurb and number */
.grid-main-content-wrapper {
    display: flex !important;
    gap: 20px !important;
    align-items: flex-start !important;
}

/* Grid Content Left - Contains title and blurb */
.grid-content-left {
    flex: 1 !important;
}

/* Grid Number */
.grid-number {
    font-size: 48px !important;
    font-weight: bold;
    color: #333;
    line-height: 1;
    margin-top: -8px;
    flex-shrink: 0 !important;
}

/* Grid Title */
.grid-title {
    font-size: 20px !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
    color: #212529 !important;
    flex: 1;
}

/* Blurb Section (Verdict) */
.grid-blurb-section {
    margin: 0;
}

.grid-blurb-section p {
    font-size: 14px !important;
    line-height: 1.3 !important;
}

/* Button Design */
.grid-button-section {
    text-align: center;
}

.grid-cta-button {
    display: inline-block !important;
    background-color: #333 !important;
    color: white !important;
    padding: 12px 44px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-cta-button:hover {
    background: #000 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Body Content (Outside Top Section) */
.grid-body-content {
    margin: 25px 0;
    line-height: 1.6;
}

.grid-body-content p {
    margin-bottom: 15px;
}

/* "Where to find it" Section */
.grid-where-to-find {
    margin: 20px 0;
    font-size: 14px;
}

.grid-where-to-find p {
    margin: 0;
}

/* Brand label - shares base styling with "Where to find it" */
.grid-brand-label {
    margin-bottom: 5px !important; /* Small gap between brand and "where to find it" */
}

.grid-brand-label strong {
    font-weight: bold; /* Brand is bold */
    color: #333; /* Slightly darker for brand emphasis */
}

.grid-where-to-find a {
    color: #007bff;
    text-decoration: underline;
    font-weight: bold;
}

/* Best For Pills Section */
.grid-best-for-section {
    margin: 20px 0 25px 0;
    display: flex;
    gap: 8px;
}

.grid-best-for-label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.grid-best-for-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.best-for-pill {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    border-radius: 20px;
    border: none;
    white-space: nowrap;
}

/* Mobile responsive for Best For pills */
@media (max-width: 768px) {
    .best-for-pill {
        font-size: 13px;
        padding: 6px 14px;
    }
}

/* Pros and Cons Design */
.grid-pros-cons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    margin: 25px 0 !important;
    background: transparent !important; /* Remove light gray background */
}

/* Pros/Cons Titles - Both black as per specs */
.grid-pros-title,
.grid-cons-title {
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 0 0 15px 0 !important;
    color: #000 !important;
}

/* Override existing red/green colors for pros/cons */
.aff-product-grid .pros-title,
.aff-product-grid .cons-title,
.aff-product-grid .pros-title-clean,
.aff-product-grid .cons-title-clean {
    color: #000 !important;
}

/* Pros/Cons Lists */
.grid-pros-list,
.grid-cons-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Pros/Cons Items */
.grid-pro-item,
.grid-con-item {
    font-size: 14px !important;
    position: relative;
    padding-left: 25px !important;
    color: #333 !important;
}

/* Plus Icon (Pros) - SVG as data URL */
.grid-pro-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 13px;
    height: 13px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTMiIHZpZXdCb3g9IjAgMCAxMyAxMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMC40NTYyNjggNS41NTIyOUg1LjYwNDI3VjAuMDkyMjg1Mkg2Ljk4MjI3VjUuNTUyMjlIMTIuMTMwM1Y2LjkzMDI5SDYuOTgyMjdWMTIuNTIwM0g1LjYwNDI3VjYuOTMwMjlIMC40NTYyNjhWNS41NTIyOVoiIGZpbGw9IiMwMDAiLz4KPC9zdmc+');
    background-repeat: no-repeat;
    background-size: contain;
}

/* Minus Icon (Cons) - SVG as data URL */
.grid-con-item::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 14px;
    width: 9px;
    height: 3px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOSIgaGVpZ2h0PSIzIiB2aWV3Qm94PSIwIDAgOSAzIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxwYXRoIGQ9Ik0wLjk1NTg2MyAwLjQ4MjE3OEg4LjI4Nzg2VjIuMTIwMThIMC45NTU4NjNWMC40ODIxNzhaIiBmaWxsPSIjMDAwIi8+Cjwvc3ZnPg==');
    background-repeat: no-repeat;
    background-size: contain;
}

/* Specifications Accordion */
.grid-specifications-accordion {
    margin: 20px 0;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

.grid-specs-header {
    background: #f8f9fa;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.grid-specs-header:hover {
    background: #e9ecef;
}

.grid-specs-title {
    margin: 0;
    font-size: 16px !important;
    font-weight: bold;
    color: #333;
}

.grid-specs-toggle {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
}

.grid-specifications-accordion.active .grid-specs-toggle {
    transform: rotate(180deg);
}

.grid-specs-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.grid-specifications-accordion.active .grid-specs-content {
    max-height: 100%;
}

.grid-specs-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.grid-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.grid-spec-row:last-child {
    border-bottom: none;
}

.grid-spec-key {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 13px;
}

.grid-spec-value {
    color: #666;
    text-align: right;
    flex: 1;
    font-size: 11px;
}

/* Remove Default List Markers */
.aff-product-grid ul,
.aff-product-grid li {
    list-style: none !important;
}

/* Feature List Bullets (if needed elsewhere) */
.grid-feature-item::before {
    content: "•";
    position: absolute;
    left: -14px;
    top: 5px;
    color: #333;
}

/* Rating Text Accessibility */
.aff-product-grid .header-rating .rating-text {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Button Alignment */
.aff-product-grid .wp-block-button {
    text-align: left !important;
}

/* Additional overrides for existing styles */
.aff-product-grid .aff-product-box {
    padding: 0 !important;
    margin: 0 !important;
}

.aff-product-grid .product-image-wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure proper wrapper structure */
.aff-product-grid .aff-product-item > * {
    width: 100%;
}

/* Override any existing pros/cons styling */
.aff-product-grid .pros-cons-wrapper,
.aff-product-grid .pros-cons-wrapper-clean {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Responsive Considerations */
@media (max-width: 768px) {
    /* Stack image and content vertically on mobile */
    .grid-product-top-section {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .grid-image-container {
        width: 100% !important;
        max-width: 300px !important;
        align-self: center !important;
    }
    
    .grid-pros-cons {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .grid-number {
        font-size: 36px !important;
    }
    
    .grid-title {
        font-size: 18px !important;
    }
    
    /* Image maintains 16:9 aspect ratio on mobile too */
    .grid-product-image {
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
        max-height: 250px !important;
    }
}

/* Multi-Platform "Where to Buy" Styling */
.where-to-buy-section {
    margin: 15px 0;
}

.where-to-buy-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.platform-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.brand-label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    text-align: center;
}

.platform-buy-button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 80px;
}

.amazon-button {
    background-color: #ff9900;
    color: white;
}

.amazon-button:hover {
    background-color: #e68900;
    color: white;
}

.bestbuy-button {
    background-color: #0046be;
    color: white;
}

.bestbuy-button:hover {
    background-color: #003399;
    color: white;
}

.walmart-button {
    background-color: #ffc220;
    color: #004c91;
}

.walmart-button:hover {
    background-color: #e6af1a;
    color: #004c91;
}

.platform-links a {
    color: #0073aa;
    text-decoration: underline;
    font-weight: 500;
}

.platform-links a:hover {
    color: #005a87;
}

.no-link {
    color: #666;
    font-style: italic;
}

/* Winner Badge Enhancement for Multi-Platform */
.winner-row {
    background-color: #f0f8ff;
    border-left: 4px solid #0073aa;
}

.winner-badge {
    background-color: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .platform-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .platform-button-container {
        width: 100%;
    }
    
    .platform-buy-button {
        width: 100%;
    }
}
