/**
 * Product Archive Styles
 * Modern shop page styling based on Hisense design
 */

/* Product Grid Layout */
.hisense-products-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 60px 27px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hisense-product-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    display: flex;
    gap: 10px;
}

.product-badges.single-product-badges {
    left: 120px;
}

.single-product-badges .badge,
.similar-product-card .badge {
    padding: 9px 15px 3px 15px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 400;
    text-transform: capitalize;
    color: #fff;
    line-height: 15px;
}

/* No Image Styles */
.product-image.no-image {
    background: #E9F5F5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image.no-image img.placeholder-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.7;
}



.product-info {
    padding-top: 20px;
}

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

.product-title a {
    /* color: #2c3e50; */
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--hisense-primary);
}

.product-category {
    margin-bottom: 0;
    font-weight: 400;
}

.variable-attributes {
    margin-top: 12px;
    margin-bottom: 15px;
}

.attributes-list {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #007cba;
    font-size: 13px;
}

.attribute-item {
    margin-bottom: 6px;
    line-height: 1.4;
}

.attribute-item:last-child {
    margin-bottom: 0;
}

.attribute-label {
    font-weight: 600;
    color: #495057;
}

.attribute-options {
    color: #6c757d;
}

.more-options {
    color: #007cba;
    font-weight: 500;
    font-style: italic;
}

.variable-indicator {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #1976d2;
    text-align: center;
}

.variable-indicator span {
    font-size: 13px;
    color: #1976d2;
    font-weight: 500;
}

.compare-text {
    font-weight: 500;
}

.compare-btn,
.details-btn,
.buy-now-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 300;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.compare-btn {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.compare-btn:hover,
.compare-btn.active {
    background: #00d4aa;
    color: #fff;
    border-color: #00d4aa;
}

.details-btn {
    background: #6c757d;
    color: #fff;
}

.details-btn:hover {
    color: #ffffff;
    background: #36A8A5;
}

.buy-now-btn {
    background: #00d4aa;
    color: #fff;
}

.buy-now-btn:hover {
    background: #36A8A5;
}

.buy-now-btn.variable {
    background: #3742fa;
}

.buy-now-btn.variable:hover {
    background: #36A8A5;
}

.compare-icon::before {
    content: "⚖";
}





@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hisense-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 999999;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hisense-notification.success {
    background: #28a745;
}

.hisense-notification.error {
    background: #dc3545;
}

.hisense-notification.info {
    background: #17a2b8;
}

.add-to-cart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.add-to-cart-popup .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.add-to-cart-popup .popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.add-to-cart-popup .popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.add-to-cart-popup .popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

.add-to-cart-popup .popup-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #00d4aa, #007cba);
    color: white;
}

.add-to-cart-popup .success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.add-to-cart-popup .popup-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.add-to-cart-popup .popup-body {
    padding: 30px;
}

.add-to-cart-popup .product-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.add-to-cart-popup .popup-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.add-to-cart-popup .product-details h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.add-to-cart-popup .product-details p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.add-to-cart-popup .popup-actions {
    display: flex;
    gap: 15px;
    padding: 0 30px 30px;
}

