/* css/products.css - Updated for Table Design */
.products-container {
    max-width: 100%;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.products-header h4 {
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.products-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Table Specific Styles */
.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    vertical-align: middle;
}

.products-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text);
    vertical-align: middle;
}

.products-table tr:last-child td {
    border-bottom: none;
}

.products-table tr:hover {
    background: var(--border-light);
}

/* Row Status */
.row-out-of-stock {
    background: rgba(239, 68, 68, 0.05);
}

.row-low-stock {
    background: rgba(245, 158, 11, 0.05);
}

.row-out-of-stock:hover,
.row-low-stock:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Product Image in Table */
.product-table-image {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-table-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.product-table-image:hover img {
    transform: scale(1.1);
}

/* Product Info in Table */
.product-info {
    min-width: 200px;
}

.product-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.product-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 300px;
}

/* Product Category */
.product-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--text);
    background: var(--border-light);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* Product Price */
.product-price-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.current-price {
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
}

.original-price {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Product Stock */
.product-stock-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stock-count {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
}

.stock-alert {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--warning);
}

.stock-alert i {
    font-size: 0.7rem;
}

/* Checkbox Styles */
.bulk-select-checkbox,
.product-select-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    appearance: none;
    background: var(--card-bg);
    transition: all 0.2s ease;
    position: relative;
}

