:root {
    --abw-primary-color: #232f3e;
    --abw-secondary-color: #146eb4;
    --abw-text-color: #333;
    --abw-bg-color: #ffffff;
    --abw-button-bg: #ffa41c;
    --abw-button-hover: #fa8900;
    --abw-font-family: 'Open Sans', sans-serif;
}

/* ... */

.abw-buy-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--abw-button-bg) !important;
    color: #0f1111 !important;
    /* Amazon dark text */
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    /* Pill shape */
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: background 0.2s;
    margin-bottom: 8px !important;
    border: 1px solid #d5d9d9 !important;
    /* Slight border */
    box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5) !important;
    width: auto !important;
}

.abw-widget-container .abw-buy-btn:hover {
    background: #fa8900 !important;
    /* Hardcoded for safety */
    border-color: #d5d9d9 !important;
    color: #0f1111 !important;
}

/* Removed abw-amazon-logo styles */

.abw-disclaimer {
    font-size: 7pt !important;
    /* 7pt font size */
    color: #999 !important;
    text-align: left !important;
    /* Left aligned */
    line-height: 1.4 !important;
    font-style: normal !important;
    /* Not italic */
    font-family: 'Open Sans', sans-serif !important;
    margin-top: 16px !important;
    /* Space above disclaimer */
    width: 100% !important;
    clear: both !important;
}

/* Scoped to the widget container to avoid conflicts */
.abw-widget-container {
    width: 100% !important;
}

.abw-widget-container * {
    box-sizing: border-box;
}

.abw-products-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    /* border: 2px solid red !important; Debugging: Check if file is loaded */
    padding: 0 !important;
    list-style: none !important;
    /* Reset list style */
    max-width: 100% !important;
    /* Allow full width */
    width: 100% !important;
    /* Force full width */
    margin: 0 auto !important;
    /* Center the widget */
}

.abw-product-card {
    background: white !important;
    border: 1px solid #e7e7e7 !important;
    /* Hardcoded color for safety */
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    padding-bottom: 16px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    font-family: 'Open Sans', sans-serif !important;
    overflow: hidden !important;
    /* Prevent content from spilling out */
    border-radius: 0 !important;
    /* Reset border radius if theme adds it */
}

.abw-card-header {
    background: #eef7fa !important;
    color: #298CCD !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 12px !important;
    text-align: center !important;
    padding: 8px !important;
    width: 100% !important;
    font-weight: 600 !important;
    display: block !important;
    /* Ensure visibility */
    border-bottom: 1px solid #e7e7e7 !important;
}

/* Old badges removed */

.abw-product-image {
    height: 200px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin-top: 0 !important;
    /* Reset margin */
    overflow: hidden !important;
    /* Ensure image stays within bounds */
    background: white !important;
}

.abw-product-image a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    box-shadow: none !important;
}

.abw-product-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    width: auto !important;
    /* Ensure aspect ratio is preserved */
    height: auto !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.abw-product-content {
    padding: 0 16px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.abw-product-title {
    font-size: 14px !important;
    /* Smaller font size */
    font-weight: 600 !important;
    color: #0f1111 !important;
    text-decoration: none !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
    height: 74px !important;
    /* Adjusted for 4 lines (14px * 1.3 * 4 ≈ 72.8px) */
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    /* Show 4 lines */
    -webkit-box-orient: vertical !important;
    text-overflow: ellipsis !important;
    background: transparent !important;
    border: none !important;
}

.abw-product-title:hover {
    color: #c7511f !important;
    text-decoration: underline !important;
}

.abw-product-meta {
    margin-bottom: 4px !important;
    height: 20px !important;
}

.abw-prime-logo {
    color: #00a8e1 !important;
    font-weight: 700 !important;
    font-style: italic !important;
    font-size: 13px !important;
}

.abw-price-container {
    display: flex !important;
    justify-content: center !important;
    /* Center price */
    align-items: baseline !important;
    margin-bottom: 16px !important;
    /* Increased from 12px */
    gap: 8px !important;
    margin-top: 8px !important;
    /* Added margin top for spacing from title */
}

.abw-price-current {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #000 !important;
}

.abw-price-green {
    color: #007600 !important;
    /* Amazon green for reduced price */
}

.abw-price-old {
    font-size: 13px !important;
    color: #565959 !important;
    text-decoration: line-through !important;
}

@media (max-width: 900px) {
    .abw-products-list {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .abw-products-list {
        grid-template-columns: 1fr !important;
    }
}