/* ========================================================
 * Global and Base Styles
 * ========================================================
 */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');
body {
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background: #f9fafb;
}
.content {
    transition: margin-left 0.3s ease;
}
.top-nav {
    background: linear-gradient(90deg, #1F2937, #374151);
}
/* ========================================================
 * Form and Component Styles
 * ========================================================
 */
.form-card {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}
.error {
    color: #DC2626;
    background: #FEE2E2;
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}
.success {
    color: #10B981;
    background: #ECFDF5;
    padding: 0.75rem;
    border-radius: 0.25rem;
    text-align: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}
.input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.section-divider {
    border-top: 1px solid #E5E7EB;
    padding-top: 1rem;
    margin-top: 1rem;
}
.preview-img {
    max-width: 100%;
    height: auto;
    margin-top: 0.25rem;
    border-radius: 0.25rem;
    max-height: 150px;
    object-fit: cover;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}
/* ========================================================
 * Dynamic Row Styles (Products, Offers, etc.) - UPDATED for float-btn-row
 * ========================================================
 */
.product-row, .offer-row, .problem-row, .solution-item-row, .benefit-row, .video-testimonial-row, .image-testimonial-row, .step-row, .usage-row, .faq-row, .float-btn-row {
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #f9fafb;
}
.remove-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.125rem;
    cursor: pointer;
    font-size: 0.75rem;
}
.add-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.875rem;
}
/* NEW: Edit Button Style */
.edit-btn {
    display: inline-block;
    background: #3B82F6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}
.edit-btn:hover {
    background: #2563EB;
}
/* ========================================================
 * Typography and Form Controls
 * ========================================================
 */
h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}
h4 {
    font-size: 0.875rem;
}
input, textarea {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}
textarea {
    rows: 2;
    resize: vertical;
}
label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}
.mb-2 {
    margin-bottom: 0.5rem;
}
.mb-3 {
    margin-bottom: 0.75rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mt-2 {
    margin-top: 0.5rem;
}
.mt-3 {
    margin-top: 0.75rem;
}
.mt-4 {
    margin-top: 1rem;
}
/* ========================================================
 * Sortable Sections Styles
 * ========================================================
 */
.sortable-section {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sortable-section li {
    background: #f3f4f6;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: move;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sortable-section li:hover {
    background: #e5e7eb;
}
.sortable-section .handle {
    color: #6b7280;
    font-size: 1rem;
}
.sortable-section input[type="checkbox"] {
    margin-right: 0.5rem;
}
/* ========================================================
 * Responsive Styles
 * ========================================================
 */
@media (max-width: 768px) {
    .content {
        margin-left: 0 !important;
    }
    .input-group, .grid-3, .grid-4 {
        display: block;
    }
    .grid-3 > div, .grid-4 > div {
        margin-bottom: 0.5rem;
    }
    .sortable-section li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
@media (min-width: 769px) {
    .content {
        margin-left: 250px;
    }
}