/*
================================================================
||
||  Providential Clover: Admin Hub Styles
||  Version: 2.0 (UI/UX Enhancement Update)
||
================================================================
*/

/* --- Base Layout & Theming --- */
:root {
    --hub-accent: #007bff;
    --hub-accent-hover: #0056b3;
    --hub-danger: #e74c3c;
    --hub-danger-hover: #c0392b;
    --hub-success: #28a745;
    --hub-warning: #fd7e14;
    --hub-bg-light: #f4f7fa;
    --hub-bg-card: #ffffff;
    --hub-text-primary: #1a1f36;
    --hub-text-secondary: #6c757d;
    --hub-border: #e9ecef;
    --radius-sm: 8px;
    --radius-lg: 12px;
}

.clover-hub-container {
    background-color: var(--hub-bg-light);
    color: var(--hub-text-primary);
    min-height: 100vh;
    padding: 0; /* Updated: Removed padding */
}

.hub-card {
    background-color: var(--hub-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hub-border);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.hub-card + .hub-card {
    margin-top: 1.5rem;
}
.hub-card h2,
.hub-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}
.hub-card h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--hub-text-primary);
}

/* --- Toast / Notification System --- */
#hub-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hub-toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.hub-toast.show {
    opacity: 1;
    transform: translateX(0);
}
.hub-toast.success {
    background-color: #d4edda;
    color: #155724;
}
.hub-toast.error {
    background-color: #f8d7da;
    color: #721c24;
}
.hub-toast.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* --- Empty State Component --- */
/* --- Empty State Component --- */
.hub-empty-state {
	text-align: center;
	padding: 4rem 2rem;
	border: 2px dashed var(--hub-border);
	border-radius: var(--radius-lg);
	background-color: var(--hub-bg-light);
	/* Add the following 4 lines */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.hub-empty-state i {
    width: 60px;
    height: 60px;
    color: var(--hub-text-secondary);
    margin-bottom: 1rem;
}
.hub-empty-state h3 {
    font-size: 1.5rem;
    color: var(--hub-text-primary);
    margin: 0 0 0.5rem 0;
}
.hub-empty-state p {
    color: var(--hub-text-secondary);
    margin: 0 0 1.5rem 0;
}

/* --- Tab Styles --- */
.hub-tab-link {
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    transform: translateY(1px);
    transition: all 0.2s ease;
}
.hub-tab-link:hover {
    color: var(--hub-text-primary);
}
.hub-tab-link.active {
    color: var(--hub-accent);
    border-bottom-color: var(--hub-accent);
    position: relative; /* FIX: Dropdown Menu Layering Issue */
    z-index: 5; /* FIX: Dropdown Menu Layering Issue */
}
.hub-tab-content {
    display: none;
}
.hub-tab-content.active {
    display: block;
}

/* --- Form & Button Styles --- */
.hub-form-group {
    margin-bottom: 1.25rem;
}
.hub-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.hub-form-group input[type="text"],
.hub-form-group input[type="url"],
.hub-form-group input[type="number"],
.hub-form-group textarea,
.hub-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    background-color: var(--hub-bg-light);
    font-size: 1rem;
    color: var(--hub-text-primary);
    transition: all 0.2s ease;
}
.hub-form-group input:focus,
.hub-form-group textarea:focus,
.hub-form-group select:focus {
    outline: none;
    border-color: var(--hub-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hub-accent) 15%, transparent);
}
.hub-form-group small {
    font-size: 0.8rem;
    color: var(--hub-text-secondary);
    margin-top: 0.25rem;
    display: block;
}
.hub-form-grid-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.hub-form-grid-third {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hub-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--hub-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.hub-btn:hover {
    background-color: var(--hub-accent-hover);
}
.hub-btn.hub-btn-secondary {
    background-color: transparent;
    border-color: var(--hub-border);
    color: var(--hub-text-primary);
}
.hub-btn.hub-btn-secondary:hover {
    background-color: var(--hub-border);
}
.hub-btn.hub-btn-danger {
    background-color: var(--hub-danger);
}
.hub-btn.hub-btn-danger:hover {
    background-color: var(--hub-danger-hover);
}
.hub-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- Dashboard Tab --- */
.hub-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.kpi-card {
    padding: 1.5rem;
    position: relative;
}
.kpi-card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--hub-accent);
    opacity: 0.1;
    font-size: 3rem;
}
.kpi-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
}
.kpi-card .kpi-value {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--hub-text-primary);
}
.kpi-trend {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.kpi-trend.positive {
    color: var(--hub-success);
}
.kpi-trend.negative {
    color: var(--hub-danger);
}

.hub-analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.chart-filters .hub-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}
.chart-filters .hub-btn.active {
    background-color: var(--hub-accent);
    color: #fff;
}

.hub-lists-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.hub-dynamic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hub-dynamic-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.hub-dynamic-list li + li {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
}
.hub-dynamic-list .list-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.hub-dynamic-list .list-item-info {
    flex-grow: 1;
}
.hub-dynamic-list .list-item-info a {
    text-decoration: none;
    color: inherit;
}
.hub-dynamic-list .list-item-info span {
    display: block;
    font-weight: 600;
}
.hub-dynamic-list .list-item-info small {
    color: var(--hub-text-secondary);
}
.hub-dynamic-list .list-item-actions {
    display: flex;
    gap: 0.5rem;
}
.hub-dynamic-list .list-item-metric {
    font-weight: 700;
    font-size: 1.25rem;
}

