/* Base Product Widget Styles - Shared across all widgets */

/* Common product item styles */
.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-details {
    padding: 15px;
}

.product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
}

.product-title a:hover {
    color: #007cba;
}

.product-brand {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.product-stock {
    margin-bottom: 10px;
}

.in-stock {
    color: #28a745;
    font-size: 14px;
    font-weight: 500;
}

.out-of-stock {
    color: #dc3545;
    font-size: 14px;
    font-weight: 500;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Common scroll container styles */
.widget-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.widget-scroll-container::-webkit-scrollbar {
    display: none;
}

.widget-scroll-container.dragging {
    cursor: grabbing;
}

/* Common product item styles */
.widget-product-item {
    flex: 0 0 280px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.widget-product-item:hover .product-image img {
    transform: scale(1.05);
}

/* Common navigation arrow styles */
.widget-nav-arrow {
    position: absolute;
    top: calc(50% - 30px);
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 0;
    outline: none;
}

.widget-nav-arrow:hover {
    background: #fff;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-50%) scale(1.1);
}

.widget-nav-arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.widget-nav-left {
    left: 10px;
}

.widget-nav-right {
    right: 10px;
}

.widget-nav-arrow span {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

/* Common scroll indicators */
.widget-scroll-indicators {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 15px !important;
    padding: 0 50px !important;
}

.widget-scroll-dot {
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #ccc !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
}

.widget-scroll-dot.active {
    background: #333 !important;
}

.widget-scroll-dot:hover {
    background: #666 !important;
}

.widget-scroll-dot:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Base responsive styles */
@media (max-width: 768px) {
    .widget-product-item {
        flex: 0 0 220px;
    }

    .product-image {
        height: 160px;
    }

    .widget-nav-arrow {
        width: 40px;
        height: 40px;
    }

    .widget-nav-arrow span {
        font-size: 18px;
    }

    .widget-scroll-indicators {
        padding: 0 40px !important;
    }
}

@media (max-width: 480px) {
    .widget-product-item {
        flex: 0 0 180px;
    }

    .product-image {
        height: 140px;
    }

    .product-details {
        padding: 12px;
    }

    .widget-nav-arrow {
        width: 35px;
        height: 35px;
    }

    .widget-nav-arrow span {
        font-size: 16px;
    }

    .widget-scroll-indicators {
        padding: 0 35px !important;
    }
}