/* quick-buy plugin modals & small styles */
.qb-modal { 
    display:none; 
    position:fixed; 
    z-index:999999; 
    left:0; 
    top:0; 
    width:100%; 
    height:100%; 
    background:rgba(0,0,0,0.7); 
    align-items:center; 
    justify-content:center; 
    
}

.qb-modal .qb-modal-inner { position:relative; width:90%; max-width:900px; margin:4rem auto; padding:20px; background:#fff; border-radius:8px; text-align:center; }
.qb-modal .qb-modal-img {
    max-width:100%; 
    max-height:70vh; 
    display:block; 
    margin:0 auto;
    }
    
.qb-modal .qb-close {
    position:absolute; 
    right:10px; 
    top:10px; 
    border:0; 
    background:transparent; 
    font-size:28px; 
    cursor:pointer;
    z-index: 10;
    
}

.qb-modal .qb-nav { 
    position:absolute; 
    top:50%; 
    transform:translateY(-50%); 
    border:0; 
    background:rgba(0,0,0,0.5); 
    color:#fff; 
    padding:8px 12px; 
    cursor:pointer; 
    z-index: 10;
    
}

.qb-modal .qb-nav.prev { left:6px; }
.qb-modal .qb-nav.next { right:6px; }


.qbtn-item { border:0; background:transparent; cursor:pointer; padding:6px; }
.qicon { width:26px; height:auto; display:block; }

.qbtn-video.no-video { opacity: 0.45; pointer-events: none; } /* visibly disabled */
.qbtn-video.no-video .qicon { filter: grayscale(80%); }



.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    display: none;
    justify-content: center;
    align-items: center;
}




.category-filter-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.category-filter-wrapper select {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.category-filter-wrapper button {
    padding: 5px 10px;
    border-radius: 5px;
    background-color: #C54513;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
}

.category-filter-wrapper button:hover {
    background-color: #A33810;
}


.category-line {
    position: relative;
    width: 100%;
    height: 10px;
    border-bottom: 2px solid black; /* Line color */
    text-align: center;
    margin-bottom: 15px; /* Space below the line */
    
}

.category-box {
    background-color: #C54513; /* Dark orange background color */
    font-weight: bold;
    color: white; /* White text color */
    font-size: 18px; /* Increased font size */
    border-radius: 5px; /* Rounded corners */
    padding: 5px 10px; /* Padding inside the box */
    text-transform: uppercase; /* Convert text to uppercase */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    transition: background-color 0.3s; /* Smooth transition for background color change */
    border: 1px solid #ddd;
    position: absolute;
    top: -10px; /* Adjust this value to move the box up or down */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.qwoo-cart-totals-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f9f9f9;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 10px 10px 0 0;
    z-index: 1000;
    text-align: center;
}

.qwoo-cart_total {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold; /* Make text bold */
}

.qwoo-cart_total .qwoo-cart-product-count {
    
    padding: 10px 20px;
  
}

.qwoo-cart_total .qwoo-order-total {
    
    padding: 10px 20px;
    
}

.qwoo-cart_total .button.qwoo-proceed-to-checkout {
    margin-left: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: darkblue;
    color: white;
}







/* Base styles for all views */
.woocommerce-cart-form__cart-item {
    border: 1px solid #A9A9A9; /* Border color */
    border-radius: 5px; /* Border radius */
    padding: 10px; /* Padding inside the box */
    margin-bottom: 20px; /* Space between boxes */
    background-color: #fff; /* Light background color */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    border-collapse: collapse; /* Prevents any lines from collapsing borders */
}







/* Remove border-collapse issue for table */
.shop_table_responsive {
    border-collapse: separate !important;
}

/* Specific styles for category line */
.category-line {
    position: relative;
    width: 100%;
    height: 10px;
    border-bottom: 2px solid black; /* Line color */
    text-align: center;
    margin-bottom: 15px; /* Space below the line */
}

.category-box {
    background-color: #C54513; /* Dark blue background color */
    font-weight: bold;
    color: white; /* White text color */
    font-size: 18px; /* Increased font size */
    border-radius: 5px; /* Rounded corners */
    padding: 5px 10px; /* Padding inside the box */
    text-transform: uppercase; /* Convert text to uppercase */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
    transition: background-color 0.3s; /* Smooth transition for background color change */
    border: 1px solid #ddd;
    position: absolute;
    top: -10px; /* Adjust this value to move the box up or down */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}



.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Increase shadow for a deeper effect */
    border-radius: 10px; /* Add rounded corners */
    max-width: 90%; /* Responsive width */
    width: 400px; /* Set a maximum width */
    overflow: hidden; /* Hide overflow */
}