/* --- Orders Tab --- */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.orders-table th {
    text-align: left;
    padding: 0 1rem;
    font-size: 0.85rem;
    color: var(--hub-text-secondary);
    text-transform: uppercase;
}
.orders-table tbody tr {
    background: var(--hub-bg-card);
    transition: box-shadow 0.2s ease;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.orders-table tbody tr:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}
.orders-table td {
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--hub-border);
    border-bottom: 1px solid var(--hub-border);
}
.orders-table td:first-child {
    border-left: 1px solid var(--hub-border);
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}
.orders-table td:last-child {
    border-right: 1px solid var(--hub-border);
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}
.order-details-row {
    display: none;
}
.order-details-content {
    background: var(--hub-bg-light);
    padding: 1.5rem;
}
.order-details-content h4 {
    margin-top: 0;
}

.status-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}
.status-pill.processing {
    background-color: #eaf2ff;
    color: #0056b3;
}
.status-pill.shipped {
    background-color: #fff8e1;
    color: #856404;
}
.status-pill.delivered {
    background-color: #d4edda;
    color: #155724;
}

/* --- Product Tab & Drawer --- */
.product-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.dashboard-controls {
    display: flex;
    gap: 1rem;
}
.bulk-actions-container {
    padding: 1rem;
    background-color: color-mix(in srgb, var(--hub-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--hub-accent) 20%, transparent);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.product-card-item {
    background-color: var(--hub-bg-card);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}
.bulk-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 20px;
    height: 20px;
}
.product-card-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f0f2f5;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--hub-border);
}
.product-card-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-card-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.product-card-price {
    color: var(--hub-text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}
.product-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-card-stock {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    color: #fff;
}
.product-card-stock.in-stock {
    background-color: var(--hub-success);
}
.product-card-stock.low-stock {
    background-color: var(--hub-warning);
}
.product-card-stock.out-of-stock {
    background-color: var(--hub-danger);
}
.table-actions {
    display: flex;
    gap: 0.5rem;
}
.table-actions button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--hub-text-secondary);
}
.table-actions button:hover {
    color: var(--hub-accent);
}
.table-actions .delete-btn:hover {
    color: var(--hub-danger);
}

.hub-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background-color: var(--hub-bg-light);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 100001; /* <<< MODIFIED */
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}
.hub-drawer.is-open {
    right: 0;
}
.hub-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}
.hub-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
    background-color: var(--hub-bg-card);
}
.hub-drawer-header h2 {
    margin: 0;
}
.hub-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0 1rem;
    color: var(--hub-text-secondary);
}
.hub-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.hub-drawer-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background-color: var(--hub-bg-card);
    border-top: 1px solid var(--hub-border);
    display: flex;
    justify-content: flex-end;
}

.hub-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 31, 54, 0.6);
    backdrop-filter: blur(4px);
    z-index:  100000; /* <<< MODIFIED */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hub-drawer-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer Tabs */
.drawer-tabs {
    display: flex;
    background-color: var(--hub-bg-card);
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
}
.drawer-tab-link {
    padding: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    transition: all 0.2s ease;
}
.drawer-tab-link:hover {
    color: var(--hub-text-primary);
}
.drawer-tab-link.active {
    color: var(--hub-accent);
    border-bottom-color: var(--hub-accent);
}
.drawer-tab-content {
    display: none;
}
.drawer-tab-content.active {
    display: block;
}

/* --- Improved Form Elements (Drawer) --- */
.image-uploader-container {
    border: 2px dashed var(--hub-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.image-uploader-container:hover {
    border-color: var(--hub-accent);
}
.image-upload-placeholder {
    padding: 2rem;
}
.image-upload-placeholder i {
    width: 48px;
    height: 48px;
    color: #ccc;
}
.image-upload-placeholder span {
    display: block;
    margin-top: 1rem;
    color: var(--hub-text-secondary);
}
.image-preview {
    position: relative;
}
.image-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: var(--radius-sm);
}
.remove-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--hub-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
}

#variations-step-2-variants.disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}
#variations-step-2-variants.disabled::before {
    content: 'Please save the product with your chosen attributes to begin creating variations.';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    font-weight: 600;
    color: var(--hub-text-primary);
    z-index: 10;
    border-radius: var(--radius-lg);
}

