/**
 * Band of Beans Shopping Interface Styles
 * Clean, elegant design matching the provided mockup
 */

/* Container */
.bob-product-form {
    max-width: 900px;
    margin: 3rem auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Header Section - Brown to match reference */
.bob-header {
    background: linear-gradient(to bottom right, #7e5d4c, #986f5b);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.bob-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.bob-subtitle {
    font-size: 0.95rem;
    opacity: 0.95;
    color: white;
}

/* Product Section - Side by side layout */
.bob-product-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 2rem;
    gap: 1.5rem;
    background: transparent;
    border-bottom: none;
    width: 100%;
    box-sizing: border-box;
}

.bob-product-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #8B7355;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bob-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bob-product-meta {
    flex: 1;
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bob-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.bob-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.bob-desc {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
}

/* Main Container */
.bob-main-container {
    display: flex;
    padding: 2rem;
    gap: 2rem;
}

/* Toggle Panels */
.bob-panels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 0 0 240px;
}

.bob-panel {
    display: block;
    position: relative;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
}

.bob-panel.active,
.bob-panel:has(input:checked) {
    background: #C9CC68;
    border-color: #B8BC58;
}

.bob-panel:hover {
    border-color: #C9CC68;
}

.bob-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bob-panel-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.bob-panel-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.25rem;
    display: block;
}

.bob-panel-note {
    font-size: 0.85rem;
    color: #666;
    display: block;
}

.bob-panel.active .bob-panel-title,
.bob-panel:has(input:checked) .bob-panel-title {
    color: #2a2a2a;
}

.bob-panel.active .bob-panel-note,
.bob-panel:has(input:checked) .bob-panel-note {
    color: #4a4a4a;
}

/* Right Section */
.bob-right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Controls */
.bob-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.bob-control {
    display: flex;
    flex-direction: column;
}

.bob-control label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bob-control select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.bob-control select:hover {
    border-color: #bbb;
}

.bob-control select:focus {
    outline: none;
    border-color: #C9CC68;
    box-shadow: 0 0 0 3px rgba(201, 204, 104, 0.1);
}

.bob-control select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Hide frequency control by default */
.bob-control--frequency {
    display: none;
}

.bob-panel--subscribe:has(input:checked) ~ .bob-right-section .bob-control--frequency {
    display: flex;
}

/* Price Box */
.bob-pricebox {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
}

.bob-lines {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bob-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #555;
}

.bob-line-price {
    font-weight: 600;
    color: #333;
}

.bob-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    padding-top: 0.75rem;
    border-top: 1px solid #ddd;
}

.bob-total-price {
    font-size: 1.25rem;
    color: #333;
}

.bob-impact {
    margin: 1rem 0 0 0;
    padding: 0.75rem;
    background: rgba(201, 204, 104, 0.1);
    border-left: 3px solid #C9CC68;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn.secondary {
    background: #f8f8f8;
    color: #333;
    border: 2px solid #ddd;
}

.action-btn.secondary:hover {
    background: #ececec;
    border-color: #bbb;
    transform: translateY(-1px);
}

.action-btn.primary {
    background: linear-gradient(135deg, #8B7355 0%, #A68B6F 100%);
    color: white;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #7A6244 0%, #95795E 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 115, 85, 0.3);
}

.btn-price {
    font-weight: 700;
    font-size: 1rem;
}

/* Legacy CTA Button - keep for backwards compatibility */
.bob-add {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8B7355 0%, #A68B6F 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.bob-add:hover {
    background: linear-gradient(135deg, #7A6244 0%, #95795E 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 115, 85, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bob-main-container {
        flex-direction: column;
    }
    
    .bob-panels {
        flex: 1;
        flex-direction: row;
        gap: 0.75rem;
    }
    
    .bob-panel {
        flex: 1;
        min-height: 80px;
        padding: 1rem;
    }
    
    .bob-controls {
        grid-template-columns: 1fr;
    }
    
    .bob-product-section {
        flex-direction: column;
        text-align: center;
    }
}

/* Override any conflicting WooCommerce styles */
.woocommerce div.product form.cart.bob-product-form,
.woocommerce div.product form.bob-product-form {
    margin-bottom: 2rem;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
}

.woocommerce div.product form.cart.bob-product-form .button,
.bob-product-form .button.bob-add {
    float: none;
    margin: 0;
}

/* Ensure interface appears correctly */
html body .single-product .woocommerce div.product form.cart.bob-product-form.taste-box-form {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    clear: both;
    margin: 2rem auto !important;
    width: 100% !important;
    max-width: 900px !important;
}

/* Additional fallback with attribute selector */
.bob-product-form[data-unit-price] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide the awful green "Pay with link" button */
#wc-stripe-express-checkout-element,
.wc-stripe-express-checkout-element,
.woocommerce-checkout .wc-stripe-checkout-buttons,
.wc-stripe-checkout-buttons,
*[class*="pay-with-link"],
*[id*="pay-with-link"],
.stripe-connect-checkout-button,
.wc-stripe-connect-checkout,
.stripe-express-checkout-button {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}