/* Donation Items Styles */
.donation-items-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

/* Promoted Donations Section */
.promoted-donations-section {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.promoted-donations-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
}

.promoted-donations-title::after {
    content: '⭐';
    margin-left: 0.5rem;
}

.promoted-donations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Regular Donations Section */
.regular-donations-section {
    margin-top: 2rem;
}

.regular-donations-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.donation-items-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
}

.donation-items-section p {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.donation-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.donation-item-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.donation-item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Promoted Item Styles */
.donation-item-card.promoted-item {
    border: 3px solid var(--primary-color);
    background: linear-gradient(135deg, #fff 0%, #fefdf8 100%);
    position: relative;
    transform: scale(1.02);
}

.donation-item-card.promoted-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 50px rgba(212, 175, 55, 0.3);
}

.promoted-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #f4d03f 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
    z-index: 2;
}

.promoted-badge::before {
    content: '⭐';
    margin-right: 4px;
}

.donation-item-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.donation-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.donation-item-card:hover .donation-item-image img {
    transform: scale(1.05);
}

.donation-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.donation-item-card:hover .donation-item-overlay {
    opacity: 1;
}

.donate-item-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.donate-item-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.donate-item-btn svg {
    width: 18px;
    height: 18px;
}

.donation-item-content {
    padding: 1.5rem;
}

.donation-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.donation-item-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.donation-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.donation-item-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.donation-item-available {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--background-light);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Loading and Error States */
.loading-message, .error-message, .no-items-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.error-message {
    color: var(--error-color);
}

/* Donation Modal Styles */
.donation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.donation-modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.donation-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.donation-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-right: 2rem;
}

.donation-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.donation-modal-close:hover {
    background: var(--background-light);
    color: var(--text-primary);
}

.donation-modal-body {
    padding: 2rem;
}

.donation-item-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.donation-modal-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}

.donation-item-details {
    flex: 1;
}

.donation-item-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.donation-item-details p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.donation-item-price,
.donation-item-available {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-label,
.available-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.price-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.available-count {
    font-weight: 600;
    color: var(--success-color);
}

/* Donation Form Styles */
.donation-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.donation-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.donation-form label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin: 0;
    padding: 0;
}

.donation-form input,
.donation-form textarea {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.donation-form input:focus,
.donation-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.donation-form textarea {
    resize: vertical;
    min-height: 100px;
}



.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-secondary,
.btn-primary {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--background-light);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .donation-items-grid,
    .promoted-donations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .promoted-donations-title,
    .regular-donations-title {
        font-size: 1.5rem;
    }
    
    .donation-item-card.promoted-item {
        transform: none;
    }
    
    .donation-item-card.promoted-item:hover {
        transform: translateY(-4px);
    }
    
    .donation-item-info {
        flex-direction: column;
        text-align: center;
    }
    
    .donation-modal-image {
        width: 100%;
        height: 200px;
        align-self: center;
    }
    
    .donation-modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .donation-modal-header,
    .donation-modal-body {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notification-message {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

/* CSS Variables (add to main.css if not already present) */
:root {
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --background-light: #f7fafc;
    --border-color: #e2e8f0;
    --success-color: #48bb78;
    --error-color: #f56565;
}

/* Custom Donation Section */
.custom-donation-section {
    margin: 4rem 0;
    padding: 2rem 0;
}

.custom-donation-section h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
}

.custom-donation-section > p {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.custom-donation-card {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff 0%, #fefdf8 100%);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.2);
    border: 2px solid var(--primary-color);
    text-align: center;
    transition: all 0.3s ease;
}

.custom-donation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.3);
}

.custom-donation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.custom-donation-icon {
    animation: pulse 2s ease-in-out infinite;
}

.custom-donation-icon img {
    display: block;
    margin: 0 auto;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.custom-donation-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.custom-donation-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.custom-donation-content .btn-primary {
    margin-top: 1rem;
    padding: 14px 32px;
    font-size: 1.1rem;
}

/* Custom Donation Modal Specific Styles */
#customDonationModal .donation-modal-content {
    max-width: 550px;
}

#customDonationModal .form-group input[type="number"] {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

#kvitelSection {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    margin: 0;
}

#kvitelSection label {
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    padding: 0;
    display: block;
}

#kvitelSection textarea {
    background: white;
    min-height: 180px;
    font-size: 1rem;
    line-height: 1.6;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    margin: 0;
}

#kvitelSection textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0.5rem 0;
    padding: 0;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    color: var(--primary-color);
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.checkbox-label:hover {
    color: var(--primary-dark);
    opacity: 0.9;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    position: relative;
    top: 0;
}

.checkbox-label span {
    display: inline-block;
    line-height: 1.5;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Mobile Responsive for Custom Donation */
@media (max-width: 768px) {
    .custom-donation-card {
        padding: 2rem 1.5rem;
    }
    
    .custom-donation-section h2 {
        font-size: 2rem;
    }
    
    .custom-donation-content h3 {
        font-size: 1.5rem;
    }
    
    .custom-donation-content p {
        font-size: 1rem;
    }
    
    .custom-donation-icon img {
        width: 60px;
        height: 60px;
    }
}

/* Hero Actions */
.hero-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.hero-btn {
    background: #541D23;
    color: var(--white);
    border: 2px solid var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 160px;
    justify-content: center;
}

.hero-btn:hover {
    background: var(--white);
    color: #541D23;
    border: 2px solid #541D23;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(84, 29, 35, 0.25);
}

.hero-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}