.bulk-select-checkbox:checked,
.product-select-checkbox:checked {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.bulk-select-checkbox:checked::after,
.product-select-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.bulk-select-checkbox:indeterminate {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.bulk-select-checkbox:indeterminate::after {
    content: '—';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.bulk-select-checkbox:hover,
.product-select-checkbox:hover {
    border-color: var(--primary-500);
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bulk-selection-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text);
}

.bulk-selection-count {
    font-weight: 600;
    color: var(--primary-600);
}

.bulk-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Search and Filter */
.product-search-box {
    position: relative;
    min-width: 250px;
}

.product-search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Sort Select */
.sort-select {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.table-actions .btn-sm {
    padding: 0.375rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-actions .btn-sm i {
    font-size: 0.875rem;
}

/* Quick Edit Stock */
.quick-stock-edit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-edit-input {
    width: 80px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-align: center;
}

.stock-edit-input:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Export Button */
.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: var(--border-light);
    border-color: var(--text-muted);
}

/* Empty State */
.products-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.products-empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.products-empty-state h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.25rem;
}

.products-empty-state p {
    margin: 0 0 1.5rem 0;
    color: var(--text-muted);
    max-width: 400px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-table {
        min-width: 1000px;
    }
}

@media (max-width: 1024px) {
    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .products-filters {
        flex-wrap: wrap;
    }
    
    .product-search-box {
        min-width: 100%;
    }
    
    .sort-select, #status-filter {
        min-width: calc(50% - 0.5rem);
    }
    
    .bulk-actions-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .bulk-action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .products-header .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-actions .btn-sm {
        width: 100%;
        min-width: 2.5rem;
    }
}

@media (max-width: 640px) {
    .products-table th,
    .products-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .product-table-image {
        width: 40px;
        height: 40px;
    }
    
    .product-name {
        font-size: 0.875rem;
    }
    
    .product-description {
        display: none;
    }
}

/* Print Styles */
@media print {
    .products-filters,
    .products-header .btn,
    .bulk-actions-bar,
    .table-actions,
    .bulk-select-checkbox,
    .product-select-checkbox {
        display: none !important;
    }
    
    .products-table {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .products-table th,
    .products-table td {
        padding: 0.5rem !important;
        font-size: 12px !important;
    }
    
    .product-table-image {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ===== Improved Products Filter UI ===== */

.products-filter-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    padding: 1rem 1.25rem;
    background: linear-gradient(
        180deg,
        var(--card-bg),
        var(--card-bg)
    );
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

/* Filter Group */
.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

/* ===== Search Box ===== */
.search-box {
    position: relative;
    min-width: 260px;
    max-width: 340px;
    flex-shrink: 0;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text);
    transition: all 0.25s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ===== Select Inputs ===== */
.filter-select,
.sort-select {
    flex: 1;
    min-width: 150px;
    max-width: 220px;
    padding: 0.65rem 2.5rem 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    font-size: 0.875rem;
    background: var(--card-bg);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    transition: all 0.25s ease;
}

.filter-select:hover,
.sort-select:hover {
    border-color: var(--text-muted);
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

/* ===== Actions ===== */
.filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Secondary Filter Buttons */
.filter-btn,
.clear-filters-btn {
    padding: 0.6rem 1rem;
    border-radius: calc(var(--radius) + 2px);
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.filter-btn {
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
}

.filter-btn:hover {
    background: var(--border-light);
}

.filter-btn.active {
    background: var(--primary-600);
    color: #fff;
    border-color: var(--primary-600);
}

/* Add Product Button (Primary CTA) */
.add-product-btn {
    padding: 0.65rem 1.5rem;
    border-radius: calc(var(--radius) + 2px);
    background: linear-gradient(
        135deg,
        var(--primary-600),
        var(--primary-700)
    );
    color: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25);
    transition: all 0.25s ease;
}

.add-product-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.3);
}

/* ===== Filter Stats ===== */
.filter-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    background: var(--border-light);
    border-radius: 999px;
}

.filter-stats-count {
    font-weight: 600;
    color: var(--primary-600);
}

/* ===== Responsive Improvements ===== */
@media (max-width: 1200px) {
    .products-filter-area {
        flex-wrap: wrap;
    }

    .filter-group {
        width: 100%;
    }

    .search-box {
        max-width: 100%;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }

    .add-product-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ===== Dark Mode Polishing ===== */
@media (prefers-color-scheme: dark) {
    .products-filter-area {
        background: #0f172a;
        border-color: #1e293b;
        box-shadow: none;
    }

    .search-input,
    .filter-select,
    .sort-select,
    .filter-btn,
    .clear-filters-btn {
        background: #020617;
        border-color: #1e293b;
        color: #e5e7eb;
    }

    .add-product-btn {
        box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
    }
}


.products-filter-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Row 1: Filters */
.products-filter-area .filter-group {
    display: grid;
    grid-template-columns:
        minmax(260px, 2fr)  /* Search */
        repeat(3, minmax(160px, 1fr)); /* Status, Category, Sort */
    gap: 0.75rem;
    align-items: end;
}

/* Ensure inputs stretch nicely */
.filter-container,
.search-box {
    width: 100%;
}

/* Row 2: Actions */
.products-filter-area .filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
}

/* Button alignment */
.filter-actions button {
    height: 38px;
}

@media (max-width: 1024px) {
    .products-filter-area .filter-group {
        grid-template-columns: 1fr 1fr;
        row-gap: 0.75rem;
    }
}
@media (max-width: 640px) {
    .products-filter-area .filter-group {
        grid-template-columns: 1fr;
    }

    .products-filter-area .filter-actions {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .filter-actions button {
        flex: 1;
        justify-content: center;
    }
}

.filter-actions {
    background: linear-gradient(
        to right,
        transparent,
        var(--border-light)
    );
    border-radius: var(--radius);
    padding: 0.75rem;
}

/* ===== PRODUCT REVIEW PAGE STYLES ===== */

/* Review Products Container */
.review-products-container {
    padding: 1rem 0;
}

/* Review Products Table */
.review-products-table {
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.review-products-table th {
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--primary-200);
}

.review-products-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

.review-products-table tr:last-child td {
    border-bottom: none;
}

/* Price Inputs in Review Table */
.selling-price-input,
.discount-input,
.quantity-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
}

.selling-price-input:focus,
.discount-input:focus,
.quantity-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.discount-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.discount-percent {
    position: absolute;
    right: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.discount-input {
    padding-right: 2rem;
}

/* Final Price Display */
.final-price-display {
    font-weight: 700;
    color: var(--success);
    font-size: 1rem;
}

.master-price {
    font-weight: 600;
    color: var(--text);
    font-size: 0.875rem;
}

/* Bulk Discount Section */
.bulk-discount-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius);
}

.bulk-discount-card {
    max-width: 500px;
    margin: 0 auto;
}

.bulk-discount-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bulk-discount-header i {
    font-size: 1.5rem;
}

.bulk-discount-header h5 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-700);
}

