/* ============================================
   DAILY DEAL SIDEBAR - PROFESSIONAL STYLING
   All selectors scoped to .sidebar to avoid conflicts
   ============================================ */

/* Sidebar Container - Only target Daily Deal wrapper */
.sidebar .products.wrapper.grid {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 15px;
    margin-bottom: 20px;
}

.sidebar .owl-carousel {
    width: 100%;
}

/* Sidebar heading for Daily Deal */
.sidebar .block-dailydeal h3,
.sidebar > h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1979c3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* BxSlider wrapper - Fixed positioning to prevent hover shifts */
.sidebar .bx-wrapper {
    margin: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    position: relative !important;
    width: 100% !important;
}

.sidebar .bx-wrapper .bx-viewport {
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    left: 0 !important;
    overflow: visible !important;
}

/* Product Image - Only in Daily Deal */
.sidebar .product_img {
    width: 100%;
    max-width: 200px;
    text-align: center;
    margin: 0 auto 12px auto;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 15px;
    display: block;
}

.sidebar .product_img img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

/* Product Item Info - Work with bxSlider width */
.sidebar .bxslider .product-item-info,
.sidebar .product-item-info {
    margin: 0 auto;
    padding: 10px;
    text-align: center;
    border: none !important;
    box-sizing: border-box;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar .bxslider .product-item-info:hover,
.sidebar .product-item-info:hover,
.sidebar .bxslider .product-item-info:focus,
.sidebar .product-item-info:focus {
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar .bxslider .product-item-info.item,
.sidebar .product-item-info.item {
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    border: none !important;
}

.sidebar .bxslider .product-item-info.item:hover,
.sidebar .product-item-info.item:hover {
    background: #fff;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Countdown Container */
.sidebar .countdown {
    width: 100%;
    text-align: center;
}

.sidebar .countdown > div {
    margin: 0;
    text-align: center;
}

/* Product Info Text in countdown */
.sidebar .countdown > div > p {
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    width: 100%;
    margin: 0 0 6px 0;
    color: #555;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.sidebar .countdown > div > p:first-of-type {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.sidebar .countdown > div > p a.product-item-link {
    color: #1979c3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: inline;
}

.sidebar .countdown > div > p a.product-item-link:hover {
    color: #006bb4;
    text-decoration: underline;
}

/* Price Styling */
.sidebar .countdown > div > p strike {
    color: #999;
    font-size: 12px;
}

.sidebar .countdown > div .save {
    color: #28a745;
    font-weight: 600;
    font-size: 14px;
    background: #e8f5e9;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Deal Ends / Expired Labels */
.sidebar .countdown > div > h2.dealend,
.sidebar .countdown > div > h2.dealexpire {
    width: 100%;
    margin: 12px 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
}

.sidebar .countdown > div > h2.dealend {
    color: #1979c3;
}

.sidebar .countdown > div .dealexpire {
    color: #dc3545;
    font-weight: 600;
    width: 100%;
    text-align: center;
    margin: 12px 0 8px 0;
    display: none;
    font-size: 13px;
    padding: 8px 12px;
    background: #fce4ec;
    border-radius: 4px;
}

/* Countdown Timer Table */
.sidebar #table,
.sidebar .countdown-table {
    width: auto;
    border-collapse: separate;
    border-spacing: 4px;
    background-color: transparent;
    margin: 8px auto 0 auto;
    display: inline-table;
}

.sidebar tr#spacer1 td,
.sidebar .countdown-table .spacer1 td {
    padding: 0;
}

.sidebar tr#spacer1 td:first-child,
.sidebar #spacer2 td:first-child,
.sidebar .countdown-table .spacer1 td:first-child,
.sidebar .countdown-table .spacer2 td:first-child {
    padding-left: 0;
}

/* Timer Numbers */
.sidebar .numbers,
.sidebar .countdown-table .numbers {
    background: linear-gradient(135deg, #1979c3 0%, #0d5a9e 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 4px rgba(25, 121, 195, 0.3);
}

/* Timer Labels */
.sidebar #spacer2 .title,
.sidebar .countdown-table .spacer2 .title {
    width: 36px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 9px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    display: block;
    margin-top: 4px;
}

/* Add to Cart Button */
.sidebar .countdown .action.tocart.primary {
    background: linear-gradient(135deg, #1979c3 0%, #0d5a9e 100%);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    margin: 10px auto 0 auto;
    display: inline-block;
}

.sidebar .countdown .action.tocart.primary:hover {
    background: linear-gradient(135deg, #0d5a9e 0%, #094070 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 121, 195, 0.3);
}

/* BxSlider Viewport Override - Allow slider to work but prevent shifts */
.sidebar .bx-wrapper .bx-viewport {
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    left: 0 !important;
    overflow: hidden !important;
}

/* Remove hover effects completely */
.sidebar .bx-wrapper:hover,
.sidebar .bx-wrapper:focus,
.sidebar .bx-wrapper:active {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

.sidebar .bx-wrapper .bx-viewport:hover,
.sidebar .bx-wrapper .bx-viewport:focus,
.sidebar .bx-wrapper .bx-viewport:active {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    left: 0 !important;
}

/* Hide navigation arrows in sidebar */
.sidebar .bx-wrapper .bx-controls-direction {
    display: none !important;
}

/* Hide navigation buttons in sidebar */
.sidebar .bx-wrapper .bx-prev,
.sidebar .bx-wrapper .bx-next {
    display: none !important;
}

/* Hide controls in sidebar */
.sidebar .bx-wrapper .bx-controls {
    display: none !important;
}

/* Ensure no borders on sidebar deal elements */
.sidebar .bxslider .product-item-info,
.sidebar .bxslider .product-item-info.item {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.sidebar .bxslider .product-item-info:hover,
.sidebar .bxslider .product-item-info.item:hover {
    border: none !important;
    box-shadow: none !important;
}

/* Slider List Items in sidebar - Allow bxSlider to control layout */
.sidebar .bxslider li {
    text-align: center;
    list-style: none;
    display: inline-block;
    float: left;
    position: relative;
}

.sidebar .bxslider {
    margin: 0;
    padding: 0;
    text-align: left;
    list-style: none;
}

.sidebar .bxslider li > div {
    text-align: center;
}

/* Product Details Container in sidebar */
.sidebar .product.details.product-item-details {
    padding: 0;
    text-align: center;
}

.sidebar .product-item-inners {
    padding: 0;
    text-align: center;
}

/* Center the form in sidebar */
.sidebar .countdown form[data-role="tocart-form"] {
    display: inline-block;
    margin: 0 auto;
}

/* Actions primary container in sidebar */
.sidebar .countdown .actions-primary {
    text-align: center;
}

/* Responsive Adjustments for Sidebar */
@media (max-width: 768px) {
    .sidebar .products.wrapper.grid {
        padding: 12px;
    }
    
    .sidebar .countdown > div > p {
        font-size: 12px;
    }
    
    .sidebar .numbers,
    .sidebar .countdown-table .numbers {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 14px;
    }
    
    .sidebar #spacer2 .title,
    .sidebar .countdown-table .spacer2 .title {
        width: 32px;
        font-size: 8px;
    }
}

/* ============================================
   PRODUCT DETAIL PAGE STYLING
   ============================================ */

/* Deal Expired Label - ALWAYS hidden by default */
.dealexpire {
    display: none !important;
}

/* Product Detail Page Countdown Container */
.product-info-main .countdown,
.column.main .countdown {
    margin-bottom: 15px;
}

.product-info-main .countdown > div > p,
.column.main .countdown > div > p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 8px 0;
    color: #333;
}

.product-info-main .countdown > div > p strike,
.column.main .countdown > div > p strike {
    color: #999;
}

.product-info-main .countdown > div .save,
.column.main .countdown > div .save {
    color: #28a745;
    font-weight: 600;
    font-size: 16px;
}

/* Deal End/Expire Labels on Product Page */
.product-info-main .countdown h2.dealend,
.column.main .countdown h2.dealend {
    font-size: 18px;
    font-weight: 600;
    color: #1979c3;
    margin: 15px 0 10px 0;
}

.product-info-main .countdown h2.dealexpire,
.column.main .countdown h2.dealexpire {
    display: none !important;
}

/* Timer Table on Product Page */
.product-info-main #table,
.column.main #table {
    border-collapse: separate;
    border-spacing: 8px;
    background-color: transparent;
    margin: 10px 0;
}

/* Timer Numbers on Product Page */
.product-info-main .numbers,
.column.main .numbers,
.product-info-main #table .numbers,
.column.main #table .numbers {
    background: linear-gradient(135deg, #1979c3 0%, #0d5a9e 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 6px;
    display: block;
    box-shadow: 0 2px 4px rgba(25, 121, 195, 0.3);
}

/* Timer Labels on Product Page */
.product-info-main #spacer2 .title,
.column.main #spacer2 .title,
.product-info-main #table #spacer2 .title,
.column.main #table #spacer2 .title {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
    margin-top: 5px;
}
