/* ===== Body & layout fixes ===== */
body.seller-body {
    background-color: #f9fafb;
    min-height: 100vh;
    font-family: "Cairo", sans-serif;
}

/* ===== Header (fixed) ===== */
.seller-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
}

.seller-nav .max-w-7xl {
    height: 100%;
}

.seller-nav .flex {
    height: 100%;
}

.seller-nav-brand {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.25rem;
}

.seller-nav-user {
    color: #64748b;
    font-weight: 500;
}

.seller-logout-btn {
    background-color: #ef4444;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    border: none;
    cursor: pointer;
}

.seller-logout-btn:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}

/* ===== Sidebar ===== */
.seller-sidebar {
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    width: 280px;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    z-index: 40;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateX(0);
    /* default visible on large screens */
}

.seller-sidebar .nav-inner {
    padding-top: 5rem;
    /* space for header */
    padding-bottom: 2rem;
}

.seller-sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    border-radius: 0.5rem;
    border: none;
}

.seller-sidebar-link:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.seller-sidebar-link.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.seller-sidebar-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

/* ===== Main content area ===== */
.seller-main-content {
    margin-right: 280px;
    /* leave space for sidebar on desktop */
    padding: 2rem;
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.seller-header-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.seller-content-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    color: #1e293b;
}

/* ===== Overlay for mobile when sidebar open ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 45;
    /* between sidebar (50) and header (60) */
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ===== Responsive behavior ===== */
@media (max-width: 1024px) {
    /* hide sidebar by moving right */
    .seller-sidebar {
        transform: translateX(100%);
    }

    /* when open, bring it back */
    .seller-sidebar.open {
        transform: translateX(0);
    }

    /* main content should use full width */
    .seller-main-content {
        margin-right: 0;
        padding: 1rem;
    }

    /* adjust sidebar padding for mobile */
    .seller-sidebar .nav-inner {
        padding-top: 1rem;
    }
}

@media (max-width: 768px) {
    /* Hide search bar on small screens */
    .seller-nav .hidden.md\\:flex {
        display: none !important;
    }

    /* Adjust header padding */
    .seller-nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Adjust logo size */
    .seller-nav h1 {
        font-size: 1.5rem;
    }

    .seller-nav p {
        font-size: 0.75rem;
    }
}

/* Typography/color adjustments */
.seller-content-card h1,
.seller-content-card h2,
.seller-content-card h3 {
    color: #1e293b !important;
}

.seller-content-card p,
.seller-content-card span {
    color: #374151 !important;
}

.favorite-btn i {
    transition: all 0.3s ease;
}

.favorite-btn:hover i {
    transform: scale(1.1);
}

/* Alpine.js cloak */
[x-cloak] {
    display: none !important;
}

/* Dropdown improvements */
.dropdown-menu {
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* RTL support for dropdown */
[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}
