/**
 * Frontend Styles
 * Save this as: assets/frontend-style.css
 */

.msbb-bundle-builder {
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.msbb-header h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    letter-spacing: 0.5px;
    white-space: pre-wrap;
}

.msbb-steps-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.msbb-step-nav {
    flex: 1;
    min-width: 150px;
    padding: 12px 15px;
    background: #f5f5f5;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
}

.msbb-step-nav.active {
    background: #4eb114;
    color: white;
}

.msbb-step-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.msbb-step-nav .step-name {
    display: block;
    margin: 5px 0;
    font-size: 14px;
}

.msbb-step-nav .step-count {
    display: block;
    font-size: 11px;
    opacity: 0.8;
}

.msbb-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.msbb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4eb114 0%, #5ec91a 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.msbb-bundle-builder {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.msbb-header {
    grid-column: 1 / -1;
}

.msbb-steps-navigation {
    grid-column: 1 / -1;
}

.msbb-progress-bar {
    grid-column: 1 / -1;
}

.msbb-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: #856404;
    white-space: pre-wrap;
}

.msbb-products-container {
    /*display: grid;*/
    /*grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));*/
    gap: 20px;
    margin-bottom: 30px;
}

.msbb-product-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.msbb-product-card:hover {
    border-color: #4eb114;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.msbb-product-card.selected {
    border-color: #4eb114;
    background: #f5fff5;
}

.msbb-product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.msbb-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.msbb-product-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.msbb-product-selector input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4eb114;
}

.msbb-product-details {
    padding: 15px;
}
.msbb-step-products{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.msbb-product-details h4 {
    font-size: 14px;
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #333;
    min-height: 40px;
}

.msbb-product-price {
    display: flex;
    align-items: center;
    gap: 10px;
}

.msbb-product-price .original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
}

.msbb-product-price .current-price {
    font-weight: 700;
    color: #4eb114;
    font-size: 16px;
}

.msbb-navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.msbb-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.msbb-btn-prev,
.msbb-btn-next {
    background: #6c757d;
    color: white;
    flex: 1;
}

.msbb-btn-prev:hover,
.msbb-btn-next:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.msbb-sidebar {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.msbb-discount-info h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
    text-transform: uppercase;
}

.msbb-discount-progress {
    margin-bottom: 25px;
}

.msbb-discount-progress p {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.msbb-discount-progress .current-discount {
    color: #4eb114;
    font-size: 18px;
}

.discount-message {
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
}

.discount-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
    border-top: 2px solid #e0e0e0;
    position: relative;
}

.discount-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s ease;
}

.discount-marker.active {
    background: #4eb114;
    color: white;
    border-color: #4eb114;
    transform: scale(1.2);
}

.msbb-selected-products {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
}

.msbb-selected-product {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 5px;
    position: relative;
}

.msbb-selected-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.msbb-selected-product-info {
    flex: 1;
}

.msbb-selected-product-info h5 {
    margin: 0 0 5px 0;
    font-size: 13px;
    font-weight: 600;
}

.msbb-selected-product-info .price {
    font-size: 14px;
    font-weight: 700;
    color: #4eb114;
}

.msbb-remove-product {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
    padding: 5px;
    transition: color 0.3s ease;
}

.msbb-remove-product:hover {
    color: #4eb114;
}

.msbb-summary {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
    margin-bottom: 20px;
}

.msbb-summary > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.msbb-subtotal,
.msbb-discount-amount {
    color: #666;
}