.bulk-discount-body {
    padding: 1rem 0;
}

.bulk-discount-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.bulk-discount-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.input-suffix {
    padding: 0 1rem;
    color: var(--text-muted);
}

.bulk-discount-btn {
    padding: 0.75rem 1.5rem;
}

.bulk-discount-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

/* Order Summary Card */
.order-summary-card {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.order-summary-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.order-summary-header h5 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text);
}

.order-summary-body {
    padding: 0.5rem 0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.order-summary-row:not(:last-child) {
    border-bottom: 1px solid var(--border-light);
}

.discount-row {
    color: var(--error);
}

.grand-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.grand-total-amount {
    color: var(--primary-600);
    font-size: 1.25rem;
}

.order-summary-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

/* Review Actions */
.review-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

/* ===== MASTER PRODUCTS PAGE STYLES ===== */

/* Master Products Grid */
.master-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Master Product Card */
.master-product-card {
    position: relative;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    cursor: pointer;
}

.master-product-card:hover {
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.master-product-card.selected {
    border-color: var(--primary-600);
    background: var(--primary-50);
}

.master-product-checkbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.master-product-checkbox input {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.master-product-image {
    width: 100%;
    height: 150px;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.master-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.master-product-info {
    text-align: center;
}

.master-product-name {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.master-product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    padding: 0.25rem 0.75rem;
    background: var(--border-light);
    border-radius: 999px;
    display: inline-block;
}

.master-product-price {
    margin: 0.5rem 0;
    font-weight: 700;
    color: var(--primary-600);
    font-size: 0.875rem;
}

.master-product-sku {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Master Products Actions */
.master-products-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
}

/* ===== ADD PRODUCT PAGE STYLES ===== */

/* Form Section Title */
.form-section-title {
    display: flex;
    align-items: center;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
}

.form-section-title i {
    color: var(--primary-600);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

/* Image Upload */
.image-upload-container {
    margin-top: 0.5rem;
}

.image-upload-area {
    padding: 2rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-area:hover {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.image-upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.image-upload-text {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.image-upload-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.image-preview {
    margin-top: 1rem;
}

.image-preview-item {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.image-preview-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.remove-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== DROPDOWN MENU FOR ADD PRODUCT ===== */

.add-product-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu a i {
    width: 20px;
    color: var(--text-muted);
}

/* Show dropdown on hover */
.add-product-dropdown:hover .dropdown-menu,
.add-product-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keep dropdown visible when hovering over it */
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--border);
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: -7px;
    right: 21px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--card-bg);
}

/* Dropdown links */
.dropdown-menu a {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--primary-50);
    color: var(--primary-700);
    padding-left: 1.25rem;
}

/* ===== REVIEW PRODUCTS BUTTON ===== */

.review-products-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, var(--warning), var(--warning-dark));
    color: white;
    border: none;
    border-radius: calc(var(--radius) + 2px);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.review-products-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .master-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .review-products-table th,
    .review-products-table td {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .selling-price-input,
    .discount-input,
    .quantity-input {
        padding: 0.375rem;
        font-size: 0.75rem;
    }
    
    .bulk-discount-input-group {
        flex-direction: column;
    }
    
    .review-actions,
    .form-actions,
    .master-products-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .review-actions button,
    .form-actions button,
    .master-products-actions button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .master-products-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary-card {
        padding: 1rem;
    }
}

/* ===== ANIMATIONS ===== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-products-container,
.master-products-grid,
.form-section-title {
    animation: fadeIn 0.3s ease-out;
}

/* ===== PRINT STYLES ===== */

@media print {
    .review-actions,
    .form-actions,
    .master-products-actions,
    .bulk-discount-section,
    .add-product-dropdown,
    .review-products-btn {
        display: none !important;
    }
    
    .review-products-table,
    .master-product-card {
        break-inside: avoid;
    }
}


/* Master product pricing in grid */
.master-product-pricing {
    margin: 0.5rem 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.25rem 0;
    font-size: 0.75rem;
}

.price-label {
    color: var(--text-muted);
}

.mrp-price {
    text-decoration: line-through;
    color: var(--text-muted);
}

.master-price {
    font-weight: 700;
    color: var(--primary-600);
}

.master-product-unit {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
}

/* Price info in review table */
.price-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Update review page CSS for better layout */
.review-products-table th:nth-child(5) {
    width: 120px;
}

.review-products-table th:nth-child(6),
.review-products-table th:nth-child(7),
.review-products-table th:nth-child(8) {
    width: 100px;
}

/* Ensure inputs fit in table */
.selling-price-input,
.discount-input,
.quantity-input {
    min-width: 80px;
}

/* ===== BARCODE SCANNER STYLES ===== */

.barcode-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.barcode-input-container .form-control {
    flex: 1;
}

.barcode-scan-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
}

.barcode-scan-btn i {
    font-size: 1rem;
}

/* Barcode Scanner Modal */
#barcode-scanner-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.barcode-scanner-content {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.barcode-scanner-content .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.barcode-scanner-content .modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.barcode-scanner-content .modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.barcode-scanner-content .modal-close:hover {
    color: var(--danger);
}

.barcode-scanner-content .modal-body {
    padding: 1.25rem;
}

.scanner-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
}

.scanner-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scanner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scanner-frame {
    width: 70%;
    height: 50%;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: 
        0 0 0 9999px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(79, 70, 229, 0.3);
    animation: scanPulse 2s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% {
        border-color: var(--primary);
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.5),
            inset 0 0 20px rgba(79, 70, 229, 0.3);
    }
    50% {
        border-color: var(--success);
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.5),
            inset 0 0 30px rgba(16, 185, 129, 0.4);
    }
}