/* --- Collections & Homepage Block Manager --- */
.blocks-manager-container {
    margin-top: 1.5rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    background-color: var(--hub-bg-card);
}
.block-manager-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}
.block-manager-item + .block-manager-item {
    border-top: 1px solid var(--hub-border);
}
.drag-handle {
    cursor: grab;
    color: var(--hub-text-secondary);
}
.block-preview {
    width: 40px;
    height: 40px;
    background-color: var(--hub-bg-light);
    border: 1px solid var(--hub-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.block-info {
    flex-grow: 1;
}
.block-info p {
    margin: 0;
    font-size: 1rem;
}
.block-type-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background-color: var(--hub-bg-light);
    color: var(--hub-text-secondary);
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}
.block-actions {
    display: flex;
    gap: 0.5rem;
}

.hub-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 31, 54, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* New properties for animation */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hub-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* --- END: NEW MODAL ANIMATION --- */

/* Use this new rule instead */
/*
================================================================
|| >> FIX: Modal Overflow and Layout
================================================================
*/
.hub-modal-content {
    background-color: var(--hub-bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh; 
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Animation Properties */
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hub-modal-overlay.active .hub-modal-content {
    opacity: 1;
    transform: scale(1);
}

/* Style for the modal's header (the H3 tag) */
.hub-modal-content h3 {
    margin: 0;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0; /* Prevents the header from shrinking */
}

/* Style for the modal's main content area */
.hub-modal-body {
    flex-grow: 1; /* Allows the body to fill available space */
    overflow-y: auto; /* IMPORTANT: Adds a scrollbar ONLY to this area if needed */
    padding: 1.5rem 2rem;
}

/* Style for the modal's footer (with the action buttons) */
.hub-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 1px solid var(--hub-border);
    background-color: var(--hub-bg-light);
    flex-shrink: 0; /* Prevents the footer from shrinking */
}

/* Tag Input Styles */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    background-color: var(--hub-bg-light);
}
.tag-pill {
    background-color: var(--hub-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.tag-remove-btn {
    cursor: pointer;
    font-weight: bold;
}
.tag-input-container input {
    border: none;
    background: transparent;
    padding: 0.25rem;
    flex-grow: 1;
    min-width: 150px;
}
.tag-input-container input:focus {
    outline: none;
    box-shadow: none;
}

/* Shop The Look Helper */
.shop-the-look-helper {
    position: relative;
}
.shop-the-look-helper img {
    max-width: 100%;
    cursor: crosshair;
}
.hotspot-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--hub-accent);
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* --- Collections Manager UI Overhaul --- */
.hub-filter-pills {
    display: inline-flex;
    background-color: var(--hub-bg-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--hub-border);
}

.hub-filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--hub-text-secondary);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hub-filter-btn.active {
    background-color: var(--hub-bg-card);
    color: var(--hub-text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.collection-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.collection-card-item {
    background-color: var(--hub-bg-card);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: grab;
}

.collection-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.collection-card-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.collection-card-thumbnail {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--hub-bg-light);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--hub-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hub-text-secondary);
}

.collection-card-info {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.collection-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.collection-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    text-transform: capitalize;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.archived {
    background-color: #e9ecef;
    color: #6c757d;
}

.collection-card-url {
    font-size: 0.85rem;
    color: var(--hub-text-secondary);
    margin-bottom: 1rem;
    word-break: break-all;
}

.collection-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-stats {
    font-size: 0.85rem;
    color: var(--hub-text-secondary);
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-dropdown {
    position: relative;
}

.action-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--hub-bg-card);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
    padding: 0.5rem 0;
    min-width: 160px;
}

.action-dropdown.active .action-dropdown-content {
    display: block;
}

.action-dropdown-btn {
 background: none;
 border: none;
 width: 100%;
padding: 0.5rem 1rem;
text-align: left;
cursor: pointer;
 font-size: 0.9rem;
 display: flex;
 align-items: center;
gap: 0.75rem;
    color: var(--hub-text-primary); /* <-- ADD THIS LINE */
}

.action-dropdown-btn:hover {
    background-color: var(--hub-bg-light);
}

.action-dropdown-btn.delete {
    color: var(--hub-danger);
}

/* --- Global Attribute Manager UI Overhaul --- */
.hub-attribute-manager-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 2fr;
    gap: 1.5rem;
    align-items: flex-start;
}

#terms-manager-empty-state {
    display: none; /* Hidden by default, shown by JS */
}

/* Updated List Container & List Item Styles */
.hub-list-container {
    margin-top: 1rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    max-height: 400px;
    overflow-y: auto;
}

.hub-list-container .hub-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--hub-border);
}

.hub-list-container .hub-list-item:last-child {
    border-bottom: none;
}

.hub-list-container .hub-list-item:hover {
    background-color: var(--hub-bg-light);
}

.hub-list-container .hub-list-item.active {
    background-color: color-mix(in srgb, var(--hub-accent) 10%, transparent);
    color: var(--hub-accent);
    font-weight: 600;
}

/* Delete button hover effect */
.hub-list-item .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hub-text-secondary);
    padding: 0.25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden; /* Hide by default */
    opacity: 0;
    transition: all 0.2s ease;
}

.hub-list-item:hover .delete-btn {
    visibility: visible; /* Show on hover */
    opacity: 1;
}

.hub-list-item .delete-btn:hover {
    background-color: #f8d7da;
    color: var(--hub-danger);
}



