/* Product Catalog Styles */

/* Product Grid Layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-title {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.product-code {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
}

.product-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.status-toggle.active {
    background: #10b981;
}

.status-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.status-toggle.active::after {
    transform: translateX(20px);
}

/* Frontend Visibility Indicator */
.frontend-visibility-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: help;
    transition: all 0.2s;
}

.frontend-visibility-indicator.visible {
    background: #dbeafe;
    color: #1d4ed8;
}

.frontend-visibility-indicator.hidden {
    background: #fee2e2;
    color: #dc2626;
}

.product-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: #1f2937;
}

.pricing-tiers-preview .detail-value {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tier-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 12px;
}

.tier-name {
    font-weight: 500;
    color: #374151;
}

.tier-price {
    font-weight: 600;
    color: #059669;
}

.price-value {
    color: #059669;
    font-size: 1.125rem;
}

.stock-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-unlimited .stock-indicator { background: #6366f1; }
.stock-high .stock-indicator { background: #10b981; }
.stock-medium .stock-indicator { background: #f59e0b; }
.stock-low .stock-indicator { background: #ef4444; }

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.primary-actions {
    display: flex;
    gap: 8px;
    flex: 1;
}

.btn-edit-product,
.btn-pricing {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-edit-product {
    background: #6366f1;
    color: white;
}

.btn-edit-product:hover {
    background: #4f46e5;
}

.btn-pricing {
    background: #16a34a;
    color: white;
}

.btn-pricing:hover {
    background: #15803d;
}

.btn-duplicate-product {
    width: 32px;
    height: 32px;
    padding: 8px;
    border: none;
    background: #6366f1;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-duplicate-product:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.btn-delete-product {
    width: 32px;
    height: 32px;
    padding: 8px;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-product:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-delete-product-disabled {
    width: 32px;
    height: 32px;
    padding: 8px;
    border: none;
    background: #9ca3af;
    color: #d1d5db;
    border-radius: 4px;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

/* Delete Confirmation Modal */
.delete-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.delete-modal.active {
    display: block;
}

.delete-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
}

.delete-modal-header {
    position: relative;
    margin-bottom: 20px;
}

.delete-modal-header h3 {
    margin: 0 0 15px 0;
    color: #111827;
    font-size: 1.5rem;
    font-weight: 600;
}

.delete-modal-header .modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.delete-modal-header .modal-close:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: scale(1.05);
}

.delete-modal-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.delete-modal-icon svg {
    width: 32px;
    height: 32px;
    color: #dc2626;
}



.delete-modal p {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.confirmation-section {
    margin: 20px 0;
    text-align: left;
}

.confirmation-section .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.confirmation-section .delete-confirm-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: border-color 0.2s ease;
    margin-bottom: 8px;
}

.confirmation-section .delete-confirm-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.confirmation-section .form-help {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.delete-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-confirm-delete {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-confirm-delete:hover {
    background: #b91c1c;
}

.btn-cancel-delete {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-delete:hover {
    background: #e5e7eb;
}

.delete-confirmation-input {
    margin: 20px 0;
    text-align: left;
}

.delete-confirmation-input label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.delete-confirmation-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: border-color 0.2s ease;
}

.delete-confirmation-input input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.delete-confirmation-input input.valid {
    border-color: #16a34a;
    background-color: #f0fdf4;
}

.delete-input-help {
    font-size: 12px;
    color: #6b7280;
    margin: 6px 0 0 0;
    font-style: italic;
}

.delete-confirm-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    margin: 6px 0 0 0;
    font-style: italic;
}

.btn-confirm-delete:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-confirm-delete:disabled:hover {
    background: #9ca3af;
}

/* Category Header Styles - Enhanced */
.category-header {
    margin-bottom: 1.5rem;
}

.btn-manage-categories {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: 2px solid transparent;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
}

.btn-manage-categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-manage-categories:hover {
    background: linear-gradient(135deg, #5855eb 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-manage-categories:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Responsive adjustments for category header */
@media (max-width: 768px) {
    .category-header {
        margin-bottom: 1.5rem;
    }
    
    .category-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-manage-categories {
        padding: 0.875rem 1.25rem;
        font-size: 0.8125rem;
        border-radius: 10px;
        margin-left: 0.75rem;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-manage-categories {
        margin-left: 0;
        margin-top: 0.75rem;
        align-self: stretch;
        justify-content: center;
    }
}

/* Category Management Modal Styles */
.category-modal,
.category-form-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.category-modal.active,
.category-form-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-modal-content,
.category-form-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.category-modal-header,
.category-form-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-modal-body,
.category-form-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.category-actions {
    margin-bottom: 1.5rem;
}

.btn-create {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-create:hover {
    background: #059669;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.2s;
}

.category-item.inactive {
    background: #fef2f2;
    border-color: #fecaca;
}

.category-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-info h4 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-weight: 600;
}

.category-info p {
    margin: 0 0 0.5rem 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.category-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.8rem;
}

.product-count {
    background: #e0f2fe;
    color: #0277bd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.display-order {
    color: #6b7280;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

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

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

.category-item .category-actions {
    display: flex;
    gap: 0.5rem;
    margin: 0;
}

.btn-edit,
.btn-delete-small {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-delete-small {
    background: #ef4444;
    color: white;
}

.btn-delete-small:hover {
    background: #dc2626;
}

.btn-delete-small.disabled {
    background: #9ca3af;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-delete-small.disabled:hover {
    background: #9ca3af;
    cursor: not-allowed;
}

.category-form-footer {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Pricing Modal */
.pricing-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.pricing-modal.active {
    display: block;
}

.pricing-modal-content {
    background-color: white;
    margin: 1% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.pricing-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.pricing-modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.4em;
}

.close-pricing {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-pricing:hover {
    color: #000;
}

.pricing-modal-body {
    padding: 0;
    margin-bottom: 15px;
}

.pricing-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 15px 0 0 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 20px;
}

.pricing-tiers-section {
    margin-top: 15px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.section-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.btn-add-tier {
    background: #16a34a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-tier:hover {
    background: #15803d;
}

.pricing-tiers-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Removed old pricing-tier styles - using new card-based design */

/* Old tier styles removed - using new card-based design */

/* Old date picker styles removed - using new card-based design */

/* Removed remaining old tier input styles */

/* Removed old tier price and action styles - using new card-based design */

.product-display {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
}

.form-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Category Tabs - Modern Redesign */
.category-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
    flex: 1;
}

.category-tabs::-webkit-scrollbar {
    height: 6px;
}

.category-tabs::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.category-tab {
    position: relative;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid transparent;
    border-radius: 12px;
    color: #64748b;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-width: fit-content;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.category-tab:hover {
    color: #1e40af;
    border-color: #dbeafe;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.category-tab.active {
    color: white;
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    position: relative;
}

.category-tab.active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8, #3b82f6);
    border-radius: 14px;
    z-index: -2;
    opacity: 0.3;
    filter: blur(8px);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.3;
        filter: blur(8px);
    }
    to {
        opacity: 0.5;
        filter: blur(12px);
    }
}

.category-tab.active::before {
    opacity: 1;
}

.category-tab:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Enhanced tab interactions */
.category-tab:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Tab count indicator */
.category-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: currentColor;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    min-width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.category-tab:not(.active) .category-tab-count {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

/* Smooth tab switching animation */
.category-tabs {
    transition: all 0.3s ease;
}

/* Loading state for tabs */
.category-tab.loading {
    opacity: 0.7;
    pointer-events: none;
}

.category-tab.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Category tab icons */
.category-tab-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.category-tab.active .category-tab-icon {
    opacity: 1;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .category-tabs {
        gap: 0.5rem;
        padding: 0.375rem;
        margin-bottom: 0;
        border-radius: 12px;
    }
    
    .category-tab {
        padding: 0.875rem 1.25rem;
        font-size: 0.8125rem;
        border-radius: 10px;
        min-width: auto;
    }
    
    .category-tab-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        gap: 0.375rem;
        padding: 0.25rem;
        border-radius: 10px;
        margin-bottom: 0;
    }
    
    .category-tab {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
        border-radius: 8px;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .category-tab-icon {
        width: 12px;
        height: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .category-tab {
        border-width: 3px;
    }
    
    .category-tab.active {
        border-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .category-tab,
    .category-tab::before,
    .category-tab::after,
    .category-tab.active::after {
        transition: none;
        animation: none;
    }
    
    .category-tab:hover,
    .category-tab.active {
        transform: none;
    }
}

/* Add Product Button */
.add-product-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s;
    z-index: 100;
}

.add-product-btn:hover {
    background: #2563eb;
    transform: scale(1.1);
}

/* Product Form Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.product-modal.active {
    display: flex;
}

.product-modal-content {
    background: white;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
}

.product-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-modal-title {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
}

.product-modal-body {
    padding: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

/* Date input specific styling */
.form-input[type="datetime-local"] {
    font-family: inherit;
    color: #374151;
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.product-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-save {
    background: #059669;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #047857;
}

.btn-cancel {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: #4b5563;
}

/* HTML Editor Styles */
.editor-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px 6px 0 0;
    border-bottom: none;
}

.editor-btn {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.editor-btn:active {
    background: #e5e7eb;
}

.form-editor {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 6px 6px;
    background: white;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    outline: none;
}

.form-editor:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-editor:empty:before {
    content: attr(placeholder);
    color: #9ca3af;
    font-style: italic;
}

.form-editor ul, .form-editor ol {
    margin: 8px 0;
    padding-left: 20px;
}

.form-editor li {
    margin: 4px 0;
}

.form-editor a {
    color: #6366f1;
    text-decoration: underline;
}

.form-editor strong, .form-editor b {
    font-weight: 600;
}

.form-editor em, .form-editor i {
    font-style: italic;
}

.form-editor u {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .product-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .add-product-btn {
        bottom: 1rem;
        right: 1rem;
    }
    
    .editor-toolbar {
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .editor-btn {
        min-width: 28px;
        height: 28px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

/* New Pricing Modal Styles */
.new-pricing-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.new-pricing-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-pricing-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.new-pricing-modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.new-pricing-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.new-pricing-modal-title h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.new-pricing-modal-subtitle {
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
    font-size: 0.875rem;
}

.new-pricing-modal-close {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}

.new-pricing-modal-close:hover {
    background: white;
    color: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.new-pricing-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

.new-pricing-section {
    margin-bottom: 2rem;
}

.new-pricing-section:last-child {
    margin-bottom: 0;
}

.new-pricing-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}

.new-pricing-section-header i {
    color: #667eea;
    font-size: 1.25rem;
}

.new-pricing-section-header span {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.new-add-tier-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-add-tier-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.new-pricing-product-info {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
}

.new-pricing-product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.new-pricing-base-price-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.new-pricing-base-price-container label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.new-pricing-base-price-container input {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.new-pricing-base-price-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.new-pricing-base-price-container small {
    color: #6b7280;
    font-size: 0.75rem;
}

.new-pricing-tiers-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.new-pricing-tier-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.new-pricing-tier-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.new-pricing-tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.new-pricing-tier-name {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 300px;
}

.new-pricing-tier-name:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.new-pricing-tier-remove {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.new-pricing-tier-remove:hover {
    background: #dc2626;
}

.new-pricing-tier-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.new-pricing-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.new-pricing-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.new-pricing-field input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.new-pricing-field input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.new-pricing-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    display: none;
}

.new-pricing-empty-state.show {
    display: block;
}

.new-pricing-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.new-pricing-empty-state p {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.new-pricing-empty-state small {
    font-size: 0.875rem;
}

.new-pricing-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.new-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.new-btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.new-btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

/* Attached Products Styles */
.form-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-section-header h4 {
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
}

.form-section-description {
    margin: 0 0 1rem 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
}

.attached-products-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.attached-products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.attached-product-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
}

.attached-product-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr auto;
    gap: 1rem;
    align-items: end;
}

.attached-product-select,
.attached-product-quantity,
.attached-product-notes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.attached-product-select label,
.attached-product-quantity label,
.attached-product-notes label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.attached-product-select select,
.attached-product-quantity input,
.attached-product-notes input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

.attached-product-actions {
    display: flex;
    align-items: center;
}

.btn-remove-attachment {
    background: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.btn-add-attachment {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
}

.btn-add-attachment:hover {
    background: #059669;
}

/* Attached Products Display in Product Cards */
.attached-products-preview {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.attached-products-preview .detail-label {
    margin-bottom: 0.5rem;
}

.attached-products-list-preview {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.attached-product-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 0.75rem;
}

.attached-product-name {
    font-weight: 500;
    color: #374151;
}

.attached-product-qty {
    font-weight: 600;
    color: #059669;
}

@media (max-width: 768px) {
    .attached-product-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .attached-product-actions {
        justify-content: flex-end;
    }
    
    .new-pricing-modal-container {
        width: 95%;
        margin: 1rem;
    }
    
    .new-pricing-tier-fields {
        grid-template-columns: 1fr;
    }
    
    .new-pricing-modal-header,
    .new-pricing-modal-content,
    .new-pricing-modal-footer {
        padding: 1rem;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1.25rem;
}

.empty-state p {
    margin: 0 0 1.5rem 0;
    font-size: 0.875rem;
}

.btn-create-first {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-create-first:hover {
    background: #2563eb;
}
