/* Build Your Own Bowl Styles */

.byob-container {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-2xl);
}

.byob-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    position: relative;
}

@media (min-width: 992px) {
    .byob-layout {
        grid-template-columns: 400px 1fr;
        align-items: start;
    }
}

/* Left Column: Reference Panel */
@media (min-width: 992px) {
    .byob-reference {
        position: sticky;
        top: 100px; /* Offset for sticky navbar */
    }
}

.reference-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

.reference-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.reference-info {
    padding: var(--spacing-lg);
}

.reference-info h3 {
    font-family: var(--font-classic);
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.reference-info p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.reference-price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

.reference-label {
    background: rgba(var(--secondary), 0.1);
    color: var(--secondary);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid rgba(var(--secondary), 0.2);
}

/* Right Column: Bowl Builder */
.byob-builder {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.builder-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.builder-step {
    margin-bottom: var(--spacing-xl);
}

.step-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-header h3 {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    font-weight: 600;
}

.base-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.base-info h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.base-price {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.included-badge {
    background: rgba(39, 174, 96, 0.1);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.step-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
}

/* Extras Grid - Smaller items */
.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--spacing-sm);
}

.extra-card {
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    user-select: none;
    background: var(--bg-primary);
}

.extra-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.extra-card.selected {
    border-color: var(--primary);
    background: rgba(39, 174, 96, 0.05);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.extra-checkbox {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.extra-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: var(--spacing-xs);
    background: var(--bg-secondary);
}

.extra-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.extra-price {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bowl-name-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.bowl-name-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Sticky Summary */
.sticky-summary {
    position: sticky;
    bottom: 20px;
    background: var(--bg-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: var(--spacing-xl);
    z-index: 100;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.summary-line.extra-item {
    font-size: 0.85rem;
    padding-left: 1rem;
    position: relative;
}

.summary-line.extra-item::before {
    content: '+';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    margin-bottom: 1rem;
}

#live-total {
    color: var(--primary-dark);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: var(--font-size-xl);
}

.close-btn {
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.checkout-summary {
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

/* Quantity Controls */
.qty-controls {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--spacing-sm);
    background: rgba(0,0,0,0.05);
    border-radius: var(--radius-sm);
    padding: 2px;
}
.extra-card.selected .qty-controls {
    display: flex;
}
.qty-btn {
    background: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.qty-btn:active {
    transform: scale(0.95);
}
.qty-val {
    font-weight: 600;
    font-size: 0.9rem;
}