/* --- NEW: Vertical Sidebar Navigation Layout --- */
.hub-layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.hub-sidebar {
    width: 240px;
    background-color: var(--hub-bg-card);
    border-right: 1px solid var(--hub-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
}

.sidebar-logo-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hub-text-primary);
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    color: var(--hub-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-link:hover {
    color: var(--hub-text-primary);
    background-color: var(--hub-bg-light);
}

.sidebar-link.active {
    color: var(--hub-accent);
    background-color: color-mix(in srgb, var(--hub-accent) 8%, transparent);
    border-left-color: var(--hub-accent);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    height: 20px;
}

.sidebar-category-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.hub-main-content {
    flex-grow: 1;
    padding: 2rem;
    background-color: var(--hub-bg-light);
    position: relative; /* Add this line */
    
}
/*
================================================================
|| >> FIX: Divi Theme Horizontal Overflow on Admin Hub
|| This targets the main Divi page container to resolve
|| the persistent horizontal scrollbar.
================================================================
*/
body.page-template-template-admin-hub #page-container {
    max-width: 100vw;
    overflow-x: hidden !important;
}
/*
================================================================
|| >> FIX: Styles for Teleported Dropdown Menu
================================================================
*/
.action-dropdown-content {
  display: none; /* Hide by default */
  position: absolute;
  z-index: 10000; /* Ensure it's on top of everything */
}

.action-dropdown-content.is-open {
  display: block; /* Show when teleported and opened */
  position: fixed; /* Use fixed positioning when on the body */
}
/*
==============================================
--- STYLES FOR PRIMARY/SECONDARY BADGES ---
==============================================
*/

/* Style for the "Primary" badge */
.status-badge.primary {
    background-color: color-mix(in srgb, var(--hub-accent) 15%, transparent);
    color: var(--hub-accent-hover);
    border: 1px solid color-mix(in srgb, var(--hub-accent) 30%, transparent);
}

/* Style for the "Secondary" badge */
.status-badge.secondary {
    background-color: #d4edda;
    color: #155724;
}
/*
================================================================
|| >> MODERN & ANIMATED DROPDOWN MENU (FINAL)
================================================================
*/
.action-dropdown-content {
    display: none; /* Hidden by default */
    position: fixed; /* Always fixed for teleporting logic */
    z-index: 10000;
    width: 200px;
    padding: 0.5rem;
    background-color: var(--hub-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hub-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);

    /* Animation state */
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-dropdown-content.is-open {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.action-dropdown-btn {
    background: none;
    border: none;
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 0.75rem;

    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    color: var(--hub-text-primary);

    transition: background-color 0.2s ease, color 0.2s ease;
}

.action-dropdown-btn i {
    width: 18px;
    height: 18px;
    color: var(--hub-text-secondary);
    transition: color 0.2s ease;
}

.action-dropdown-btn:hover {
    background-color: var(--hub-bg-light);
    color: var(--hub-accent);
}

.action-dropdown-btn:hover i {
    color: var(--hub-accent);
}

.action-dropdown-btn.delete {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-border);
    color: var(--hub-danger);
}

.action-dropdown-btn.delete i {
    color: var(--hub-danger);
}

.action-dropdown-btn.delete:hover {
    background-color: color-mix(in srgb, var(--hub-danger) 10%, transparent);
    color: var(--hub-danger);
}

.action-dropdown-btn.delete:hover i {
    color: var(--hub-danger);
}
/* --- New Mega Menu Tab Styles --- */
.hub-grid-two-pane {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Controls on left, preview on right */
    gap: 1.5rem;
    align-items: flex-start;
}

.mega-menu-live-preview-container {
    background-color: #2D3748; /* Dark background to mimic the menu */
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid #4A5568;
    min-height: 400px;
}

.mega-menu-wrapper-preview {
    display: grid;
    grid-template-columns: 180px 1fr; /* Preview of nav and content panes */
    gap: 1rem;
}

.mega-menu-nav-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item-preview {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: #A0AEC0;
    font-weight: 500;
}
.nav-item-preview.active {
    background-color: #007bff;
    color: #fff;
    font-weight: 600;
}

.mega-menu-content-preview {
    background-color: #1A202C;
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 350px;
}
.empty-preview-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    align-self: center;
}

