/* Shivasakthi Shop Page - Exact Clone of the Classic Food Theme UI */

:root {
    --food-green: #e50000;
    --food-yellow: #e50000;
    --food-text: #333333;
    --food-light-grey: #f1f1f1;
    --food-border: #e6e6e6;
    --food-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.form-control,
.form-select {
    background-color: #f8f9fa !important;
    border: 1px solid #e50000 !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    color: #0e1317 !important;
    transition: all 0.3s ease;
}

.oe_website_sale {
    background-color: #ffffff !important;
    padding-top: 40px;
    padding-bottom: 80px;

    /* Sidebar Navigation */
    #products_grid_before {
        background: transparent !important;
        padding-right: 30px !important;

        .food-sidebar-section {
            margin-bottom: 40px;

            .section-title {
                display: flex;
                align-items: center;
                font-size: 1.1rem;
                font-weight: 800;
                color: var(--food-text);
                text-transform: uppercase;
                margin-bottom: 25px;
                letter-spacing: 1px;

                &::before {
                    content: '';
                    display: inline-block;
                    width: 3px;
                    height: 18px;
                    background: var(--food-green);
                    margin-right: 10px;
                }
            }

            /* Categories List */
            .category-list {
                list-style: none;
                padding: 0;

                .category-item {
                    margin-bottom: 15px;

                    a {
                        display: flex;
                        align-items: center;
                        text-decoration: none;
                        color: #666;
                        font-weight: 600;
                        font-size: 0.9rem;
                        text-transform: uppercase;
                        transition: color 0.3s ease;

                        img {
                            width: 20px;
                            margin-right: 15px;
                            opacity: 0.7;
                        }

                        &.active,
                        &:hover {
                            color: var(--food-green);
                            background-color: transparent !important;

                            img {
                                opacity: 1;
                            }
                        }

                        &.active,
                        &.nav-link.active {
                            color: #000000 !important;
                            background-color: transparent !important;
                            border: none !important;
                            box-shadow: none !important;

                            span {
                                color: #000000 !important;
                            }

                            img {
                                filter: none !important;
                                opacity: 1 !important;
                            }
                        }
                    }
                }
            }

            /* Price Filter */
            .price-slider-wrapper {
                .slider-rail {
                    height: 4px;
                    background: #eee;
                    position: relative;
                    margin: 20px 0;

                    .slider-track {
                        position: absolute;
                        height: 100%;
                        background: var(--food-green);
                    }

                    .slider-handle {
                        width: 14px;
                        height: 14px;
                        background: var(--food-green);
                        border-radius: 50%;
                        position: absolute;
                        top: -5px;
                    }
                }

                .price-label-row {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;

                    .price-text {
                        font-size: 0.85rem;
                        color: #666;

                        span {
                            font-weight: 700;
                            color: #333;
                        }
                    }

                    .btn-filter {
                        background: var(--food-green);
                        color: white !important;
                        border: none;
                        padding: 6px 18px;
                        border-radius: 4px;
                        font-weight: 700;
                        font-size: 0.8rem;
                        text-transform: uppercase;
                    }
                }
            }

            /* New Arrivals */
            .arrival-list {
                .arrival-item {
                    display: flex;
                    gap: 15px;
                    margin-bottom: 20px;

                    .arrival-img {
                        width: 60px;
                        height: 60px;
                        background: #f9f9f9;
                        border-radius: 50%;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        padding: 5px;

                        img {
                            width: 100%;
                        }
                    }

                    .arrival-info {
                        .rating {
                            color: var(--food-yellow);
                            font-size: 0.7rem;
                            margin-bottom: 4px;
                        }

                        .name {
                            font-weight: 700;
                            color: #333;
                            font-size: 0.85rem;
                            line-height: 1.2;
                            margin-bottom: 4px;
                        }

                        .price {
                            font-size: 0.8rem;

                            del {
                                color: #aaa;
                                margin-right: 6px;
                            }

                            span {
                                color: var(--food-green);
                                font-weight: 800;
                            }
                        }
                    }
                }
            }
        }
    }

    /* Top Bar Control */
    .food-top-bar {
        background: white;
        padding: 15px 25px;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
        margin-bottom: 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: 1px solid #f5f5f5;

        .control-left {
            display: flex;
            align-items: center;
            gap: 20px;

            .btn-filtering {
                background: transparent;
                border: 1px solid #eee;
                padding: 8px 15px;
                border-radius: 4px;
                color: #333;
                font-size: 0.85rem;
                font-weight: 700;

                i {
                    color: var(--food-green);
                    margin-right: 8px;
                }
            }

            .result-count {
                font-size: 0.85rem;
                color: #888;

                span {
                    font-weight: 700;
                    color: var(--food-green);
                }
            }
        }

        .control-right {
            display: flex;
            align-items: center;
            gap: 25px;

            .sort-by-wrapper {
                font-size: 0.85rem;
                color: #888;

                span {
                    color: #333;
                    font-weight: 700;
                    margin-left: 8px;
                }
            }

            .view-switcher {
                display: flex;
                gap: 5px;

                .view-btn {
                    width: 32px;
                    height: 32px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border: 1px solid #eee;
                    border-radius: 4px;
                    color: #aaa;

                    &.active {
                        background: #f5f5f5;
                        color: var(--food-green);
                        border-color: #ddd;
                    }
                }
            }
        }
    }

    /* Product Cards Grid */
    #products_grid {
        .oe_product {
            padding: 15px !important;

            .oe_product_cart {
                border: none !important;
                background: white !important;
                border-radius: 12px !important;
                box-shadow: var(--food-shadow) !important;
                overflow: hidden !important;
                transition: transform 0.4s ease !important;
                position: relative !important;

                &:hover {
                    transform: translateY(-10px) !important;

                    .btn-add-to-cart-overlay {
                        opacity: 1;
                        transform: translateY(0);
                    }
                }

                /* Highlighted Cards (Yellow BG) */
                &.card-highlighted {
                    background: var(--food-yellow) !important;

                    .o_wsale_product_information {
                        background: var(--food-yellow) !important;
                    }

                    .btn-add-to-cart-overlay {
                        background: var(--food-text) !important;
                        color: white !important;
                    }
                }

                .oe_product_image {
                    height: 240px !important;
                    position: relative !important;
                    background: transparent !important;
                    padding: 0 !important;

                    img {
                        object-fit: contain !important;
                        height: 100% !important;
                        width: 100% !important;
                        transition: transform 0.5s ease;
                    }

                    .wishlist-btn {
                        position: absolute;
                        top: 15px;
                        left: 15px;
                        width: 36px;
                        height: 36px;
                        background: #333;
                        color: white !important;
                        border-radius: 6px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        font-size: 0.9rem;
                        z-index: 10;
                    }

                    .discount-badge {
                        position: absolute;
                        top: 15px;
                        right: 15px;
                        background: var(--food-yellow);
                        color: #333;
                        font-weight: 800;
                        padding: 4px 8px;
                        border-radius: 4px;
                        font-size: 0.75rem;
                        z-index: 10;
                    }
                }

                .o_wsale_product_information {
                    padding: 15px 20px 25px !important;
                    text-align: center !important;
                    background: white !important;

                    .btn-add-to-cart-overlay {
                        background: #e50000 !important;
                        color: #000000 !important;
                        padding: 10px;
                        border-radius: 6px;
                        font-weight: 700;
                        font-size: 0.85rem;
                        text-transform: uppercase;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        gap: 10px;
                        margin-bottom: 15px;
                        opacity: 0;
                        transform: translateY(10px);
                        transition: all 0.3s ease;
                        text-decoration: none;

                        i {
                            font-size: 1rem;
                        }
                    }

                    .price-row {
                        margin-bottom: 8px;

                        del {
                            color: #aaa;
                            margin-right: 8px;
                            font-size: 0.8rem;
                        }

                        span {
                            color: #333;
                            font-weight: 800;
                            font-size: 1rem;
                        }
                    }

                    .o_wsale_products_item_title {
                        margin-bottom: 10px !important;

                        a {
                            font-size: 0.95rem !important;
                            font-weight: 800 !important;
                            color: var(--food-text) !important;
                            text-transform: uppercase;
                            letter-spacing: 0.5px;
                        }
                    }

                    .star-rating {
                        color: var(--food-yellow);
                        font-size: 0.75rem;
                        display: flex;
                        justify-content: center;
                        gap: 2px;
                    }
                }
            }
        }
    }

    /* Custom Pagination */
    .products_pager {
        margin-top: 60px;

        ul.pagination {
            justify-content: center !important;
            gap: 10px;

            li.page-item {
                .page-link {
                    width: 40px;
                    height: 40px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border: 1px solid #eee;
                    border-radius: 50% !important;
                    color: #666;
                    font-weight: 700;
                    font-size: 0.9rem;
                    background: white;

                    &:hover {
                        background: #f5f5f5;
                        border-color: #ddd;
                    }
                }

                &.active .page-link {
                    background: var(--food-green) !important;
                    color: white !important;
                    border-color: var(--food-green) !important;
                    box-shadow: 0 5px 15px rgba(0, 104, 55, 0.2);
                }
            }
        }
    }
}

