/* Desktop Layout Fixes */
@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .banner-title {
        font-size: 36px !important;
    }
}

/* Modal Styles override/fix */
/* Modal Styles override/fix */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active,
.modal.show,
.modal-overlay.active,
.modal-overlay.show {
    display: flex;
}

/* Fix for when .modal is used as content wrapper inside overlay */
.modal-overlay .modal {
    position: relative;
    display: block;
    /* Reset display from none */
    width: 100%;
    max-width: 500px;
    background: var(--bg-card, #fff);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    height: auto;
    /* Reset height from 100% */
}

/* Keep .modal as overlay if used standalone (legacy) */
body>.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card, #fff);
    padding: 24px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted, #6b7280);
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Styles for Modals */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea,
.modal input[type="text"],
.modal input[type="number"],
.modal input[type="email"],
.modal input[type="date"],
.modal select,
.modal textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    background: var(--bg-input, #fff);
    font-size: 0.875rem;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow */
    margin-top: 4px;
    /* Add slight spacing from label */
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* Button Styles if missing */
.btn-primary {
    background-color: var(--accent, #6366f1);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-primary, #111827);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}