/* --- Preview Card Styles (mimicking front-end) --- */
.mega-menu-product-card-preview {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}
.mega-menu-product-card-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mega-menu-product-card-overlay-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
}
.product-card-name-preview {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-align: center;
}
/* Styling for the new category panel editor */
.category-panel-form-item {
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.category-panel-form-item h4 {
    margin-top: 0;
    border-bottom: 1px solid var(--hub-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
/* --- Hub Sub-Tab Navigation --- */
.hub-sub-tabs {
    display: flex;
    border-bottom: 1px solid var(--hub-border);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.hub-sub-tab-link {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    margin-bottom: -1px; /* Overlaps the main border */
    transition: all 0.2s ease;
}

.hub-sub-tab-link:hover {
    color: var(--hub-text-primary);
}

.hub-sub-tab-link.active {
    color: var(--hub-accent);
    border-bottom-color: var(--hub-accent);
}

.hub-sub-tab-content {
    display: none;
}

.hub-sub-tab-content.active {
    display: block;
}
/*
================================================================
||
||  Providential Clover: Admin Hub Styles
||  Version: 2.0 (UI/UX Enhancement Update)
||
================================================================
*/

/* --- Base Layout & Theming --- */
:root {
    --hub-accent: #007bff;
    --hub-accent-hover: #0056b3;
    --hub-danger: #e74c3c;
    --hub-danger-hover: #c0392b;
    --hub-success: #28a745;
    --hub-warning: #fd7e14;
    --hub-bg-light: #f4f7fa;
    --hub-bg-card: #ffffff;
    --hub-text-primary: #1a1f36;
    --hub-text-secondary: #6c757d;
    --hub-border: #e9ecef;
    --radius-sm: 8px;
    --radius-lg: 12px;
}

.clover-hub-container {
    background-color: var(--hub-bg-light);
    color: var(--hub-text-primary);
    min-height: 100vh;
    padding: 0; /* Updated: Removed padding */
}

.hub-card {
    background-color: var(--hub-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hub-border);
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.hub-card + .hub-card {
    margin-top: 1.5rem;
}
.hub-card h2,
.hub-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}
.hub-card h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--hub-text-primary);
}

/* --- Toast / Notification System --- */
#hub-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hub-toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.hub-toast.show {
    opacity: 1;
    transform: translateX(0);
}
.hub-toast.success {
    background-color: #d4edda;
    color: #155724;
}
.hub-toast.error {
    background-color: #f8d7da;
    color: #721c24;
}
.hub-toast.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* --- Empty State Component --- */
/* --- Empty State Component --- */
.hub-empty-state {
	text-align: center;
	padding: 4rem 2rem;
	border: 2px dashed var(--hub-border);
	border-radius: var(--radius-lg);
	background-color: var(--hub-bg-light);
	/* Add the following 4 lines */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.hub-empty-state i {
    width: 60px;
    height: 60px;
    color: var(--hub-text-secondary);
    margin-bottom: 1rem;
}
.hub-empty-state h3 {
    font-size: 1.5rem;
    color: var(--hub-text-primary);
    margin: 0 0 0.5rem 0;
}
.hub-empty-state p {
    color: var(--hub-text-secondary);
    margin: 0 0 1.5rem 0;
}

/* --- Tab Styles --- */
.hub-tab-link {
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    transform: translateY(1px);
    transition: all 0.2s ease;
}
.hub-tab-link:hover {
    color: var(--hub-text-primary);
}
.hub-tab-link.active {
    color: var(--hub-accent);
    border-bottom-color: var(--hub-accent);
    position: relative; /* FIX: Dropdown Menu Layering Issue */
    z-index: 5; /* FIX: Dropdown Menu Layering Issue */
}
.hub-tab-content {
    display: none;
}
.hub-tab-content.active {
    display: block;
}

/* --- Form & Button Styles --- */
.hub-form-group {
    margin-bottom: 1.25rem;
}
.hub-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.hub-form-group input[type="text"],
.hub-form-group input[type="url"],
.hub-form-group input[type="number"],
.hub-form-group textarea,
.hub-form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    background-color: var(--hub-bg-light);
    font-size: 1rem;
    color: var(--hub-text-primary);
    transition: all 0.2s ease;
}
.hub-form-group input:focus,
.hub-form-group textarea:focus,
.hub-form-group select:focus {
    outline: none;
    border-color: var(--hub-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hub-accent) 15%, transparent);
}
.hub-form-group small {
    font-size: 0.8rem;
    color: var(--hub-text-secondary);
    margin-top: 0.25rem;
    display: block;
}
.hub-form-grid-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.hub-form-grid-third {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.hub-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--hub-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.hub-btn:hover {
    background-color: var(--hub-accent-hover);
}
.hub-btn.hub-btn-secondary {
    background-color: transparent;
    border-color: var(--hub-border);
    color: var(--hub-text-primary);
}
.hub-btn.hub-btn-secondary:hover {
    background-color: var(--hub-border);
}
.hub-btn.hub-btn-danger {
    background-color: var(--hub-danger);
}
.hub-btn.hub-btn-danger:hover {
    background-color: var(--hub-danger-hover);
}
.hub-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* --- Dashboard Tab --- */
.hub-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.kpi-card {
    padding: 1.5rem;
    position: relative;
}
.kpi-card-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--hub-accent);
    opacity: 0.1;
    font-size: 3rem;
}
.kpi-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
}
.kpi-card .kpi-value {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--hub-text-primary);
}
.kpi-trend {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.kpi-trend.positive {
    color: var(--hub-success);
}
.kpi-trend.negative {
    color: var(--hub-danger);
}

.hub-analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.chart-filters .hub-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}
.chart-filters .hub-btn.active {
    background-color: var(--hub-accent);
    color: #fff;
}

.hub-lists-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.hub-dynamic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hub-dynamic-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.hub-dynamic-list li + li {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
}
.hub-dynamic-list .list-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.hub-dynamic-list .list-item-info {
    flex-grow: 1;
}
.hub-dynamic-list .list-item-info a {
    text-decoration: none;
    color: inherit;
}
.hub-dynamic-list .list-item-info span {
    display: block;
    font-weight: 600;
}
.hub-dynamic-list .list-item-info small {
    color: var(--hub-text-secondary);
}
.hub-dynamic-list .list-item-actions {
    display: flex;
    gap: 0.5rem;
}
.hub-dynamic-list .list-item-metric {
    font-weight: 700;
    font-size: 1.25rem;
}

