/* ====================== */
/* Combined Slider Container Styles */
/* ====================== */

/* ====================== */
/* New Container Styles */
/* ====================== */
.amazon-slider-container {
    max-width: 980px; /* Adjust this to your preferred maximum width */
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.amazon-product-slider {
    display: flex;
    gap: 20px!important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    padding: 10px 5px;
    margin: 20px 0;
}

.amazon-product-slider::-webkit-scrollbar {
    display: none;
}

/* ====================== */
/* Individual Slide Styles */
/* ====================== */
.amazon-product-slide {
    flex: 0 0 auto;
    width: calc((80% / 4) - 20px); /* Default for 1024px+ */
    max-width: 220px; /* Add this to prevent overgrowth */
    box-sizing: border-box;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* ====================== */
/* Image Container Styles */
/* ====================== */
.amazon-product-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 80%; /* 20% smaller height (was 100%) */
    overflow: hidden;
    border-radius: 8px 8px 0 0; /* Only round top corners */
}

/* Image Styles */
.amazon-product-image img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 0px!important;
    background-color: #ffffff!important;
}

/* Hover Effects */
.amazon-product-slide:hover img {
    transform: scale(1.20);
}

/* ====================== */
/* Title Overlay/Tooltip Styles */
/* ====================== */
.amazon-product-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #666;
    line-height: 1.0rem;
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 0 8px 8px; /* Round bottom corners to match container */
}

.amazon-product-image:hover .amazon-product-title-overlay {
    opacity: 1;
}

/* ====================== */
/* Button Container Styles */
/* ====================== */
.amazon-product-button-container {
    text-align: center;
    padding: 12px 0;
    background: #fff;
    border-radius: 0 0 8px 8px; /* Round bottom corners */
}

.amazon-product-button {
    display: inline-block;
    background: #FF9900;
    color: white !important;
    padding: 4px 10px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.2s;
}

.amazon-product-button:hover {
    background: #e88a00;
}
/* ====================== */
/* Placeholder Styles */
/* ====================== */
.amazon-product-placeholder {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #777;
    font-size: 10px;
    border-radius: 8px 8px 0 0; /* Match image container */
}
/* ====================== */
/* Slick Shit */
/* ====================== */
.slick-initialized {
    display: block; /* Ensure the slider is visible when initialized */
}
.amazon-product-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.slick-slide {
    display: inline-block;
    width: 100%;
}

.slick-prev, .slick-next {
    position: absolute;
    top: 30%;
    z-index: 10;
    background-color: rgba(255,255,255,0.5);
    color: #fff;
}

.slick-prev {
    left: 10px;
    transform: translateY(-50%);
}

.slick-next {
    right: 10px;
    transform: translateY(-50%);
}

.slick-prev:hover,
.slick-next:hover {
    background-color: #000000;
    opacity: 0.7;
}
/* ====================== */
/* Responsive Adjustments */
/* ====================== */
@media (max-width: 1024px) {
    .amazon-product-slide {
        width: calc((80% / 3) - 18px); /* Adjusted for 20% smaller */
    }
}

@media (max-width: 768px) {
    .amazon-product-slider {
        gap: 15px;
    }
    
    .amazon-product-slide {
        width: calc((80% / 2) - 15px); /* Adjusted for 20% smaller */
    }
}

@media (max-width: 480px) {
    .amazon-product-slide {
        width: calc(80% - 10px); /* Adjusted for 20% smaller */
    }
}