.modal-content {
    position: relative;
    text-align: center;
    padding: 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 35px; /* Increase the font size */
    color: white; /* Change the color of the text */
    background-color: red; /* Add background color */
    padding: 5px 10px; /* Add padding to increase size */
    font-weight: bold; /* Make the text bold */
    cursor: pointer;
    z-index: 10001;
    border-radius: 50%; /* Make the close button round */
    transition: background-color 0.3s ease; /* Smooth background color transition */
}

.close:hover {
    background-color: darkred; /* Darker red on hover */
}


.quantity-wrapper {
    display: flex;
    align-items: center;
}

.qty-btn {
    background-color: #C54513; /* Dark orange background color */
    color: white; /* White text color */
    border: none;
    border-radius: 3px;
    width: 30px;
    height: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.qty-btn:hover {
    background-color: #A33810; /* Slightly darker shade on hover */
}

.qty {
    width: 60px; /* Increase width for better visibility */
    text-align: center;
    font-size: 16px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    transition: border-color 0.3s;
}

.qty:focus {
    border-color: #C54513; /* Dark orange border color on focus */
    outline: none;
}
.regular-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 10px;
}

.sale-price {
    color: #C54513; /* Dark orange color for the sale price */
    font-weight: bold;
}

/* CSS for Clear Filter button */
#clear-filter {
    margin-left: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #C54513;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#clear-filter:hover {
    background-color: #A33810; /* Darker shade on hover */
}

/* 1. Base Button Style */
.tinvwl_add_to_wishlist_button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    cursor: pointer;
    text-decoration: none;
}

/* 2. Default State (Not in Wishlist) */
/* Normal ah irukum pothu grey color */
.tinvwl_add_to_wishlist_button::before {
    content: "❤"; 
    font-size: 22px;
    color: #ccc; /* Grey color */
    transition: all 0.3s ease;
}

/* 3. Active State (Already in Wishlist) */
/* Wishlist la add panna aprum, auto-ah red agidum */
.tinvwl_add_to_wishlist_button.tinvwl-product-in-list::before {
    color: #e60023 !important; /* Red color */
}

/* 4. Optional: Click pannum pothu loading state (if needed) */
.tinvwl_add_to_wishlist_button.tinvwl-product-adding::before {
    opacity: 0.5;
}




/* ================================================= */
/* QUICK BUY – FINAL DESKTOP CARD FIX (STABLE) */
/* ================================================= */