/* --- Orders Tab --- */
.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.orders-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}
.orders-table th {
    text-align: left;
    padding: 0 1rem;
    font-size: 0.85rem;
    color: var(--hub-text-secondary);
    text-transform: uppercase;
}
.orders-table tbody tr {
    background: var(--hub-bg-card);
    transition: box-shadow 0.2s ease;
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.orders-table tbody tr:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
}
.orders-table td {
    padding: 1.25rem 1rem;
    border-top: 1px solid var(--hub-border);
    border-bottom: 1px solid var(--hub-border);
}
.orders-table td:first-child {
    border-left: 1px solid var(--hub-border);
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}
.orders-table td:last-child {
    border-right: 1px solid var(--hub-border);
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}
.order-details-row {
    display: none;
}
.order-details-content {
    background: var(--hub-bg-light);
    padding: 1.5rem;
}
.order-details-content h4 {
    margin-top: 0;
}

.status-pill {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}
.status-pill.processing {
    background-color: #eaf2ff;
    color: #0056b3;
}
.status-pill.shipped {
    background-color: #fff8e1;
    color: #856404;
}
.status-pill.delivered {
    background-color: #d4edda;
    color: #155724;
}

/* --- Product Tab & Drawer --- */
.product-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.dashboard-controls {
    display: flex;
    gap: 1rem;
}
.bulk-actions-container {
    padding: 1rem;
    background-color: color-mix(in srgb, var(--hub-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--hub-accent) 20%, transparent);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.product-card-item {
    background-color: var(--hub-bg-card);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}
.bulk-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 20px;
    height: 20px;
}
.product-card-thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f0f2f5;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--hub-border);
}
.product-card-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-card-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}
.product-card-price {
    color: var(--hub-text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}
.product-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-card-stock {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    color: #fff;
}
.product-card-stock.in-stock {
    background-color: var(--hub-success);
}
.product-card-stock.low-stock {
    background-color: var(--hub-warning);
}
.product-card-stock.out-of-stock {
    background-color: var(--hub-danger);
}
.table-actions {
    display: flex;
    gap: 0.5rem;
}
.table-actions button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--hub-text-secondary);
}
.table-actions button:hover {
    color: var(--hub-accent);
}
.table-actions .delete-btn:hover {
    color: var(--hub-danger);
}

.hub-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 600px;
    height: 100%;
    background-color: var(--hub-bg-light);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 100001; /* <<< MODIFIED */
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}
.hub-drawer.is-open {
    right: 0;
}
.hub-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}
.hub-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
    background-color: var(--hub-bg-card);
}
.hub-drawer-header h2 {
    margin: 0;
}
.hub-close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0 1rem;
    color: var(--hub-text-secondary);
}
.hub-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}
.hub-drawer-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    background-color: var(--hub-bg-card);
    border-top: 1px solid var(--hub-border);
    display: flex;
    justify-content: flex-end;
}

.hub-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 31, 54, 0.6);
    backdrop-filter: blur(4px);
    z-index:  100000; /* <<< MODIFIED */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hub-drawer-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer Tabs */
.drawer-tabs {
    display: flex;
    background-color: var(--hub-bg-card);
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
}
.drawer-tab-link {
    padding: 1rem;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    transition: all 0.2s ease;
}
.drawer-tab-link:hover {
    color: var(--hub-text-primary);
}
.drawer-tab-link.active {
    color: var(--hub-accent);
    border-bottom-color: var(--hub-accent);
}
.drawer-tab-content {
    display: none;
}
.drawer-tab-content.active {
    display: block;
}

/* --- Improved Form Elements (Drawer) --- */
.image-uploader-container {
    border: 2px dashed var(--hub-border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}
.image-uploader-container:hover {
    border-color: var(--hub-accent);
}
.image-upload-placeholder {
    padding: 2rem;
}
.image-upload-placeholder i {
    width: 48px;
    height: 48px;
    color: #ccc;
}
.image-upload-placeholder span {
    display: block;
    margin-top: 1rem;
    color: var(--hub-text-secondary);
}
.image-preview {
    position: relative;
}
.image-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: var(--radius-sm);
}
.remove-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--hub-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-weight: bold;
    cursor: pointer;
}

#variations-step-2-variants.disabled {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}
#variations-step-2-variants.disabled::before {
    content: 'Please save the product with your chosen attributes to begin creating variations.';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    font-weight: 600;
    color: var(--hub-text-primary);
    z-index: 10;
    border-radius: var(--radius-lg);
}

