/* 
   Imperfekt Bundle CSS – Adjusted per latest feedback
   - Right title smaller
   - SHOP ALL button centered
   - Desktop: 3 product cards per row up to 1024px
   - No sticky positions
   - Products first on mobile
*/

:root {
    --bg:            #fdfaf5;
    --white:         #ffffff;
    --text:          #2d2d2d;
    --muted:         #777777;
    --accent:        #d4a373;
    --green-save:    #4a8c5e;
    --border:        #e8e0d5;
    --radius:        12px;
    --shadow:        0 4px 16px rgba(0,0,0,0.04);
    --transition:    0.25s ease;
}

body {
    background: var(--bg);
}

/* Main container – wide row layout */
.ibb-bundle-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 40px 24px 100px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    display: flex;
    flex-direction: row;
    gap: 56px;
    align-items: flex-start;
}

/* Left sidebar – old vertical style, no sticky */
.ibb-bundle-left-sidebar,
.ibb-cart-header + div,
.ibb-selected-bundle {
    flex: 0 0 400px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

/* Right products area */
.ibb-bundle-right-grid,
.ibb-main-content,
.ibb-browse-section {
    flex: 1;
    min-width: 0;
}

/* =============================================
   HEADER – SHOP ALL centered, title smaller
   ============================================= */
.ibb-grid-header-container,
.ibb-header-text,
.ibb-hero {
    margin-bottom: 48px;
    text-align: center;
}

.ibb-header-text h2,
.ibb-header-section h1,
.ibb-header-text h2 {
    font-size: 2.4rem;              /* reduced from 2.8rem */
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
}

.ibb-header-text p {
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 800px;
    margin: 0 auto 28px;
}

/* SHOP ALL – centered */
.ibb-btn-secondary,
#ibb-shop-all-btn,
.ibb-btn-shop {
    background: #000;
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 auto;                 /* centered */
    display: inline-block;
}

.ibb-btn-secondary:hover,
#ibb-shop-all-btn:hover {
    background: var(--accent);
}

/* =============================================
   PRODUCTS GRID – 3 cards per row on desktop
   ============================================= */
.ibb-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* exactly 3 columns */
    gap: 32px;
    max-width: 100%;
}

.ibb-product-card,
.ibb-product-jar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: all var(--transition);
}

.ibb-product-card:hover,
.ibb-product-jar:hover {
    border-color: #000;
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.ibb-product-img img,
.ibb-jar-img {
    width: 100%;
    height: 240px;
    object-fit: contain;
    margin-bottom: 16px;
}

.ibb-product-info h4,
.ibb-jar h3 {
    font-size: 1.12rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.ibb-product-price,
.ibb-jar-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.ibb-add-to-bundle-btn,
.ibb-btn-add {
    width: 100%;
    background: transparent;
    border: 2px solid #000;
    color: #000;
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}

.ibb-add-to-bundle-btn:hover,
.ibb-btn-add:hover {
    background: #000;
    color: white;
}

.ibb-add-to-bundle-btn.added {
    background: #f5f5f5;
    border-color: #ccc;
    color: #aaa;
    cursor: not-allowed;
}

/* =============================================
   LEFT SIDEBAR – Old vertical list style
   ============================================= */
.ibb-cart-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid #111;
}

.ibb-selected-items,
.ibb-items-wrapper {
    margin-bottom: 32px;
    min-height: 160px;
}

.ibb-selected-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.ibb-selected-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    background: #f9f6f2;
}

.ibb-item-details {
    flex: 1;
}

.ibb-item-details h5 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.ibb-remove-item {
    color: #999;
    font-size: 1.4rem;
    cursor: pointer;
}

.ibb-remove-item:hover {
    color: #e74c3c;
}

/* Progress, prices, checkout, terms – unchanged from previous good version */
.ibb-discount-bar,
.ibb-progress-section {
    margin: 24px 0;
    padding: 16px;
    background: #fdfaf5;
    border-radius: 8px;
}

.ibb-progress-container {
    height: 8px;
    background: #f0ece4;
    border-radius: 4px;
    overflow: hidden;
}

#ibb-progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.6s ease;
}

#ibb-discount-msg {
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

.ibb-price-details .ibb-price-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.ibb-total-row {
    font-size: 1.4rem;
    font-weight: 800;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 12px;
}

.ibb-discount-row .green {
    color: var(--green-save);
}

#ibb-checkout-btn,
.ibb-btn-checkout {
    width: 100%;
    background: #000;
    color: white;
    border: none;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
}

#ibb-checkout-btn:disabled {
    background: #ccc;
}

.ibb-terms-box,
.ibb-terms {
    margin-top: 40px;
    font-size: 0.92rem;
    color: var(--muted);
}

.ibb-terms h4 {
    color: #444;
    margin-bottom: 12px;
}

.ibb-terms ol {
    padding-left: 20px;
    line-height: 1.6;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .ibb-bundle-container {
        flex-direction: column;
        gap: 60px;
    }

    /* Products first on mobile */
    .ibb-bundle-right-grid,
    .ibb-main-content,
    .ibb-browse-section {
        order: -1;
    }

    .ibb-bundle-left-sidebar {
        width: 100%;
    }

    /* On mobile: switch to auto-fill (2 or 1 card per row) */
    .ibb-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }

    .ibb-header-text h2 {
        font-size: 2.1rem;
    }
}

@media (max-width: 640px) {
    .ibb-bundle-container {
        padding: 32px 16px 80px;
    }

    .ibb-selected-item img {
        width: 50px;
        height: 50px;
    }

    .ibb-products-grid {
        grid-template-columns: 1fr;   /* 1 card per row on small screens */
    }
}