.msbb-total {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.msbb-btn-add-cart {
    width: 100%;
    background: #4eb114;
    color: white;
    padding: 16px;
    font-size: 16px;
}

.msbb-btn-add-cart:hover:not(:disabled) {
    background: #3d8f0f;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(78, 177, 20, 0.3);
}

.msbb-btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .msbb-bundle-builder {
        grid-template-columns: 1fr;
    }
    
    .msbb-sidebar {
        position: relative;
        top: 0;
    }
    
    .msbb-products-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .msbb-bundle-builder {
        padding: 15px;
        margin: 20px auto;
    }
    
    .msbb-header h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .msbb-steps-navigation {
        flex-direction: column;
        gap: 8px;
    }
    
    .msbb-step-nav {
        min-width: 100%;
        padding: 10px 12px;
    }
    
    .msbb-step-nav .step-name {
        font-size: 13px;
    }
    
    .msbb-products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .msbb-product-details h4 {
        font-size: 13px;
        min-height: 35px;
    }
    
    .msbb-product-price .current-price {
        font-size: 14px;
    }
    
    .msbb-navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .msbb-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .msbb-sidebar {
        padding: 20px;
    }
    
    .msbb-discount-info h3 {
        font-size: 13px;
    }
    
    .msbb-selected-products {
        max-height: 250px;
    }
    
    .msbb-selected-product {
        gap: 10px;
        padding: 8px;
    }
    
    .msbb-selected-product img {
        width: 50px;
        height: 50px;
    }
    
    .msbb-selected-product-info h5 {
        font-size: 12px;
    }
    
    .msbb-selected-product-info .price {
        font-size: 13px;
    }
    
    .discount-scale {
        padding: 8px 0;
    }
    
    .discount-marker {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .msbb-bundle-builder {
        padding: 10px;
        margin: 10px auto;
        display: block;
    }
    
    .msbb-header h2 {
        font-size: 18px;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .msbb-step-nav {
        padding: 8px 10px;
    }
    
    .msbb-step-nav .step-number {
        font-size: 10px;
    }
    
    .msbb-step-nav .step-name {
        font-size: 12px;
        margin: 3px 0;
    }
    
    .msbb-step-nav .step-count {
        font-size: 10px;
    }
    
    .msbb-progress-bar {
        height: 6px;
        margin-bottom: 20px;
    }
    
    .msbb-notice {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .msbb-products-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .msbb-product-card {
        border-width: 1px;
    }
    
    .msbb-product-details {
        padding: 12px;
    }
    
    .msbb-product-details h4 {
        font-size: 12px;
        min-height: 30px;
    }
    
    .msbb-product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .msbb-product-price .original-price {
        font-size: 12px;
    }
    
    .msbb-product-price .current-price {
        font-size: 14px;
    }
    
    .msbb-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .msbb-sidebar {
        padding: 15px;
    }
    
    .msbb-discount-info h3 {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .msbb-discount-progress p {
        font-size: 13px;
    }
    
    .msbb-discount-progress .current-discount {
        font-size: 16px;
    }
    
    .discount-message {
        font-size: 11px;
    }
    
    .discount-scale {
        justify-content: space-around;
        padding: 8px 0;
    }
    
    .discount-marker {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    
    .discount-marker.active {
        transform: scale(1.1);
    }
    
    .msbb-selected-products {
        max-height: 200px;
        padding: 10px;
    }
    
    .msbb-selected-product {
        gap: 8px;
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .msbb-selected-product img {
        width: 45px;
        height: 45px;
    }
    
    .msbb-selected-product-info h5 {
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .msbb-selected-product-info .price {
        font-size: 12px;
    }
    
    .msbb-remove-product {
        font-size: 16px;
    }
    
    .msbb-summary {
        padding-top: 15px;
        margin-bottom: 15px;
    }
    
    .msbb-summary > div {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .msbb-total {
        font-size: 16px;
        padding-top: 10px;
    }
    
    .msbb-btn-add-cart {
        padding: 14px;
        font-size: 14px;
    }
    
    /* Notification responsive */
    .msbb-notification {
        left: 10px;
        right: 10px;
        top: 10px;
        max-width: none;
        padding: 15px;
    }
    
    .msbb-notification-title {
        font-size: 14px;
    }
    
    .msbb-notification-icon {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    .msbb-notification-message {
        font-size: 13px;
    }
    
    .msbb-notification-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .msbb-notification-btn {
        width: 100%;
        padding: 10px;
        font-size: 12px;
    }
}

/* Extra small devices (landscape phones) */
@media (max-width: 375px) {
    .msbb-bundle-builder {
        padding: 8px;
        display: block;
    }
    
    .msbb-header h2 {
        font-size: 16px;
    }
    
    .msbb-step-nav {
        padding: 6px 8px;
    }
    
    .msbb-step-nav .step-name {
        font-size: 11px;
    }
    
    .msbb-products-container {
        gap: 12px;
    }
    
    .msbb-product-details {
        padding: 10px;
    }
    
    .msbb-product-details h4 {
        font-size: 11px;
        min-height: 25px;
    }
    
    .msbb-sidebar {
        padding: 12px;
    }
    
    .msbb-discount-info h3 {
        font-size: 11px;
    }
    
    .discount-marker {
        width: 28px;
        height: 28px;
        font-size: 9px;
        border-width: 1px;
    }
    
    .msbb-selected-product img {
        width: 40px;
        height: 40px;
    }
}

/* Tablet landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .msbb-bundle-builder {
        max-width: 100%;
        padding: 20px;
        display: block;
    }
    
    .msbb-products-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large tablets and small desktops */
@media (min-width: 1025px) and (max-width: 1280px) {
    .msbb-bundle-builder {
        max-width: 1200px;
        display: block;
    }
    
    .msbb-sidebar {
        max-width: 350px;
    }
}

/* Notification Popup */
.msbb-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 99999;
    animation: slideInRight 0.4s ease;
    border-left: 4px solid #4eb114;
}

.msbb-notification.error {
    border-left-color: #dc3545;
}

.msbb-notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.msbb-notification-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.msbb-notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4eb114;
    color: white;
    font-size: 16px;
}

.msbb-notification.error .msbb-notification-icon {
    background: #dc3545;
}

.msbb-notification-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.msbb-notification-close:hover {
    color: #333;
}

.msbb-notification-message {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.msbb-notification-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.msbb-notification-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.msbb-notification-btn-primary {
    background: #4eb114;
    color: white;
}

.msbb-notification-btn-primary:hover {
    background: #3d8f0f;
}

.msbb-notification-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.msbb-notification-btn-secondary:hover {
    background: #e0e0e0;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.msbb-notification.hiding {
    animation: slideOutRight 0.4s ease forwards;
}

@media (max-width: 480px) {
    .msbb-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}