/* --- Collections & Homepage Block Manager --- */
.blocks-manager-container {
    margin-top: 1.5rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    background-color: var(--hub-bg-card);
}
.block-manager-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}
.block-manager-item + .block-manager-item {
    border-top: 1px solid var(--hub-border);
}
.drag-handle {
    cursor: grab;
    color: var(--hub-text-secondary);
}
.block-preview {
    width: 40px;
    height: 40px;
    background-color: var(--hub-bg-light);
    border: 1px solid var(--hub-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.block-info {
    flex-grow: 1;
}
.block-info p {
    margin: 0;
    font-size: 1rem;
}
.block-type-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background-color: var(--hub-bg-light);
    color: var(--hub-text-secondary);
    text-transform: capitalize;
    margin-bottom: 0.25rem;
}
.block-actions {
    display: flex;
    gap: 0.5rem;
}

.hub-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 31, 54, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;

    /* New properties for animation */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.hub-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* --- END: NEW MODAL ANIMATION --- */

/* Use this new rule instead */
/*
================================================================
|| >> FIX: Modal Overflow and Layout
================================================================
*/
.hub-modal-content {
    background-color: var(--hub-bg-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh; 
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Animation Properties */
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hub-modal-overlay.active .hub-modal-content {
    opacity: 1;
    transform: scale(1);
}

/* Style for the modal's header (the H3 tag) */
.hub-modal-content h3 {
    margin: 0;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0; /* Prevents the header from shrinking */
}

/* Style for the modal's main content area */
.hub-modal-body {
    flex-grow: 1; /* Allows the body to fill available space */
    overflow-y: auto; /* IMPORTANT: Adds a scrollbar ONLY to this area if needed */
    padding: 1.5rem 2rem;
}

/* Style for the modal's footer (with the action buttons) */
.hub-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1rem 2rem;
    border-top: 1px solid var(--hub-border);
    background-color: var(--hub-bg-light);
    flex-shrink: 0; /* Prevents the footer from shrinking */
}

/* Tag Input Styles */
.tag-input-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    background-color: var(--hub-bg-light);
}
.tag-pill {
    background-color: var(--hub-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.tag-remove-btn {
    cursor: pointer;
    font-weight: bold;
}
.tag-input-container input {
    border: none;
    background: transparent;
    padding: 0.25rem;
    flex-grow: 1;
    min-width: 150px;
}
.tag-input-container input:focus {
    outline: none;
    box-shadow: none;
}

/* Shop The Look Helper */
.shop-the-look-helper {
    position: relative;
}
.shop-the-look-helper img {
    max-width: 100%;
    cursor: crosshair;
}
.hotspot-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--hub-accent);
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

/* --- Collections Manager UI Overhaul --- */
.hub-filter-pills {
    display: inline-flex;
    background-color: var(--hub-bg-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--hub-border);
}

.hub-filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--hub-text-secondary);
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hub-filter-btn.active {
    background-color: var(--hub-bg-card);
    color: var(--hub-text-primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.collection-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.collection-card-item {
    background-color: var(--hub-bg-card);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: grab;
}

.collection-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.collection-card-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.collection-card-thumbnail {
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--hub-bg-light);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--hub-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hub-text-secondary);
}

.collection-card-info {
    padding: 1rem 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.collection-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.collection-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    text-transform: capitalize;
}

.status-badge.active {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.archived {
    background-color: #e9ecef;
    color: #6c757d;
}

.collection-card-url {
    font-size: 0.85rem;
    color: var(--hub-text-secondary);
    margin-bottom: 1rem;
    word-break: break-all;
}

.collection-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--hub-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-stats {
    font-size: 0.85rem;
    color: var(--hub-text-secondary);
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.action-dropdown {
    position: relative;
}

.action-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--hub-bg-card);
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 10;
    padding: 0.5rem 0;
    min-width: 160px;
}

.action-dropdown.active .action-dropdown-content {
    display: block;
}

.action-dropdown-btn {
 background: none;
 border: none;
 width: 100%;
padding: 0.5rem 1rem;
text-align: left;
cursor: pointer;
 font-size: 0.9rem;
 display: flex;
 align-items: center;
gap: 0.75rem;
    color: var(--hub-text-primary); /* <-- ADD THIS LINE */
}

.action-dropdown-btn:hover {
    background-color: var(--hub-bg-light);
}

.action-dropdown-btn.delete {
    color: var(--hub-danger);
}

/* --- Global Attribute Manager UI Overhaul --- */
.hub-attribute-manager-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 2fr;
    gap: 1.5rem;
    align-items: flex-start;
}

#terms-manager-empty-state {
    display: none; /* Hidden by default, shown by JS */
}

/* Updated List Container & List Item Styles */
.hub-list-container {
    margin-top: 1rem;
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-sm);
    max-height: 400px;
    overflow-y: auto;
}

.hub-list-container .hub-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--hub-border);
}

.hub-list-container .hub-list-item:last-child {
    border-bottom: none;
}

.hub-list-container .hub-list-item:hover {
    background-color: var(--hub-bg-light);
}

.hub-list-container .hub-list-item.active {
    background-color: color-mix(in srgb, var(--hub-accent) 10%, transparent);
    color: var(--hub-accent);
    font-weight: 600;
}

/* Delete button hover effect */
.hub-list-item .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--hub-text-secondary);
    padding: 0.25rem;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden; /* Hide by default */
    opacity: 0;
    transition: all 0.2s ease;
}

.hub-list-item:hover .delete-btn {
    visibility: visible; /* Show on hover */
    opacity: 1;
}

.hub-list-item .delete-btn:hover {
    background-color: #f8d7da;
    color: var(--hub-danger);
}



/* --- NEW: Vertical Sidebar Navigation Layout --- */
.hub-layout-wrapper {
    display: flex;
    min-height: 100vh;
}

.hub-sidebar {
    width: 240px;
    background-color: var(--hub-bg-card);
    border-right: 1px solid var(--hub-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--hub-border);
    flex-shrink: 0;
}