@media (min-width: 768px) {

    /* 3 PRODUCTS PER ROW */
    .woocommerce-cart-form__contents tbody {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /* CATEGORY TITLE – KEEP AS IS */
    .category-name-row {
        grid-column: 1 / -1 !important;
    }

    /* PRODUCT CARD */
    .woocommerce-cart-form__cart-item {
        display: grid !important;
        grid-template-columns: 90px 1fr;
        grid-auto-rows: min-content;
        gap: 10px 12px;
        padding: 5px;
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        position: relative;
    }

    /* IMAGE */
    .product-thumbnail {
        grid-row: 1 / span 4;
    }

    .product-thumbnail img {
        width: 80px;
        border-radius: 5px;
    }

    /* PRODUCT NAME */
    .product-name {
        grid-column: 2;
        font-weight: bold;
        font-size: 15px;
        margin-bottom: 6px;
    }

    /* PRICE ROW */
    .product-price {
        grid-column: 2;
        display: flex;
        gap: 10px;
        align-items: center;
        font-weight: bold;
    }

    .product-price::before {
        content: "Price";
        font-size: 13px;
        color: #666;
        font-weight: normal;
    }

    /* QUANTITY ROW */
    .product-quantity {
        grid-column: 2;
        display: flex;
        gap: 10px;
        align-items: center;
    }

    .product-quantity::before {
        content: "Quantity";
        font-size: 13px;
        color: #666;
    }

    /* SUBTOTAL ROW */
    .woo-product-subtotal {
        grid-column: 2;
        display: flex;
        gap: 10px;
        align-items: center;
        font-weight: bold;
    }

    .woo-product-subtotal::before {
        content: "Subtotal";
        font-size: 13px;
        color: #666;
        font-weight: normal;
    }

    /* FOOTER BUTTONS – INSIDE CARD */
    .product-footer-cell {
        grid-column: 1 / -1;
        margin-top: 10px;
        padding-top: 8px;
        border-top: 1px solid #e5e5e5;
    }

    .product-footer-block {
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .product-footer-block a,
    .product-footer-block button {
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* ================================================= */
/* MOBILE – KEEP EXISTING VIEW */
/* ================================================= */

@media (max-width: 767px) {
    .woocommerce-cart-form__contents tbody {
        display: block !important;
    }

    .woocommerce-cart-form__cart-item {
        display: block !important;
    }
}



/* =============================== */
/* FIX CATEGORY TITLE CENTER ISSUE */
/* =============================== */

@media (min-width: 768px) {

    .category-name-row {
        grid-column: 1 / -1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        width: 100%;
        margin: 20px 0;
    }

    .category-name-row .category-line {
        width: 100%;
       
    }

    .category-name-row .category-box {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}



/* ===================================== */
/* PRODUCT CARD – REDUCE VERTICAL SPACE */
/* ===================================== */

@media (min-width: 768px) {

    .woocommerce-cart-form__cart-item {
        row-gap: 4px !important;   /* main fix */
    }

    .product-name {
        margin-bottom: 2px !important;
        line-height: 1.15;
    }

    .product-price,
    .product-quantity,
    .woo-product-subtotal, 
    .product-footer-cell {
        margin: 7px !important;
        padding: 7px !important;
        line-height: 1.15;
    }

    .product-quantity {
        margin-top: 2px !important;
    }
}

/* ===================================== */
/* PRODUCT PRICE COLOR */
/* ===================================== */

@media (min-width: 768px) {

    .product-price {
        color: #C54513;   /* your brand color */
        font-weight: 700;
    }

    .product-price del {
        color: #999;
        font-weight: normal;
    }

    .product-price ins {
        color: #C54513;
        text-decoration: none;
    }
}




/* ================================================= */
/* MOBILE – FOOTER BUTTONS FULL WIDTH & EQUAL GAP */
/* ================================================= */

@media (max-width: 767px) {

    .product-footer-block {
        display: flex !important;
        gap: 10px;
        width: 100%;
    }

    .product-footer-block a,
    .product-footer-block button {
        flex: 1 !important;
        width: 100% !important;
        justify-content: center;
        align-items: center;
    }
}


/* ===================================== */
/* FIXED SIZE FOR IMAGE / GALLERY / VIDEO */
/* ===================================== */

.qb-fixed-media {
    width: 90%;
    max-width: 900px;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qb-video-wrapper,
.qb-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.qb-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}




/* ===================================== */
/* QUICK BUY – MOBILE POPUP FIX ONLY */
/* ===================================== */

@media (max-width: 767px) {

    /* COMMON MODAL BACKGROUND */
    .qb-modal {
        padding: 10px;
        align-items: center;
        justify-content: center;
        padding-top: 45% !important;
       
    }

    /* INNER POPUP BOX */
    .qb-modal .qb-modal-inner {
        width: 100% !important;
        max-width: 100% !important;
        height: 50vh !important;      /* mobile-friendly height */
        margin: 0 auto;
        padding: 10px;
        border-radius: 10px;
    }

    /* IMAGE / GALLERY POPUP */
    .qb-modal-img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    /* VIDEO POPUP */
    .qb-video-wrapper,
    .qb-video-wrapper iframe {
        width: 100%;
        height: 100%;
        border-radius: 8px;
    }

    /* CLOSE BUTTON – EASY TAP */
    .qb-modal .qb-close {
        font-size: 30px;
        top: 8px;
        right: 8px;
        background: #000;
        color: #fff;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        line-height: 36px;
        text-align: center;
    }

    /* GALLERY NAV BUTTONS */
    .qb-modal .qb-nav {
        padding: 10px 14px;
        font-size: 20px;
    }
}