.add-to-cart-popup .continue-shopping,
.add-to-cart-popup .view-cart {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-popup .continue-shopping {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.add-to-cart-popup .continue-shopping:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.add-to-cart-popup .view-cart {
    background: #007cba;
    color: white;
}

.add-to-cart-popup .view-cart:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.woocommerce-before-shop-loop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.woocommerce-result-count {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.woocommerce-ordering {
    margin: 0;
}

.woocommerce-notices-wrapper {
    margin: 20px 0;
    z-index: 999;
}

.woocommerce-message {
    background-color: #0f834d;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
    position: relative;
}

.woocommerce-message .button.wc-forward {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-right: 10px;
    padding: 5px 15px;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
}

.woocommerce-message .button.wc-forward:hover {
    background: rgba(255, 255, 255, 0.3);
}

.woocommerce-error {
    background-color: #e2401c;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* Enhanced Add to Cart Button States */
.enhanced_add_to_cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Buy Now Button Styling */
.hisense-buy-now-section {
    margin-top: 15px;
}

.buy-now-button {
    background-color: #ff6b35 !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.buy-now-button:hover {
    background-color: #e55a2b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3) !important;
}

.buy-now-button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}


/* Responsive styling for buttons */
@media (min-width: 1024px) {
    .product-badges.single-product-badges {
        left: 115px;
    }
}

@media (min-width: 768px) {
    /* .hisense-product-purchase1 {
        display: flex;
        flex-direction: column;
        gap: 15px;
    } */

    .hisense-buy-now-section {
        margin-top: 0;
    }
}

.enhanced_add_to_cart.loading {
    position: relative;
}

.enhanced_add_to_cart.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}

.hisense-modern-gallery-layout {
    border: 1px solid #00bcd4;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    position: relative;
}

.hisense-gallery-container {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
    /* align-items: center; */
    gap: 10px;
    height: 520px;
}

/* Thumbnails Swiper */
.hisense-thumbs-swiper {
    width: 95px;
    height: 520px;
    margin-right: 0;
    background: none;
    display: flex;
    align-items: flex-start;
    overflow-y: auto;
}

.hisense-thumbs-swiper::-webkit-scrollbar {
    display: none;
}

.hisense-thumbs-swiper .swiper-wrapper {
    flex-direction: column;
}

.hisense-thumbs-swiper .swiper-slide {
    width: 100% !important;
    height: 95px !important;
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f8f9fa;
    cursor: pointer;
    transition: border 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hisense-thumbs-swiper .swiper-slide-thumb-active {
    border: 2px solid #00bcd4;
    background: #fff;
}

.hisense-thumb-img {
    width: 70px;
    display: block;
}

/* Main Image Swiper */
.hisense-main-swiper {
    width: calc(100% - 90px);
    height: 520px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: none;
    border: 1px solid #049c98;
}

.hisense-main-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hisense-main-img {
    /* width: 100%;
    height: 100%; */
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

/* Wishlist Icon Overlay */
.hisense-wishlist-icon {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 10;
    background: #f6f6f6;
    border-radius: 50%;
    border: 1px solid #EAEAEA;
}

.wishlist-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.wishlist-btn svg {
    color: #bbb;
    transition: color 0.2s;
}

.wishlist-btn.active svg,
.wishlist-btn:hover svg {
    color: #dc3545;
    fill: #dc3545;
}

/* Remove Swiper navigation arrows */
.hisense-main-swiper .swiper-button-next,
.hisense-main-swiper .swiper-button-prev {
    display: none !important;
}

.tinvwl_add_to_wishlist_button.tinvwl-button.disabled-add-wishlist,
.tinvwl_add_to_wishlist_button.disabled-add-wishlist {
    opacity: 1 !important;
}

/* Responsive */
@media (max-width: 1550px) {

    .single-product-badges .badge,
    .similar-product-card .badge {
        padding: 6px 15px 2px 15px;
        font-size: 13px;
    }
}

@media (max-width: 900px) {
    .hisense-main-swiper {
        width: 100vw;
        max-width: 98vw;
        height: 320px;
    }

    .hisense-thumbs-swiper {
        height: 320px;
        width: 70px;
    }
}

@media (max-width: 860px) {
    
}

@media (max-width: 600px) {
    .hisense-modern-gallery-layout {
        flex-direction: column;
        gap: 12px;
    }

    .hisense-gallery-container {
        flex-direction: column;
        gap: 12px;
    }

    .hisense-main-swiper {
        width: 100vw;
        max-width: 100vw;
        height: 220px;
    }

    .hisense-thumbs-swiper {
        flex-direction: row;
        width: 100vw;
        height: 70px;
        margin-bottom: 0;
    }

    .hisense-thumbs-swiper .swiper-wrapper {
        flex-direction: row;
    }

    .hisense-thumbs-swiper .swiper-slide {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0;
        margin-right: 8px;
    }

    .product-badges.single-product-badges {
        left: 20px;
    }
}

@media (max-width: 768px) {
    .woocommerce-before-shop-loop {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .woocommerce-result-count {
        text-align: center;
    }

    .woocommerce-ordering {
        text-align: center;
    }

    .hisense-shop-controls,
    .woocommerce-before-shop-loop {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .shop-controls-left,
    .shop-controls-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hisense-ordering-wrapper {
        justify-content: center;
    }

    .select-wrapper {
        min-width: 100%;
    }

    /* .hisense-products-grid {
        display: block;
    } */

    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .product-actions {
        flex-direction: column;
    }

    .modal-actions {
        flex-direction: column;
    }

    .hisense-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .hisense-gallery-container {
        height: auto;
    }

    .hisense-grand-total-section h4 {
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .add-to-cart-popup .popup-content {
        width: 95%;
        margin: 20px;
    }

    .add-to-cart-popup .popup-header {
        padding: 20px 15px 15px;
    }

    .add-to-cart-popup .success-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .add-to-cart-popup .popup-header h3 {
        font-size: 20px;
    }

    .add-to-cart-popup .popup-body {
        padding: 20px;
    }

    .add-to-cart-popup .product-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .add-to-cart-popup .popup-product-image {
        width: 60px;
        height: 60px;
    }

    .add-to-cart-popup .popup-actions {
        flex-direction: column;
        padding: 0 20px 20px;
    }
}