/* ==========================================================================
   IT Equipment Order Portal - Original Green Theme
   ========================================================================== */

:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

/* Navigation */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.cart-link {
    position: relative;
    font-size: 1.2rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #065f46 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e5e7eb;
    color: var(--dark);
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Products Section */
.products-section {
    padding: 2rem 0;
}

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

.section-header h2 {
    font-size: 1.75rem;
    color: var(--dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.product-image {
    height: 180px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary-color);
}

.product-info {
    padding: 1.25rem;
}

.product-category {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.product-description {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product-delivery {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
}

/* Stock Badge */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.stock-badge.low-stock {
    background: #fef3c7;
    color: #d97706;
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: #dc2626;
}

/* Cart */
.cart-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.cart-header {
    margin-bottom: 2rem;
}

.cart-header h1 {
    font-size: 2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-header h1 i {
    color: var(--primary-color);
}

.cart-items {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.cart-item-quantity button {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.cart-item-quantity button:hover {
    background: var(--primary-color);
    color: white;
}

.cart-item-quantity span {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.cart-item-subtotal {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 100px;
    text-align: right;
}

.cart-item-remove {
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.5rem;
}

.cart-item-remove:hover {
    color: var(--danger-color);
}

/* Cart Summary */
.cart-summary {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--secondary-color);
}

.cart-summary-row:last-of-type {
    border-bottom: none;
}

.cart-summary-row.total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border);
}

.cart-summary-row.total span:last-child {
    color: var(--primary-color);
}

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

.cart-actions .btn {
    flex: 1;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-color);
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border);
}

.empty-cart h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.empty-cart p {
    margin-bottom: 1.5rem;
}

/* Checkout */
.checkout-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.checkout-form h2 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-form h2 i {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Order Summary */
.order-summary {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.order-items {
    margin-bottom: 1rem;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.order-item-qty {
    color: var(--secondary-color);
    margin: 0 0.5rem;
}

.order-item-price {
    font-weight: 600;
    color: var(--dark);
}

/* Orders Page */
.orders-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.orders-header h1 {
    font-size: 2rem;
    color: var(--dark);
}

.orders-filters {
    display: flex;
    gap: 1rem;
}

.orders-filters select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}

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

.order-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.order-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
}

.order-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    font-family: monospace;
}

.order-date {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.order-status {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.processing {
    background: #fef3c7;
    color: #d97706;
}

.order-status.shipped {
    background: #dbeafe;
    color: #1d4ed8;
}

.order-status.delivered {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.order-status.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.order-card-body {
    padding: 1rem 1.5rem;
}

.order-items-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.order-item-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

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

/* Returns Page */
.returns-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.returns-header h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 2rem;
}

.return-form {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.return-form h2 {
    font-size: 1.25rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 150px);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: #f9fafb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ==========================================================================
   Confirmation Modals (Checkout + Returns)
   ========================================================================== */

.modal-content.confirmation-modal {
    max-width: 720px;
    padding: 2rem 2.25rem;
    text-align: left;
}

.modal-content.confirmation-modal .confirmation-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.modal-content.confirmation-modal h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.75rem;
    line-height: 1.25;
    color: var(--dark);
}

.modal-content.confirmation-modal p {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: var(--secondary-color);
}

.modal-content.confirmation-modal p strong {
    color: var(--dark);
    font-weight: 800;
}

.modal-content.confirmation-modal .confirmation-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.modal-content.confirmation-modal .confirmation-actions .btn-primary,
.modal-content.confirmation-modal .confirmation-actions .btn-secondary {
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
}

@media (max-width: 520px) {
    .modal-content.confirmation-modal {
        padding: 1.5rem;
    }

    .modal-content.confirmation-modal .confirmation-actions {
        flex-direction: column;
    }
}

.close {
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
}

.close:hover {
    color: var(--dark);
}

/* Settings */
.settings-content {
    padding: 1.5rem;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.settings-section h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-section h3 i {
    color: var(--primary-color);
}

.api-key-container {
    margin-bottom: 1rem;
}

.api-key-display label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

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

.api-key-value input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.9rem;
    background: white;
}

/* Tracking Timeline */
.tracking-timeline {
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.timeline-header {
    margin-bottom: 1rem;
}

.timeline-header h3 {
    font-size: 1.1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-header h3 i {
    color: var(--primary-color);
}

.timeline-steps {
    position: relative;
    padding-left: 24px;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-step {
    position: relative;
    padding-bottom: 1.25rem;
    padding-left: 20px;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.timeline-step::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid #f9fafb;
}

.timeline-step.completed::before {
    background: var(--primary-color);
}

.timeline-step.current::before {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.timeline-step-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.timeline-step-date {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 2px;
}

.timeline-step-location {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.tracking-countdown {
    margin-top: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border);
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 1rem 1.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification.success {
    border-color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.notification.error {
    border-color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-quantity,
    .cart-item-subtotal {
        margin-top: 1rem;
    }
    
    .cart-item-subtotal {
        text-align: left;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-top: 3rem;
}

/* Policy Callout */
.policy-callout {
    background: var(--primary-light);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.policy-callout h3 {
    font-size: 1rem;
    color: var(--primary-hover);
    margin-bottom: 0.5rem;
}

.policy-callout p {
    color: var(--primary-hover);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   Missing UI Blocks (restored) — ensures portal visuals match markup
   ========================================================================== */

/* Generic container used across pages */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.page-title i {
    color: var(--primary-color);
}

/* Navbar chips/buttons */
.user-welcome {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary-hover);
    font-weight: 600;
    font-size: 0.9rem;
}

.logout-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--secondary-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Filters + search */
.filters-section {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, minmax(180px, 220px));
    gap: 1rem;
    align-items: end;
    margin: 2rem 0;
}

@media (max-width: 1100px) {
    .filters-section {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .filters-section {
        grid-template-columns: 1fr;
    }
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    box-shadow: var(--shadow);
}

.search-bar i {
    color: var(--secondary-color);
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.filter-group select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    font-size: 0.95rem;
    box-shadow: var(--shadow);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* Product card details */
.product-part-number {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.product-price-section {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0.75rem 0 0.25rem 0;
}

.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid transparent;
}

.delivery-badge.fast {
    background: var(--primary-light);
    color: var(--primary-hover);
    border-color: rgba(16, 185, 129, 0.35);
}

.delivery-badge.medium {
    background: #fef3c7;
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.35);
}

.delivery-badge.slow {
    background: #dbeafe;
    color: #1e40af;
    border-color: rgba(59, 130, 246, 0.35);
}

.delivery-badge.backorder {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.35);
}

/* Action buttons used in templates */
.btn-quick-view {
    flex: 1;
    border: 1px solid var(--border);
    background: white;
    color: var(--secondary-color);
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick-view:hover {
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

.btn-manual {
    border: 1px solid #6366f1;
    background: white;
    color: #6366f1;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
}

.btn-manual:hover {
    background: #6366f1;
    color: white;
}

.btn-add-to-cart {
    flex: 1;
    border: none;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-to-cart:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-add-to-cart:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* Modal open state (many pages toggle .active) */
.modal.active {
    display: block;
}

/* Cart layout + buttons referenced by cart.html */
.cart-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
}

.cart-items-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.cart-summary h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border);
}

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

.summary-row.total-row {
    border-bottom: none;
    font-weight: 800;
    color: var(--dark);
}

.btn-checkout {
    width: 100%;
    margin-top: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-checkout:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    background: white;
    color: var(--secondary-color);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-continue-shopping:hover {
    border-color: var(--primary-color);
    color: var(--primary-hover);
}

/* Orders page filters + list */
.orders-filters {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

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

/* Order detail modal bits */
.order-detail-modal {
    max-width: 900px;
}

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

.order-number {
    color: var(--secondary-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.order-status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    background: #f3f4f6;
    color: #374151;
}

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

@media (max-width: 800px) {
    .order-info-grid {
        grid-template-columns: 1fr;
    }
}

.info-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    background: #f9fafb;
}

.info-section h3 {
    font-size: 0.95rem;
    margin-bottom: 0.65rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-section p {
    margin: 0;
    line-height: 1.6;
}

.items-heading {
    margin: 1.5rem 0 0.75rem 0;
    color: var(--dark);
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-totals {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.order-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

/* Returns tabs + forms */
.returns-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem 0;
    flex-wrap: wrap;
}

.tab-btn {
    border: 1px solid var(--border);
    background: white;
    color: var(--secondary-color);
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active,
.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-hover);
    background: var(--primary-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.return-form-container {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.return-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--dark);
}

.btn-link {
    margin-top: 0.5rem;
    border: none;
    background: transparent;
    color: var(--primary-hover);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Footer inner layout */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary-hover);
}

/* ==========================================================================
   Product Manual Modal
   ========================================================================== */

.manual-modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.manual-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.manual-title-section h2 {
    color: #6366f1;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.manual-title-section h2 i {
    margin-right: 0.5rem;
}

.manual-meta {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.btn-print {
    white-space: nowrap;
}

.manual-sections {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.manual-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.manual-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    cursor: pointer;
    transition: background 0.2s;
}

.manual-section-header:hover {
    background: #f1f5f9;
}

.manual-section-header h3 {
    font-size: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.manual-section-header h3 i {
    color: #6366f1;
    width: 20px;
}

.section-toggle {
    color: var(--secondary-color);
    transition: transform 0.3s;
}

.manual-section.active .section-toggle {
    transform: rotate(180deg);
}

.manual-section-content {
    display: none;
    padding: 1.25rem;
    background: white;
    border-top: 1px solid var(--border);
    line-height: 1.7;
}

.manual-section.active .manual-section-content {
    display: block;
}

.manual-section-content p {
    margin-bottom: 0.75rem;
}

.manual-section-content strong {
    color: #6366f1;
}

.manual-section-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.manual-section-content li {
    margin-bottom: 0.25rem;
}

.manual-section-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

.manual-section-content th {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    background: #6366f1;
    color: white;
    font-weight: 600;
    text-align: left;
}

.manual-section-content td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
}

.manual-section-content tbody tr:nth-child(odd) {
    background: #f8fafc;
}

.manual-section-content tbody tr:hover {
    background: #e0e7ff;
}

.manual-section-content tr td:first-child {
    font-weight: 600;
}

/* Warning/Note boxes in manuals */
.manual-section-content p:first-child strong:first-child {
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Print-specific styles */
@media print {
    .manual-modal-content {
        box-shadow: none;
        max-height: none;
    }
    
    .manual-section-header {
        display: none;
    }
    
    .manual-section-content {
        display: block !important;
        border: none;
        padding: 0;
    }
    
    .manual-section {
        border: none;
    }
}