﻿body {
    background-color: #fafafa;
    color: #333;
}

.ai-chip {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f3f5;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
    margin-bottom: 8px;
}

    .ai-chip:hover, .ai-chip.active {
        background: var(--pd-price-color);
        color: #fff;
        border-color: var(--pd-price-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .ai-chip i {
        margin-right: 5px;
    }

.ai-assistant-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1040;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
    transition: all 0.3s ease;
    animation: pulseAi 2s infinite;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .ai-assistant-btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 6px 20px rgba(30, 60, 114, 0.6);
        color: #fff;
    }

@keyframes pulseAi {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 60, 114, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(30, 60, 114, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(30, 60, 114, 0);
    }
}

.ai-modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.ai-modal-content {
    border-radius: 12px;
    border: none;
}

.ai-choice-btn {
    width: 100%;
    text-align: left;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #eaeaea;
    background: #fff;
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.2s;
}

    .ai-choice-btn:hover {
        border-color: #2a5298;
        background: #f8f9fc;
    }

    .ai-choice-btn.selected {
        border-color: #2a5298;
        background: #eef2f7;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .ai-choice-btn i {
        font-size: 1.2rem;
        color: #2a5298;
        margin-right: 10px;
        width: 25px;
        text-align: center;
    }

.ecommerce-breadcrumb {
    padding: 20px 0;
    font-size: 0.85rem;
    font-weight: 500;
}

    .ecommerce-breadcrumb a {
        color: #777;
        text-decoration: none;
        transition: color 0.2s;
    }

        .ecommerce-breadcrumb a:hover {
            color: var(--pd-price-color);
        }

.ecommerce-gallery-wrapper {
    position: relative;
    width: 100%;
}

.ecommerce-gallery-main {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eaeaea;
    background: #fff;
    margin-bottom: 12px;
    position: relative;
    aspect-ratio: 4/3;
}

.ecommerce-main-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ecommerce-main-slide.active {
        opacity: 1;
        z-index: 2;
    }

    .ecommerce-main-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.ecommerce-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.ecommerce-thumb-item {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    object-fit: cover;
    transition: all 0.2s;
    background: #fff;
    flex-shrink: 0;
}

    .ecommerce-thumb-item.active, .ecommerce-thumb-item:hover {
        border-color: var(--pd-price-color);
        transform: scale(1.02);
    }

.ecommerce-slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s;
    z-index: 10;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

    .ecommerce-slide-btn:hover {
        background: var(--pd-btn-bg);
        color: #fff;
    }

    .ecommerce-slide-btn.prev {
        left: 15px;
    }

    .ecommerce-slide-btn.next {
        right: 15px;
    }

.ecommerce-gallery-main:hover .ecommerce-slide-btn {
    opacity: 1;
}

.ecommerce-detail-tags, .ecommerce-floating-tags {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 15;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    pointer-events: none;
}

.ecommerce-detail-tag, .ecommerce-float-tag {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.tag-promo, .ft-promo {
    background: rgba(217, 31, 74, 0.75);
    color: #fff;
}

.tag-new, .ft-new {
    background: rgba(13, 202, 240, 0.75);
    color: #000;
    border-color: rgba(0,0,0,0.1);
}

.tag-fast, .ft-fastdel {
    background: rgba(25, 135, 84, 0.75);
    color: #fff;
}

.ft-clearance {
    background: rgba(220, 53, 69, 0.75);
    color: #fff;
}

.ft-runout {
    background: rgba(255, 193, 7, 0.75);
    color: #000;
    border-color: rgba(0,0,0,0.1);
}

.ft-gift {
    background: rgba(13, 110, 253, 0.75);
    color: #fff;
}

.ft-freeship {
    background: rgba(108, 117, 125, 0.75);
    color: #fff;
}

.ecommerce-detail-panel {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
}

.ecommerce-product-title {
    font-weight: 800;
    font-size: 1.8rem;
    color: #222;
    line-height: 1.2;
    margin-bottom: 8px;
}

.ecommerce-sku-code {
    color: #999;
    font-size: 0.85rem;
}

.ecommerce-price-container {
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.ecommerce-old-price-val {
    text-decoration: line-through;
    color: var(--pd-old-price-color);
    font-size: var(--pd-old-price-size);
    display: inline-block;
}

.ecommerce-current-price-val {
    color: var(--pd-price-color);
    font-size: var(--pd-price-size);
    font-weight: 800;
    display: inline-block;
    line-height: 1.1;
}

.ecommerce-bundle-invoice-box {
    background: #fffdf9;
    border: 1px solid #f5ebd3;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.ecommerce-invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #eadecc;
    font-size: 0.85rem;
    color: #555;
}

    .ecommerce-invoice-row:last-child {
        border-bottom: none;
    }

.ecommerce-btn-submit {
    background: var(--pd-btn-bg);
    color: var(--pd-btn-text);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 15px;
    border-radius: var(--pd-btn-radius);
    width: 100%;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

    .ecommerce-btn-submit:hover {
        background: var(--pd-btn-hover);
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    }

.ecommerce-module-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .ecommerce-module-card:hover {
        border-color: var(--pd-price-color);
        box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    }

.ecommerce-module-img-holder {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #fff;
}

    .ecommerce-module-img-holder img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 8px;
        transition: transform 0.3s ease;
    }

    .ecommerce-module-img-holder:hover img {
        transform: scale(1.05);
    }

.ecommerce-module-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.ecommerce-module-price-val {
    color: var(--pd-price-color);
    font-weight: 800;
    font-size: 1.1rem;
}

.ecommerce-module-actions {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.ecommerce-qty-field {
    flex: 0 0 60px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.ecommerce-btn-toggle {
    border: 1px solid var(--pd-btn-bg);
    background: #fff;
    color: var(--pd-btn-bg);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: 0.2s;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .ecommerce-btn-toggle.active {
        background: var(--pd-btn-bg);
        color: var(--pd-btn-text);
    }

.ecommerce-tabs .nav-link {
    color: #666;
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 24px;
    font-size: 1rem;
}

    .ecommerce-tabs .nav-link.active {
        color: var(--pd-price-color);
        border-bottom: 2px solid var(--pd-price-color);
        background: transparent;
    }

.ecommerce-tab-body {
    background: #fff;
    padding: 30px;
    border-radius: 0 0 8px 8px;
    border: 1px solid #eaeaea;
    border-top: none;
    font-size: 1rem;
    line-height: 1.7;
}

.smart-floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: auto;
    width: 380px;
    max-height: calc(100vh - 60px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1050;
    transform: translateX(150%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
}

    .smart-floating-cart.show-widget {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

.floating-cart-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eaeaea;
    background: #fdfdfd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.floating-cart-body {
    padding: 10px 20px;
    overflow-y: auto;
}

    .floating-cart-body .ecommerce-invoice-row {
        font-size: 0.9rem;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
    }

    .floating-cart-body::-webkit-scrollbar {
        width: 5px;
    }

    .floating-cart-body::-webkit-scrollbar-thumb {
        background: #dcdcdc;
        border-radius: 5px;
    }

.floating-cart-footer {
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

.desktop-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-total-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pd-price-color);
    margin: 0;
    text-align: right;
}

.floating-cart-btn {
    background: var(--pd-btn-bg);
    color: var(--pd-btn-text);
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: var(--pd-btn-radius);
    border: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .floating-cart-btn:hover {
        background: var(--pd-btn-hover);
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    }

@media (max-width: 991px) {
    .ecommerce-product-title {
        font-size: 1.4rem;
    }

    .ecommerce-detail-panel {
        padding: 15px;
    }

    .ecommerce-btn-submit {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .smart-floating-cart {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(150%);
        box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
    }

        .smart-floating-cart.show-widget {
            transform: translateY(0);
        }

    .floating-cart-header {
        display: none !important;
    }

    .desktop-subtotal {
        display: none !important;
    }

    .floating-cart-body {
        padding: 10px 15px;
        max-height: 120px;
    }

        .floating-cart-body .ecommerce-invoice-row {
            font-size: 0.8rem;
        }

    .floating-cart-footer {
        padding: 12px 15px 20px 15px;
    }

    .footer-actions {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .floating-total-price {
        font-size: 1.4rem;
        text-align: left;
    }

    .floating-cart-btn {
        width: auto;
        flex-grow: 1;
        margin-left: 15px;
        padding: 10px;
    }

    .ai-assistant-btn {
        bottom: 85px !important;
        left: 20px !important;
        width: 55px !important;
        height: 55px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
    }

        .ai-assistant-btn i {
            font-size: 1.5rem !important;
            margin: 0 !important;
        }

        .ai-assistant-btn span {
            display: none !important;
        }

        .ai-assistant-btn:hover {
            width: 55px !important;
            padding: 0 !important;
            justify-content: center !important;
        }
}
