.bof-wrapper {
    font-family: 'Hind Siliguri', sans-serif;
    display: flex;
    justify-content: center;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.bof-wrapper * { box-sizing: border-box; }

.bof-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 64rem;
    width: 100%;
    border: 1px solid #f3f4f6;
    min-width: 0;
}
@media (min-width: 768px) { .bof-card { padding: 2.5rem; } }

.bof-form-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937;
}
@media (min-width: 768px) { .bof-form-heading { font-size: 1.5rem; } }

.bof-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .bof-grid { grid-template-columns: 2fr 1fr; align-items: start; } }

.bof-left { display: flex; flex-direction: column; gap: 1.25rem; }

.bof-label { display: block; font-weight: 700; margin-bottom: 0.5rem; color: #1f2937; }
.bof-required { color: #ef4444; }

.bof-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #fcfdfa;
    font-family: inherit;
    font-size: 1rem;
    color: #1f2937;
}
.bof-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--bof-primary, #055c2d);
    border-color: var(--bof-primary, #055c2d);
}

.bof-area-heading { font-weight: 700; margin-bottom: 0.75rem; color: #1f2937; }
.bof-area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.bof-area-box {
    cursor: pointer;
    border: 2px solid #d1fae5;
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
}
.bof-area-box.active {
    border-color: var(--bof-primary, #055c2d);
    background-color: #dcfce7;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.1);
}
.bof-area-title { font-weight: 700; color: #1f2937; margin: 0 0 0.25rem; }
.bof-area-sub { font-size: 0.875rem; color: #4b5563; margin: 0; }

.bof-right {
    background: transparent;
    padding: 0;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: auto;
}
@media (min-width: 768px) { .bof-right { height: auto; } }
.bof-summary-heading {
    font-size: 1.125rem;
    font-weight: 700;
    border-bottom: none;
    padding-bottom: 0;
    margin: 0 0 1rem;
    color: #1f2937;
}
.bof-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #374151;
}
.bof-summary-row:nth-of-type(2) { margin-bottom: 1rem; }
.bof-bold { font-weight: 700; }

.bof-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #d1d5db;
    padding-top: 1rem;
    margin-bottom: 1.5rem;
}
.bof-total-label { font-size: 1.125rem; font-weight: 700; color: #1f2937; }
.bof-total-price { font-size: 1.25rem; font-weight: 800; color: var(--bof-primary, #055c2d); }

.bof-cod-note {
    background: #fff;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.bof-submit-btn {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: var(--bof-primary, #055c2d) !important;
    color: #fff !important;
    font-weight: 700;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: background 0.15s ease, transform 0.15s ease;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    box-sizing: border-box;
    float: none !important;
    box-shadow: 0 10px 28px rgba(5,92,45,0.18) !important;
}
.bof-submit-btn:hover {
    background: #0b7139 !important;
    transform: translateY(-1px);
}
.bof-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.bof-submit-btn,
.bof-submit-btn * {
    color: #fff !important;
}
.bof-submit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    font-size: 1rem;
    background: rgba(255,255,255,0.18);
    border-radius: 999px;
}

.bof-pulse-dot {
    width: 0.75rem;
    height: 0.75rem;
    background: #4ade80;
    border-radius: 9999px;
    animation: bof-pulse 1.5s infinite;
    flex-shrink: 0;
}
@keyframes bof-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.bof-error-msg {
    margin-top: 0.75rem;
    color: #dc2626;
    font-size: 0.875rem;
    text-align: center;
}

.bof-success-message {
    padding: 2.5rem 0;
    text-align: center;
}
.bof-success-icon-wrap { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.bof-success-icon {
    background: var(--bof-primary, #055c2d);
    color: #fff;
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    margin: 0 auto;
}
.bof-success-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
}
@media (min-width: 768px) { .bof-success-heading { font-size: 1.875rem; } }
.bof-success-text {
    color: #4b5563;
    max-width: 32rem;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .bof-card {
        padding: 1.25rem;
    }
    .bof-form-heading {
        font-size: 1.2rem;
    }
    .bof-summary-heading {
        font-size: 1.05rem;
    }
}

@media (max-width: 767px) {
    .bof-wrapper {
        padding: 0.75rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .bof-card {
        padding: 1rem;
        border-radius: 1rem;
        max-width: 100%;
        width: 100%;
        min-width: 0;
    }
    .bof-grid {
        gap: 1rem;
    }
    .bof-left,
    .bof-right,
    .bof-area-box {
        min-width: 0;
    }
    .bof-label {
        font-size: 0.95rem;
    }
    .bof-input {
        padding: 0.85rem;
        font-size: 0.95rem;
    }
    .bof-area-grid {
        grid-template-columns: 1fr;
    }
    .bof-area-box {
        padding: 0.9rem;
    }
    .bof-area-title {
        font-size: 0.95rem;
    }
    .bof-area-sub {
        font-size: 0.82rem;
    }
    .bof-right {
        padding: 1.1rem;
    }
    .bof-summary-heading {
        font-size: 1rem;
    }
    .bof-summary-row {
        font-size: 0.95rem;
    }
    .bof-summary-total {
        padding-top: 0.85rem;
        margin-bottom: 1rem;
    }
    .bof-total-label {
        font-size: 1rem;
    }
    .bof-total-price {
        font-size: 1.15rem;
    }
    .bof-cod-note {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    .bof-submit-btn {
        padding: 0.95rem;
        font-size: 0.95rem;
        white-space: normal !important;
        word-break: break-word !important;
    }
    .bof-submit-btn .bof-pulse-dot {
        width: 0.65rem;
        height: 0.65rem;
    }
    .bof-success-icon {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 2rem;
    }
    .bof-success-heading {
        font-size: 1.35rem;
    }
    .bof-success-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .bof-card {
        padding: 0.85rem;
        border-radius: 0.8rem;
    }
    .bof-form-heading {
        font-size: 1rem;
    }
    .bof-input {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    .bof-summary-heading {
        font-size: 0.95rem;
    }
    .bof-total-price {
        font-size: 1.05rem;
    }
    .bof-submit-btn {
        font-size: 0.9rem;
        padding: 0.85rem;
    }
    .bof-area-box {
        padding: 0.85rem;
    }
}

/* ====================================================
   PRODUCTS SECTION STYLES
   ==================================================== */

.bof-products-section {
    flex: 1;
}

.bof-products-heading {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1f2937;
    font-size: 0.95rem;
}

.bof-products-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
}

.bof-product-card {
    border: 2px solid #22c55e;
    border-radius: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    transition: all 0.15s ease;
    align-items: flex-start;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.bof-product-card:hover {
    border-color: #16a34a;
    background: #dcfce7;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.bof-product-image {
    width: 70px;
    height: 70px;
    min-width: 70px;
    overflow: hidden;
    border-radius: 0.375rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bof-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
}

.bof-product-info {
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bof-product-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bof-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.bof-product-price {
    font-size: 1rem;
    font-weight: 800;
    color: #22c55e;
    margin: 0;
}

.bof-product-price-original {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.bof-product-quantity {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem;
    background: #fff;
    border-radius: 0.375rem;
    padding: 0.3rem;
    width: fit-content;
}

.bof-qty-btn {
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid #22c55e;
    background: #fff;
    color: #22c55e;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.bof-qty-btn:hover {
    background: #22c55e;
    color: #fff;
}

.bof-qty-input {
    width: 2rem;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #1f2937;
}

.bof-qty-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.1);
}

.bof-product-total {
    text-align: right;
    background: transparent;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.bof-product-total-label {
    display: none;
}

.bof-product-total-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: #22c55e;
}

/* Summary Box at bottom */
.bof-summary-box {
    background: #f0f4eb;
    padding: 1.5rem;
    border-radius: 1rem;
    margin-top: auto;
}

/* Responsive adjustments for products */
@media (min-width: 640px) {
    .bof-products-container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .bof-products-container {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1024px) {
    .bof-products-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .bof-product-card {
        flex-direction: row;
        padding: 0.6rem;
        gap: 0.6rem;
    }
    
    .bof-product-image {
        width: 62px;
        height: 62px;
        min-width: 62px;
    }
    
    .bof-product-name {
        font-size: 0.75rem;
    }
    
    .bof-product-price {
        font-size: 0.85rem;
    }
    
    .bof-qty-btn {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.7rem;
    }
    
    .bof-qty-input {
        width: 1.8rem;
        font-size: 0.65rem;
        padding: 0.2rem;
    }
    
    .bof-product-total-label {
        font-size: 0.65rem;
    }
    
    .bof-product-total-price {
        font-size: 0.75rem;
    }
    
    .bof-summary-box {
        padding: 1rem;
    }
}
