/* Main Layout */
.pages-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 1.5rem;
    height: calc(100vh - 180px);
    overflow: hidden;
}

.pages-management, 
.products-assignment {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    overflow-y: auto;
    height: 100%;
}

/* Page Items */
.page-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.page-item:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.page-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.page-name {
    flex: 1;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.3s;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.page-name:focus {
    outline: none;
    border-color: #4f46e5;
}

.save-page-btn {
    padding: 0.75rem 1.5rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.save-page-btn:hover {
    background: #4338ca;
}

/* Assigned Products */
.assigned-products {
    margin-top: 1.25rem;
}

.assigned-products h4 {
    color: #4b5563;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.products-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.assigned-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    width: calc(50% - 0.75rem);
    position: relative;
}

.assigned-product img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.assigned-product span {
    flex: 1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-product-btn {
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.remove-product-btn:hover {
    background: #dc2626;
}

/* Product List */
.products-assignment h2 {
    margin-bottom: 1.25rem;
}

.search-box {
    margin-bottom: 1.25rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Be Vietnam Pro', sans-serif;
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #4f46e5;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.product-item:hover {
    background: #f9fafb;
}

.product-item.assigned {
    opacity: 0.7;
}

.product-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.product-info {
    flex: 1;
}

.product-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #111827;
}

.product-info p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.1rem 0;
}

.page-selector {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 2px solid #e5e7eb;
    font-family: 'Be Vietnam Pro', sans-serif;
    min-width: 150px;
    transition: border-color 0.3s;
}

.page-selector:focus {
    outline: none;
    border-color: #4f46e5;
}

/* Loading Overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .pages-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .assigned-product {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-actions {
        width: 100%;
    }
    
    .page-selector {
        width: 100%;
    }
}
/* Custom Pages Section */
.custom-pages-section {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.add-page-btn {
    background: #4f46e5;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background 0.3s;
}

.add-page-btn:hover {
    background: #4338ca;
}

.custom-pages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.custom-page-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.custom-page-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.custom-page-item h4 {
    margin: 0 0 0.5rem 0;
    color: #111827;
}

.custom-page-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.custom-page-actions button {
    padding: 0.5rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.edit-page-btn {
    background: #e0e7ff;
    color: #4f46e5;
}

.delete-page-btn {
    background: #fee2e2;
    color: #ef4444;
}

/* Custom Page Editor */
#customPageEditor {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

#customPageEditor h3 {
    margin-top: 0;
}

#customPageName {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

#customPageContent {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: 'Be Vietnam Pro', sans-serif;
    resize: vertical;
}

.editor-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.save-btn {
    background: #4f46e5;
    color: white;
    padding: 0.75rem 1.5rem;
}

.cancel-btn {
    background: #e5e7eb;
    color: #4b5563;
    padding: 0.75rem 1.5rem;
}
        /* Banner Styles */
        .banner {
            background-color: #405aaf;
            color: white;
            padding: 20px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .banner h1 {
            margin-bottom: 5px;
            font-size: 1.8rem;
        }

        .banner .clientName {
            font-size: 0.9rem;
            color: #eee;
        }

        /* Hamburger Menu */
        #hamburger {
            display: none;
            font-size: 30px;
            cursor: pointer;
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 1100;
            color: white;
        }

        /* Sidebar Styles */
        .focus {
            position: fixed;
            top: 0;
            left: 0;
            width: 250px;
            height: 100%;
            background-color: #2c3e50;
            padding-top: 60px;
            z-index: 1000;
            transition: transform 0.3s ease-in-out;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .focus.open {
            transform: translateX(0);
        }

        .navMenu {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .navMenu h5.clientName {
            color: white;
            margin-bottom: 20px;
            padding: 0 20px;
            font-size: 1.1rem;
            font-weight: 600;
        }

        .navMenu ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .navMenu ul li {
            margin: 0;
            width: 100%;
        }

        .navMenu ul li a {
            display: block;
            padding: 15px 20px;
            color: #ecf0f1;
            text-decoration: none;
            border-bottom: 1px solid #34495e;
            transition: background-color 0.3s ease;
            font-size: 1rem;
        }

        .navMenu ul li a:hover,
        .navMenu ul li a.active {
            background-color: #1abc9c;
            color: white;
        }

        /* Main Content Area */
        .right {
            margin-left: 250px;
            padding: 20px;
            transition: margin-left 0.3s ease-in-out;
            min-height: 100vh;
        }

        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .focus {
                transform: translateX(-100%);
                width: 100%;
                top: 0;
                height: auto;
                padding-top: 50px;
            }

            .focus.open {
                transform: translateX(0);
            }

            #hamburger {
                display: block;
                color: white;
                z-index: 1100;
            }

            .right {
                margin-left: 0;
                padding: 15px;
            }
            .banner h1{
                font-size: 1.6rem;
            }
        }

        @media (max-width: 480px) {
           .banner {
             padding: 15px;
           }
           .banner h1{
            font-size: 1.4rem;
           }
           .banner .clientName{
             font-size: 0.8rem;
           }
        }