/* Bundles Section - Responsive Design */
.bundles-section {
    position: relative;
    z-index: 10;
    margin: 2rem 0;
    font-family: 'Cairo', sans-serif;
}

.bundles-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr; /* Mobile First: 1 column */
}

/* Bundle Card Base */
.bundle-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bundle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(18, 84, 57, 0.1);
}

/* Banner Image */
.bundle-banner {
    width: 100%;
    height: 180px;
    object-fit: cover;
    position: relative;
}

.bundle-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(255, 65, 108, 0.3);
    z-index: 2;
}

/* Content Area */
.bundle-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bundle-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.bundle-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    flex: 1;
}

/* Horizontal Scroll for Products (Mobile First) */
.bundle-products-slider {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.bundle-products-slider::-webkit-scrollbar {
    height: 4px;
}
.bundle-products-slider::-webkit-scrollbar-thumb {
    background: var(--theme-primary);
    border-radius: 4px;
}

.bundle-product-item {
    min-width: 60px;
    max-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
}

.bundle-product-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.bundle-product-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Pricing and Action */
.bundle-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

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

.bundle-current-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--theme-primary);
}

.bundle-original-price {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.bundle-action-btn {
    background: var(--theme-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-decoration: none;
    display: block;
}

.bundle-action-btn:hover {
    background: var(--theme-secondary);
    color: white;
}

.bundle-coupon {
    font-size: 0.8rem;
    background: var(--bg-color);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px dashed var(--theme-primary);
    color: var(--theme-primary);
    display: inline-block;
    margin-top: 5px;
}

/* Tablet Layout (>= 576px) */
@media (min-width: 576px) {
    .bundles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Layout (>= 992px) */
@media (min-width: 992px) {
    .bundles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Featured Bundle (First item spans 2 columns or full width depending on count) */
    .bundle-card.featured {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: stretch;
    }
    
    .bundle-card.featured .bundle-banner {
        width: 50%;
        height: auto;
        min-height: 300px;
    }
    
    .bundle-card.featured .bundle-content {
        width: 50%;
        justify-content: center;
        padding: 2.5rem;
    }
    
    .bundle-card.featured .bundle-title {
        font-size: 1.8rem;
    }
    
    .bundle-card.featured .bundle-product-img {
        width: 80px;
        height: 80px;
    }
    
    .bundle-card.featured .bundle-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .bundle-card.featured .bundle-action-btn {
        width: auto;
        padding: 12px 30px;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-img {
    height: 180px;
    width: 100%;
    background: rgba(0,0,0,0.05);
}

.skeleton-text {
    height: 15px;
    margin: 15px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

.skeleton-text.title {
    height: 25px;
    width: 60%;
}

.desktop-only {
    display: none;
}

@media (min-width: 576px) {
    .desktop-only {
        display: flex;
    }
}

body.dark-mode .bundle-card {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}
body.dark-mode .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}