/* Product Details Page Styling */
#product_detail {
    padding-top: 50px;

    /* Breadcrumb Color */
    .breadcrumb-item a {
        color: #e50000 !important;
        font-weight: 700 !important;
    }

    .product-details-wrapper {
        .display-5 {
            font-weight: 800;
            color: var(--food-text);
            letter-spacing: -0.5px;
        }

        .product-price {
            h2 {
                color: var(--food-green);
                font-family: inherit;
            }
        }

        .css_quantity {
            border: 2px solid #eee !important;
            border-radius: 50px !important;
            overflow: visible !important;
            display: inline-flex;
            margin-right: 15px;
            background: white !important;
            height: 45px !important;
            align-items: center;


            .btn {
                border: none !important;
                background: transparent !important;
                padding: 0 15px !important;
                color: #333 !important;

                &:hover {
                    background: #f9f9f9 !important;
                }
            }

            .quantity {
                border: none !important;
                width: 80px !important;
                max-width: 80px !important;
                text-align: center !important;
                font-weight: 900 !important;
                font-size: 20px !important;
                background: #ffffff !important;
                color: #000000 !important;
                padding: 0 !important;
                margin: 0 !important;
                height: 45px !important;
                display: inline-block !important;
                vertical-align: middle !important;
                line-height: 45px !important;
                box-shadow: none !important;
                outline: none !important;
                appearance: none !important;
                -webkit-appearance: none !important;
            }


        }

        #add_to_cart {
            background: #e50000 !important;
            color: #000000 !important;
            border: none !important;
            border-radius: 50px !important;
            padding: 12px 40px !important;
            font-weight: 800 !important;
            text-transform: uppercase !important;
            letter-spacing: 1px !important;
            transition: all 0.3s !important;
            box-shadow: 0 10px 20px rgba(254, 205, 79, 0.2) !important;

            &:hover {
                background: #e5b945 !important;
                transform: translateY(-2px) !important;
            }
        }
    }
}