.manual-entry {
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* Form section title with margin */
.form-section-title.mt-4 {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* ===== CLICK TO SCAN BARCODE AREA ===== */

.scan-barcode-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--secondary-50) 100%);
    border: 2px dashed var(--primary-500);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.scan-barcode-area:hover {
    background: linear-gradient(135deg, var(--primary-100) 0%, var(--secondary-50) 100%);
    border-color: var(--primary-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.scan-barcode-area:active {
    transform: translateY(0);
}

.scan-barcode-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-500);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.scan-barcode-icon i {
    font-size: 1.25rem;
    color: white;
}

.scan-barcode-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.scan-title {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.scan-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.scan-arrow {
    color: var(--primary-500);
    font-size: 1rem;
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.form-divider span {
    padding: 0 1rem;
}

/* Barcode Fields Grid */
.barcode-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Optional Tag */
.optional-tag {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Scanned Barcode Display */

/* ===== MOBILE/TABLET RESPONSIVE - CARD LAYOUT ===== */

/* Product Card Container for Mobile */
.products-card-view {
    display: none;
}

@media (max-width: 1024px) {
    .products-container {
        padding: 0 1rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        padding: 1rem;
        margin: 0 -1rem 1rem -1rem;
        border-radius: 0;
    }
    
    .products-filters {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .products-filters .filter-select,
    .products-filters .search-box {
        width: 100%;
    }
    
    .add-product-section {
        padding: 1rem;
        margin: 0 -1rem;
    }
    
    .add-product-form {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    /* Hide table, show cards */
    .products-table-container,
    .products-table {
        display: none !important;
    }
    
    .products-card-view {
        display: block;
    }
    
    .products-container {
        padding: 0 0.75rem;
    }
    
    .products-header {
        padding: 1rem;
        margin: 0 -0.75rem 1rem -0.75rem;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border);
    }
    
    .products-header h4 {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }
    
    .products-header .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }
    
    /* Product Cards Grid */
    .product-cards-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* Individual Product Card */
    .product-card {
        background: var(--card-bg);
        border-radius: var(--radius-md);
        border: 1px solid var(--border);
        padding: 1rem;
        display: flex;
        gap: 1rem;
        transition: box-shadow 0.2s ease;
    }
    
    .product-card:active {
        box-shadow: var(--shadow-md);
    }
    
    .product-card-image {
        width: 72px;
        height: 72px;
        border-radius: var(--radius);
        overflow: hidden;
        border: 1px solid var(--border-light);
        flex-shrink: 0;
        background: var(--bg);
    }
    
    .product-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .product-card-image-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg);
        color: var(--text-muted);
        font-size: 1.5rem;
    }
    
    .product-card-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .product-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .product-card-name {
        font-size: 0.9375rem;
        font-weight: 600;
        color: var(--text);
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-card-category {
        font-size: 0.75rem;
        color: var(--text-muted);
        background: var(--bg);
        padding: 0.25rem 0.5rem;
        border-radius: var(--radius-sm);
        white-space: nowrap;
    }
    
    .product-card-details {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .product-card-detail {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .product-card-label {
        font-size: 0.6875rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    
    .product-card-value {
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--text);
    }
    
    .product-card-value.price {
        color: var(--primary-600);
    }
    
    .product-card-value.in-stock {
        color: var(--success);
    }
    
    .product-card-value.low-stock {
        color: var(--warning);
    }
    
    .product-card-value.out-of-stock {
        color: var(--error);
    }
    
    .product-card-footer {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.25rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-light);
    }
    
    .product-card-action {
        flex: 1;
        padding: 0.625rem 0.75rem;
        border-radius: var(--radius);
        font-size: 0.8125rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.375rem;
        cursor: pointer;
        transition: all 0.2s ease;
        border: 1px solid var(--border);
        background: var(--card-bg);
        color: var(--text);
    }
    
    .product-card-action:hover {
        background: var(--bg);
    }
    
    .product-card-action.primary {
        background: var(--primary-600);
        color: white;
        border-color: var(--primary-600);
    }
    
    .product-card-action.primary:hover {
        background: var(--primary-700);
    }
    
    .product-card-action.danger {
        color: var(--error);
        border-color: var(--error);
    }
    
    .product-card-action.danger:hover {
        background: #fef2f2;
    }
    
    /* Status Badge on Card */
    .product-card-status {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-radius: var(--radius-sm);
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .product-card-status.active {
        background: #d1fae5;
        color: #065f46;
    }
    
    .product-card-status.inactive {
        background: #fee2e2;
        color: #991b1b;
    }
    
    /* Form improvements */
    .form-grid,
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .barcode-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        margin-bottom: 0;
    }
    
    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control {
        padding: 0.875rem;
        font-size: 1rem;
        border-radius: var(--radius);
    }
    
    /* Modal adjustments */
    .modal-content {
        margin: 0;
        max-height: 100vh;
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }
    
    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: var(--card-bg);
        z-index: 10;
        border-bottom: 1px solid var(--border);
    }
    
    .modal-body {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        position: sticky;
        bottom: 0;
        background: var(--card-bg);
        border-top: 1px solid var(--border);
    }
    
    .modal-footer .btn {
        width: 100%;
        padding: 0.875rem;
    }
    
    /* Pagination */
    .pagination {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        background: var(--card-bg);
        border-radius: var(--radius);
        margin: 0 -0.75rem;
    }
    
    .pagination-info {
        text-align: center;
        font-size: 0.875rem;
    }
    
    .pagination-controls {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .pagination-controls .btn {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .products-container {
        padding: 0 0.5rem;
    }
    
    .products-header {
        margin: 0 -0.5rem 0.75rem -0.5rem;
        padding: 0.875rem;
    }
    
    .product-card {
        padding: 0.875rem;
    }
    
    .product-card-image {
        width: 64px;
        height: 64px;
    }
    
    .product-card-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card-footer {
        flex-wrap: wrap;
    }
    
    .product-card-action {
        min-width: calc(50% - 0.25rem);
    }
    
    .scan-barcode-area {
        padding: 1rem;
    }
    
    .scan-barcode-area i {
        font-size: 1.25rem;
    }
}
        font-size: 1.25rem;
    }
}
.scanned-barcode-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--success);
    background: linear-gradient(135deg, #10b98120 0%, #10b98110 100%);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.scanned-barcode-display.hidden {
    display: none;
}

.scanned-barcode-display i {
    color: var(--success);
    font-size: 1.25rem;
}

.scanned-barcode-display span {
    flex: 1;
    font-weight: 600;
    color: var(--text);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.btn-clear-barcode {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.btn-clear-barcode:hover {
    color: var(--error);
}

/* ===== MOBILE RESPONSIVE - ADD PRODUCT FORM ===== */

@media (max-width: 768px) {
    /* Single column layout on mobile */
    .grid.grid-cols-1.md\\:grid-cols-2,
    .md\\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    /* Barcode fields stack on mobile */
    .barcode-fields-grid {
        grid-template-columns: 1fr;
    }
    
    /* Scan area adjustments */
    .scan-barcode-area {
        padding: 0.875rem 1rem;
    }
    
    .scan-barcode-icon {
        width: 40px;
        height: 40px;
    }
    
    .scan-title {
        font-size: 0.875rem;
    }
    
    .scan-subtitle {
        font-size: 0.75rem;
    }
    
    /* Form actions full width */
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Modal full screen on mobile */
    .barcode-scanner-content {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .scanner-container {
        aspect-ratio: auto;
        height: 50vh;
    }
    
    /* Page header stack */
    .page-header .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header .btn {
        width: 100%;
    }
    
    /* Card padding reduction */
    .card .p-6 {
        padding: 1rem !important;
    }
    
    /* Form section title */
    .form-section-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .scan-barcode-area {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .scan-barcode-icon {
        width: 36px;
        height: 36px;
    }
    
    .scan-barcode-icon i {
        font-size: 1rem;
    }
    
    .scan-arrow {
        display: none;
    }
    
    /* Image upload area */
    .image-upload-area {
        padding: 1rem;
    }
    
    .image-upload-icon i {
        font-size: 1.5rem;
    }
    
    .image-upload-text {
        font-size: 0.8125rem;
    }
    
    .image-upload-hint {
        font-size: 0.6875rem;
    }
}

/* ===== DROPDOWN MENU MOBILE FIX ===== */

@media (max-width: 768px) {
    .add-product-dropdown {
        position: static;
    }
    
    .add-product-dropdown .dropdown-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 60vh;
        overflow-y: auto;
        transform: translateY(100%);
        opacity: 0;
        visibility: hidden;
    }
    
    .add-product-dropdown .dropdown-menu.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .add-product-dropdown .dropdown-menu::before,
    .add-product-dropdown .dropdown-menu::after {
        display: none;
    }
    
    .add-product-dropdown .dropdown-menu a {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Mobile overlay for dropdown */
    .dropdown-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .dropdown-overlay.show {
        display: block;
    }
}

/* ===== COMMISSION INFO BOX STYLES ===== */

.commission-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.commission-info-box .form-section-title {
    color: #0369a1;
    margin-bottom: 1rem;
}

.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
}

.info-card-commission {
    border-left: 4px solid #22c55e;
}

.info-card-gateway {
    border-left: 4px solid #f97316;
}

.info-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.info-card-commission .info-card-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.info-card-gateway .info-card-icon {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #ea580c;
}

.info-card-icon i {
    font-size: 1.25rem;
}

.info-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.info-card-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.info-card-desc {
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.4;
}

.info-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text);
    border: 1px dashed #94a3b8;
}

.info-note i {
    color: #eab308;
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .commission-info-box {
        padding: 1rem;
    }
    
    .info-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-card-icon {
        width: 40px;
        height: 40px;
    }
    
    .info-card-value {
        font-size: 1rem;
    }
}

/* ===== PRODUCTS LIST TABLE MOBILE ===== */

@media (max-width: 768px) {
    .products-filter-area {
        flex-direction: column;
        width: 100%;
    }
    
    .products-filter-area .filter-group {
        flex-direction: column;
        width: 100%;
    }
    
    .products-filter-area .search-box,
    .products-filter-area .filter-container,
    .products-filter-area .filter-select,
    .products-filter-area .sort-select {
        width: 100%;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .filter-actions .btn,
    .filter-actions .add-product-dropdown {
        width: 100%;
    }
    
    .add-product-btn {
        width: 100%;
        justify-content: center;
    }
}