:root {
    --ngo-primary: #3b5c1c;
    --ngo-secondary: #eef3d2;
    --ngo-bg: #f9fbed;
    --ngo-text: #2a3d13;
    --ngo-light-border: #d4dfb9;
    --ngo-white: #ffffff;
}

body {
    background-color: var(--ngo-bg);
}

/* Layout Toggle */
.ngo-layout-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ngo-secondary);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--ngo-text);
}
.toggle-icons {
    display: flex;
    gap: 10px;
    align-items: center;
}
.icon-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 4px;
    background: transparent;
    color: var(--ngo-primary);
    transition: all 0.2s ease;
}
.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}
.grid-layout .icon-grid,
.list-layout .icon-list {
    background: var(--ngo-primary);
    color: var(--ngo-white);
}

/* Grid Layout */
.ngo-sevas-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}
.grid-layout .ngo-seva-item {
    width: calc(50% - 10px); /* 2 columns to accommodate horizontal layout */
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--ngo-primary);
    color: var(--ngo-white);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
@media (max-width: 768px) {
    .grid-layout .ngo-seva-item {
        width: 100%;
    }
}
.grid-layout .ngo-seva-image {
    width: 40%;
    min-height: 120px;
    background-size: cover;
    background-position: center;
}
.grid-layout .ngo-seva-content {
    width: 60%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.grid-layout .ngo-seva-title-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.grid-layout .ngo-seva-title-price h4 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--ngo-white);
}
.grid-layout .price {
    background: var(--ngo-bg);
    color: var(--ngo-text);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}
.grid-layout .ngo-seva-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
}
.grid-layout .add-btn {
    background: var(--ngo-bg);
    color: var(--ngo-text);
}

/* List Layout */
.list-layout .ngo-sevas-wrapper {
    flex-direction: column;
}
.list-layout .ngo-seva-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--ngo-secondary);
    border-radius: 8px;
    margin-bottom: 10px;
}
.list-layout .ngo-seva-item:nth-child(even) {
    background: #e5ecd0;
}
.list-layout .ngo-seva-image {
    display: none;
}
.list-layout .ngo-seva-content {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}
.list-layout .ngo-seva-title-price {
    display: flex;
    gap: 15px;
    align-items: center;
    color: var(--ngo-text);
}

.ngo-seva-title-price h4 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

/* Buttons and Quantity */
.add-btn {
    background: var(--ngo-white);
    color: var(--ngo-primary);
    border: none;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}
.list-layout .add-btn {
    background: var(--ngo-primary);
    color: var(--ngo-white);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 2px;
}
.list-layout .quantity-selector {
    background: var(--ngo-primary);
    color: white;
}
.quantity-selector button {
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
}

/* Floating Bottom Bar */
.ngo-floating-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw; /* Use viewport width directly */
    box-sizing: border-box; /* Prevent padding from expanding width */
    background: #000;
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99999; /* Ensure it stays above everything */
}
.btn-donate-now {
    background: var(--ngo-secondary);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* Checkout UI */
.ngo-checkout-container {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}
.checkout-main {
    flex: 2;
    background: var(--ngo-white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.checkout-sidebar {
    flex: 1;
}
.cart-header {
    font-weight: bold;
    color: var(--ngo-text);
    margin-bottom: 15px;
}
.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--ngo-light-border);
}
.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cart-item-info .item-title {
    font-weight: bold;
    color: var(--ngo-text);
}
.cart-item-info .item-price-each {
    font-size: 13px;
    color: #666;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cart-item-actions .item-total-price {
    font-weight: bold;
    color: var(--ngo-text);
}
.cart-item-actions .remove-item-btn {
    background: transparent;
    border: none;
    color: #cc0000;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
}
.cart-item-row:last-child {
    border-bottom: none;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    padding: 15px 0;
    border-top: none;
    border-bottom: none;
}
.add-seva-dropdown {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ngo-light-border);
}
.add-seva-dropdown select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid var(--ngo-light-border);
}

/* Form Styles */
#ngo-donation-form {
    margin-top: 20px;
    background: var(--ngo-secondary);
    padding: 20px;
    border-radius: 8px;
}
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--ngo-text);
}
.form-group input, .form-group select {
    padding: 0 12px;
    height: 44px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
    background: #fff;
    color: var(--ngo-text);
}

.input-with-icon {
    display: flex;
    align-items: stretch;
    height: 44px;
}
.input-with-icon input {
    border-radius: 0 5px 5px 0 !important;
    border: 1px solid #ccc;
    flex: 1;
    height: 100%;
}
.input-with-icon .currency-symbol, .input-with-icon .flag-icon {
    padding: 0 15px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 5px 0 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    box-sizing: border-box;
}

.checkbox-group {
    margin-top: 20px;
}
.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--ngo-text);
    line-height: 1.4;
}
.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}
.custom-checkbox .checkmark {
    display: none; /* Using native styled checkbox for reliability */
}
.btn-donate {
    background: var(--ngo-primary);
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}
.checkout-qty-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 4px 10px;
}
.checkout-qty-selector button {
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ngo-text);
}
.checkout-qty-selector .qty {
    font-weight: bold;
    min-width: 16px;
    text-align: center;
}

.payment-info-box {
    background: var(--ngo-secondary);
    padding: 20px;
    border-radius: 8px;
}
.payment-info-box h4 {
    margin-top: 0;
}
