/* Bundled Books Section Styles */
.bundled-books-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.bundled-books-section .heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: #393280;
    margin-bottom: 40px;
    text-align: center;
}

.bundled-books-grid {
    margin-bottom: 30px;
}

/* Make bundles look like regular products */
.bundle-product {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bundle-product:hover {
    border-color: #CF4747;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.bundle-product-inner {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bundle-image {
    position: relative;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f8f8;
}

.bundle-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.bundle-product:hover .bundle-image img {
    transform: scale(1.05);
}

/* Sale badge like regular products */
.onsale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #CF4747;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.bundle-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bundle-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bundle-content h3 a {
    text-decoration: none;
    color: #393280;
    font-weight: 600;
}

.bundle-content h3 a:hover {
    color: #CF4747;
}

.bundle-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

.bundle-content .price {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bundle-content .price ins {
    font-size: 1.2rem;
    font-weight: 700;
    color: #CF4747;
    text-decoration: none;
}

.bundle-content .price del {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.bundle-content .discount-off {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.bundle-content .button {
    background: #CF4747;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: auto;
}

.bundle-content .button:hover {
    background: #b03a3a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(207, 71, 71, 0.3);
}

/* Grid layouts */
.om-bundles-grid.woocommerce.columns-3 ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.om-bundles-grid.woocommerce.columns-4 ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.om-bundles-grid.woocommerce.columns-6 ul.products {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .om-bundles-grid.woocommerce.columns-4 ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .om-bundles-grid.woocommerce.columns-6 ul.products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .bundled-books-section {
        padding: 40px 0;
    }
    
    .bundled-books-section .heading {
        font-size: 2rem;
    }
    
    .bundle-product-inner {
        padding: 12px;
    }
    
    .bundle-image img {
        height: 180px;
    }
    
    .om-bundles-grid.woocommerce.columns-3 ul.products,
    .om-bundles-grid.woocommerce.columns-4 ul.products,
    .om-bundles-grid.woocommerce.columns-6 ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .om-bundles-grid.woocommerce.columns-3 ul.products,
    .om-bundles-grid.woocommerce.columns-4 ul.products,
    .om-bundles-grid.woocommerce.columns-6 ul.products {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Single Bundle Page Styles */
.bundle-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bundle-single-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.bundle-images {
    position: relative;
}

.bundle-main-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bundle-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.bundle-main-image img:hover {
    transform: scale(1.02);
}

.bundle-actions .add-to-cart-btn,
.bundle-actions .buy-now-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bundle-actions .add-to-cart-btn:hover,
.bundle-actions .buy-now-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    background: #CF4747;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.quantity-btn:hover {
    background: #b03a3a;
}

.quantity-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.quantity-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.service-info {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.3s;
}

.service-item:hover {
    background: #f0f0f0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item:last-child {
    grid-column: span 2;
}

.social-share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
}

.social-share a:hover {
    transform: scale(1.1);
}

.social-share a.twitter { background: #1DA1F2; }
.social-share a.facebook { background: #CF4747; }
.social-share a.instagram { background: #E4405F; }
.social-share a.linkedin { background: #CF4747; }

.bundle-image-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s;
}

.bundle-image-dots .dot:hover {
    background: #CF4747;
}

.bundle-image-dots .dot.active {
    background: #CF4747;
}

/* Bundle Details Styles */
.bundle-details {
    padding: 20px 0;
}

.bundle-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.bundle-author {
    color: #666;
    font-size: 1.1em;
    margin: 0 0 20px 0;
}

.bundle-pricing {
    margin: 20px 0;
}

.price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

.original-price {
    font-size: 1.5em;
    color: #999;
    text-decoration: line-through;
}

.discount-off {
    color: #666;
    font-size: 1em;
}

.bundle-quantity {
    margin: 20px 0;
}

.bundle-quantity label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
}

#bundle-quantity {
    border: none;
    padding: 10px;
    text-align: center;
    width: 60px;
    font-size: 16px;
}

.bundle-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.add-to-cart-btn {
    background: #666;
    color: white;
}

.add-to-cart-btn:hover {
    background: #555;
}

.buy-now-btn {
    background: #CF4747;
    color: white;
}

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

.service-icon {
    width: 40px;
    height: 40px;
    background: #CF4747;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.service-text {
    display: flex;
    flex-direction: column;
}

.service-text strong {
    font-size: 14px;
    color: #333;
}

.service-text span {
    font-size: 12px;
    color: #666;
}

.bundle-description {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.bundle-description p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #333;
}

.read-more {
    color: #CF4747;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

.bundle-contents {
    margin: 20px 0;
}

.bundle-contents h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #333;
}

.bundle-products-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bundle-products-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.bundle-products-list li:last-child {
    border-bottom: none;
}

.bundle-products-list a {
    color: #333;
    text-decoration: none;
    flex: 1;
}

.bundle-products-list a:hover {
    color: #CF4747;
}

.product-price {
    color: #666;
    font-weight: 500;
}

/* Loading and success states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-message {
    background: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.error-message {
    background: #f44336;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

/* Responsive design for single bundle page */
@media (max-width: 768px) {
    .bundle-single-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bundle-title {
        font-size: 2em;
    }
    
    .bundle-actions {
        flex-direction: column;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .service-info {
        gap: 10px;
    }
    
    .bundle-pricing .price {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Bundle share section */
.bundle-share {
    margin-top: 20px;
}

.bundle-share h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.social-share {
    display: flex;
    gap: 10px;
}

/* Bundle Cart Item Styles */
.woocommerce-cart-form__cart-item.bundle-item {
    border-left: 4px solid #CF4747;
    background-color: #f9f9f9;
}

.woocommerce-cart-form__cart-item.bundle-item .product-info {
    position: relative;
}

.bundle-badge {
    display: inline-block;
    background: #CF4747;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.bundle-discount-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Bundle Popup Styles */
.bundle-remove-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bundle-remove-popup {
    background: white;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.bundle-remove-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bundle-remove-popup-header h3 {
    margin: 0;
    color: #333;
}

.bundle-remove-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.bundle-remove-popup-content {
    margin-bottom: 20px;
}

.bundle-remove-popup-content p {
    margin: 0 0 10px 0;
    color: #666;
}

.bundle-remove-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.bundle-remove-popup-actions .button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.bundle-remove-confirm {
    background: #CF4747;
    color: white;
}

.bundle-remove-cancel {
    background: #666;
    color: white;
}

/* Bundle Message Styles */
.bundle-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    z-index: 10000;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

.bundle-message-success {
    background: #4CAF50;
}

.bundle-message-error {
    background: #f44336;
}

.bundle-message-warning {
    background: #ff9800;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}