.sidebar-logo-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hub-text-primary);
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    color: var(--hub-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-link:hover {
    color: var(--hub-text-primary);
    background-color: var(--hub-bg-light);
}

.sidebar-link.active {
    color: var(--hub-accent);
    background-color: color-mix(in srgb, var(--hub-accent) 8%, transparent);
    border-left-color: var(--hub-accent);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    height: 20px;
}

.sidebar-category-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.hub-main-content {
    flex-grow: 1;
    padding: 2rem;
    background-color: var(--hub-bg-light);
    position: relative; /* Add this line */
    
}
/*
================================================================
|| >> FIX: Divi Theme Horizontal Overflow on Admin Hub
|| This targets the main Divi page container to resolve
|| the persistent horizontal scrollbar.
================================================================
*/
body.page-template-template-admin-hub #page-container {
    max-width: 100vw;
    overflow-x: hidden !important;
}
/*
================================================================
|| >> FIX: Styles for Teleported Dropdown Menu
================================================================
*/
.action-dropdown-content {
  display: none; /* Hide by default */
  position: absolute;
  z-index: 10000; /* Ensure it's on top of everything */
}

.action-dropdown-content.is-open {
  display: block; /* Show when teleported and opened */
  position: fixed; /* Use fixed positioning when on the body */
}
/*
==============================================
--- STYLES FOR PRIMARY/SECONDARY BADGES ---
==============================================
*/

/* Style for the "Primary" badge */
.status-badge.primary {
    background-color: color-mix(in srgb, var(--hub-accent) 15%, transparent);
    color: var(--hub-accent-hover);
    border: 1px solid color-mix(in srgb, var(--hub-accent) 30%, transparent);
}

/* Style for the "Secondary" badge */
.status-badge.secondary {
    background-color: #d4edda;
    color: #155724;
}
/*
================================================================
|| >> MODERN & ANIMATED DROPDOWN MENU (FINAL)
================================================================
*/
.action-dropdown-content {
    display: none; /* Hidden by default */
    position: fixed; /* Always fixed for teleporting logic */
    z-index: 10000;
    width: 200px;
    padding: 0.5rem;
    background-color: var(--hub-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--hub-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);

    /* Animation state */
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.action-dropdown-content.is-open {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.action-dropdown-btn {
    background: none;
    border: none;
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;

    display: flex;
    align-items: center;
    gap: 0.75rem;

    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    color: var(--hub-text-primary);

    transition: background-color 0.2s ease, color 0.2s ease;
}

.action-dropdown-btn i {
    width: 18px;
    height: 18px;
    color: var(--hub-text-secondary);
    transition: color 0.2s ease;
}

.action-dropdown-btn:hover {
    background-color: var(--hub-bg-light);
    color: var(--hub-accent);
}

.action-dropdown-btn:hover i {
    color: var(--hub-accent);
}

.action-dropdown-btn.delete {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hub-border);
    color: var(--hub-danger);
}

.action-dropdown-btn.delete i {
    color: var(--hub-danger);
}

.action-dropdown-btn.delete:hover {
    background-color: color-mix(in srgb, var(--hub-danger) 10%, transparent);
    color: var(--hub-danger);
}

.action-dropdown-btn.delete:hover i {
    color: var(--hub-danger);
}
/* --- New Mega Menu Tab Styles --- */
.hub-grid-two-pane {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Controls on left, preview on right */
    gap: 1.5rem;
    align-items: flex-start;
}

.mega-menu-live-preview-container {
    background-color: #2D3748; /* Dark background to mimic the menu */
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid #4A5568;
    min-height: 400px;
}

.mega-menu-wrapper-preview {
    display: grid;
    grid-template-columns: 180px 1fr; /* Preview of nav and content panes */
    gap: 1rem;
}

.mega-menu-nav-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item-preview {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    color: #A0AEC0;
    font-weight: 500;
}
.nav-item-preview.active {
    background-color: #007bff;
    color: #fff;
    font-weight: 600;
}

.mega-menu-content-preview {
    background-color: #1A202C;
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: 350px;
}
.empty-preview-text {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    align-self: center;
}

/* --- Preview Card Styles (mimicking front-end) --- */
.mega-menu-product-card-preview {
    display: block;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}
.mega-menu-product-card-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mega-menu-product-card-overlay-preview {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
}
.product-card-name-preview {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-align: center;
}
/* Styling for the new category panel editor */
.category-panel-form-item {
    border: 1px solid var(--hub-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}
.category-panel-form-item h4 {
    margin-top: 0;
    border-bottom: 1px solid var(--hub-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
/* --- Hub Sub-Tab Navigation --- */
.hub-sub-tabs {
    display: flex;
    border-bottom: 1px solid var(--hub-border);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

.hub-sub-tab-link {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--hub-text-secondary);
    margin-bottom: -1px; /* Overlaps the main border */
    transition: all 0.2s ease;
}

.hub-sub-tab-link:hover {
    color: var(--hub-text-primary);
}

.hub-sub-tab-link.active {
    color: var(--hub-accent);
    border-bottom-color: var(--hub-accent);
}

.hub-sub-tab-content {
    display: none;
}

.hub-sub-tab-content.active {
    display: block;
}
/*
================================================================
|| >> FIX: Header Dropdown Clipping on Admin Hub (July 2025)
|| This targets Divi's main wrapper ONLY on the admin hub page
|| and forces its overflow to be visible. This allows the
|| absolutely positioned mega menus from the header to display
|| correctly over the page content without being clipped.
================================================================
*/
body.page-template-template-admin-hub #page-container {
    overflow: visible !important;
}