/* Product Bundle Frontend Styles */

/* Bundle Products Container */
.bundle-products-container {
    margin: 20px 0;
    padding: 20px;
    border: 2px solid #e8f4f8;
    border-radius: 8px;
    background: #f8fcff;
    position: relative;
    overflow: hidden;
}

.bundle-products-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #2c5aa0, #4a90d9);
}

/* Bundle Title */
.bundle-title {
    margin: 0 0 15px 0;
    color: #2c5aa0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.bundle-title::before {
    content: '🎁';
    margin-right: 8px;
    font-size: 20px;
}

/* Bundle Products List */
.bundle-products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Bundle Product Item */
.bundle-product-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.bundle-product-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #c1c9d0;
    transform: translateY(-1px);
}

.bundle-product-item::after {
    content: 'BEDAVA';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #27ae60;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    transform: rotate(15deg);
}

/* Bundle Product Image */
.bundle-product-image {
    flex-shrink: 0;
    margin-right: 15px;
    position: relative;
}

.bundle-product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #e1e5e9;
}

/* Bundle Product Details */
.bundle-product-details {
    flex: 1;
}

.bundle-product-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.bundle-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bundle-product-title a:hover {
    color: #2c5aa0;
}

/* Bundle Product Price */
.bundle-product-price {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #888;
    font-size: 14px;
}

.bundle-price {
    color: #27ae60;
    font-weight: 600;
    font-size: 16px;
}

/* Bundle Product Description */
.bundle-product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Bundle Info */
.bundle-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

.bundle-notice {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 10px 12px;
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 4px;
    color: #2d5a2d;
    font-size: 14px;
}

.bundle-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Cart Item Styling */
.cart-item .bundle-item-indicator {
    display: block;
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 3px;
}

.cart-item .bundle-main-indicator {
    display: block;
    font-size: 12px;
    color: #2c5aa0;
    font-weight: 600;
    margin-top: 3px;
}

/* Cart Quantity Styling */
.quantity.bundle-quantity.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.quantity.bundle-quantity.disabled span {
    font-weight: 600;
    color: #666;
}

.quantity.bundle-quantity.disabled small {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Bundle Price Display in Cart */
.bundle-price del {
    color: #999;
    margin-right: 8px;
}

.bundle-price ins {
    color: #27ae60;
    font-weight: 600;
    text-decoration: none;
}

.bundle-price .bundle-notice {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
    padding: 0;
    background: none;
    border: none;
}

/* Checkout Styling */
.checkout .bundle-item {
    position: relative;
    padding-left: 20px;
}

.checkout .bundle-item::before {
    content: '↳';
    position: absolute;
    left: 0;
    color: #666;
    font-weight: bold;
}

.checkout .bundle-main {
    font-weight: 600;
    color: #2c5aa0;
}

/* Animation for Bundle Items */
@keyframes slideInFromRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.bundle-product-item {
    animation: slideInFromRight 0.3s ease forwards;
}

.bundle-product-item:nth-child(1) { animation-delay: 0.1s; }
.bundle-product-item:nth-child(2) { animation-delay: 0.2s; }
.bundle-product-item:nth-child(3) { animation-delay: 0.3s; }
.bundle-product-item:nth-child(4) { animation-delay: 0.4s; }
.bundle-product-item:nth-child(5) { animation-delay: 0.5s; }

/* Responsive Design */
@media (max-width: 768px) {
    .bundle-products-container {
        margin: 15px 0;
        padding: 15px;
    }

    .bundle-title {
        font-size: 16px;
    }

    .bundle-product-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .bundle-product-image {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .bundle-product-image img {
        width: 80px;
        height: 80px;
    }

    .bundle-product-title {
        font-size: 15px;
    }

    .bundle-product-price {
        justify-content: center;
    }

    .bundle-notice {
        font-size: 13px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .bundle-products-container {
        margin: 10px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .bundle-title {
        font-size: 15px;
    }

    .bundle-product-item {
        padding: 12px;
    }

    .bundle-product-image img {
        width: 70px;
        height: 70px;
    }

    .bundle-products-list {
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .bundle-products-container {
        border: 1px solid #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }

    .bundle-product-item {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .bundle-product-item::after {
        display: none !important;
    }
}

/* Mini Cart Bundle Styling */
.widget_shopping_cart .bundle-price {
    color: #27ae60;
    font-weight: 600;
}

.widget_shopping_cart .bundle-price small {
    color: #666;
    font-weight: normal;
    font-size: 11px;
}

.widget_shopping_cart .bundle-subtotal {
    color: #27ae60;
    font-weight: 600;
}

.widget_shopping_cart .quantity small {
    color: #666;
    font-size: 11px;
}

/* WooCommerce mini cart bundle items */
.woocommerce-mini-cart .bundle-price,
.woocommerce-mini-cart .bundle-subtotal {
    color: #27ae60 !important;
    font-weight: 600 !important;
}

.woocommerce-mini-cart .bundle-price small {
    color: #666 !important;
    font-weight: normal !important;
    font-size: 10px !important;
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .bundle-products-container {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }

    .bundle-product-item {
        background: #2a2a2a;
        border-color: #444;
    }

    .bundle-product-title a {
        color: #e0e0e0;
    }

    .bundle-product-title a:hover {
        color: #6ab7ff;
    }

    .bundle-notice {
        background: #2d4a2d;
        border-color: #3d5a3d;
        color: #a0c0a0;
    }

    .widget_shopping_cart .bundle-price,
    .widget_shopping_cart .bundle-subtotal,
    .woocommerce-mini-cart .bundle-price,
    .woocommerce-mini-cart .bundle-subtotal {
        color: #4ade80 !important;
    }
}