/* Hide Duplicate Odoo Elements on Product Page */
#product_details {
    display: flex !important;
    flex-direction: column !important;

    /* Hide ANY title, price, or description that is NOT inside our custom wrapper */
    >h1:not(.display-5),
    >.product_price,
    >#product_attributes_simple,
    >.text-muted:not(.Shivasakthi-premium-content *),
    >div[data-name="description_sale"] {
        display: none !important;
    }

    /* Target the Terms and Conditions block */

    /* Dedicated hide for Odoo's extra info */
    hr+div,
    a[href*="terms-and-conditions"] {
        display: none !important;
    }

    /* Force Add to Cart to theme yellow everywhere in shop */
    #add_to_cart,
    .a-submit,
    .btn-add-to-cart-overlay {
        background: #e50000 !important;
        color: #000000 !important;
        border: none !important;
    }
}

/* Update "View cart" button color in toast notification */
.o_wsale_toast .btn-primary,
.o_wsale_add_to_cart_message a.btn-primary,
#wsale_ajax_cart_msg a.btn-primary {
    background-color: #e50000 !important;
    color: #000000 !important;
    border-color: #e50000 !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(254, 205, 79, 0.2) !important;
    transition: all 0.3s ease !important;
}

.o_wsale_toast .btn-primary:hover,
.o_wsale_add_to_cart_message a.btn-primary:hover,
#wsale_ajax_cart_msg a.btn-primary:hover {
    background-color: #e5b945 !important;
    border-color: #e5b945 !important;
    transform: translateY(-1px) !important;
}

/* Update Checkout button on cart page */
#o_cart_summary .btn-primary,
.oe_website_sale .btn-primary[href='/shop/checkout'],
.oe_website_sale .btn-primary.a-submit,
.oe_website_sale a.btn-primary,
.oe_cart .btn-primary {
    background-color: #e50000 !important;
    color: #0e1317 !important;
    border-color: #e50000 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 12px 30px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(254, 205, 79, 0.2) !important;
}

#o_cart_summary .btn-primary:hover,
.oe_website_sale .btn-primary[href='/shop/checkout']:hover,
.oe_website_sale .btn-primary.a-submit:hover,
.oe_website_sale a.btn-primary:hover,
.oe_cart .btn-primary:hover {
    background-color: #e5b945 !important;
    border-color: #e5b945 !important;
    transform: translateY(-2px) !important;
    color: #000000 !important;
    box-shadow: 0 6px 20px rgba(254, 205, 79, 0.4) !important;
}
