/**
 * NA Literature Order Form Styles
 * Modern, responsive design
 */

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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #475569;
    --success-color: #059669;
    --danger-color: #dc2626;
    --border-color: #e2e8f0;
    --bg-gray: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --spacing: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header.page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.na-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text {
    text-align: center;
}

@media (max-width: 640px) {
    header.page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .na-logo {
        width: 60px;
        height: 60px;
    }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

/* Form Sections */
.form-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
    letter-spacing: 0.005em;
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 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(37, 99, 235, 0.1), 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

.qty-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background: #fefeff;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--danger-color);
    background-color: #fef2f2;
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
}

.error-message::before {
    content: '⚠';
    font-size: 1rem;
}

.error-message:empty::before {
    content: '';
}

/* Category Tabs */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-button:hover {
    background: var(--bg-gray);
    border-color: var(--secondary-color);
}

.tab-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Items Container */
.items-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.category-section {
    padding: 1rem 0;
}

.category-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.category-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-gray);
    border-radius: var(--radius);
}

/* Items Table */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.items-table thead {
    background: var(--bg-gray);
}

.items-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

/* Table column widths for proper alignment */
.items-table th:nth-child(1),
.items-table td:nth-child(1) {
    width: 60px; /* Image column */
    min-width: 60px;
    max-width: 60px;
}

.items-table th:nth-child(2),
.items-table td:nth-child(2) {
    width: auto; /* Item name - flexible */
    min-width: 200px;
}

.items-table th:nth-child(3),
.items-table td:nth-child(3) {
    width: 100px; /* SKU */
    min-width: 100px;
}

.items-table th:nth-child(4),
.items-table td:nth-child(4) {
    width: 90px; /* Price */
    min-width: 90px;
    text-align: right;
}

.items-table th:nth-child(5),
.items-table td:nth-child(5) {
    width: 120px; /* Quantity */
    min-width: 120px;
    text-align: center;
}

.items-table th:nth-child(6),
.items-table td:nth-child(6) {
    width: 90px; /* Total */
    min-width: 90px;
    text-align: right;
}

.items-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.items-table tbody tr {
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.items-table tbody tr:hover {
    background: var(--bg-gray);
    transform: scale(1.002);
}

.item-name {
    font-weight: 500;
}

.item-sku {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.item-price,
.item-total {
    font-weight: 600;
    color: var(--success-color);
    text-align: right;
}

.item-quantity {
    text-align: center;
}

.qty-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    min-height: 44px;
}

.qty-input:hover:not(:focus) {
    border-color: var(--secondary-color);
    background-color: #fafbfc;
}

/* Hide native number input spinners */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-input[type=number] {
    -moz-appearance: textfield;
}

/* Year input for medallions */
.year-input-inline {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    min-height: 44px;
    font-size: 0.9375rem;
}

.year-input-inline:hover:not(:focus) {
    border-color: var(--secondary-color);
    background-color: #fafbfc;
}

.year-input-inline:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background: #fefeff;
}

/* Hide spinners for year input */
.year-input-inline::-webkit-outer-spin-button,
.year-input-inline::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.year-input-inline[type=number] {
    -moz-appearance: textfield;
}

.item-year {
    text-align: center;
}

/* Quantity Spinner Wrapper */
.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.qty-wrapper .qty-input {
    width: 50px;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 44px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.qty-btn:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.qty-btn:active {
    background: var(--primary-color);
    color: white;
    transform: scale(0.95);
}

.qty-minus {
    border-radius: var(--radius) 0 0 var(--radius);
}

.qty-plus {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Mobile touch-friendly sizing */
@media (max-width: 768px) {
    .qty-btn {
        width: 36px;
        height: 40px;
    }

    .qty-wrapper .qty-input {
        width: 44px;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .qty-btn {
        width: 32px;
        height: 36px;
        font-size: 1.125rem;
    }

    .qty-wrapper .qty-input {
        width: 38px;
        min-height: 36px;
        font-size: 0.8125rem;
        padding: 0.25rem;
    }
}

/* Year Input Section */
.year-input-section {
    margin: 1rem 0;
}

.year-input-group {
    background: var(--bg-gray);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.form-col {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
}

.form-col label {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.form-col input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    min-height: 44px;
}

.form-col-btn {
    display: flex;
    align-items: flex-end;
}

.year-input,
.quantity-input {
    width: 100%;
}

.price-display,
.item-total {
    background: white;
    font-weight: 600;
}

/* Year Input Row with Image */
.year-input-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-col-image {
    flex: 0 0 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-col-image .item-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 4px;
}

.form-col-year {
    flex: 1 1 150px;
    min-width: 120px;
}

.form-col-quantity {
    flex: 1 1 120px;
    min-width: 100px;
}

.form-col-price {
    flex: 1 1 100px;
    min-width: 90px;
}

.form-col-total {
    flex: 1 1 100px;
    min-width: 90px;
}

/* Responsive adjustments for year input rows */
@media (max-width: 768px) {
    .year-input-row {
        flex-wrap: wrap;
    }

    .form-col-image {
        flex: 0 0 50px;
        width: 50px;
    }

    .form-col-image .item-image {
        width: 40px;
        height: 40px;
    }

    .form-col-year,
    .form-col-quantity,
    .form-col-price,
    .form-col-total {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }
}

/* Added Items Display */
.added-years {
    margin-top: 1rem;
}

.added-items-list h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.added-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.added-item:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.added-item .item-name {
    font-weight: 500;
    flex: 1;
}

.added-item .item-details {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-add,
.btn-remove {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-gray);
}

.btn-add {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
}

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

.btn-remove {
    background: var(--danger-color);
    color: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

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

/* Order Summary */
.order-summary {
    background: var(--bg-gray);
    border: 2px solid var(--border-color);
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

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

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

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .category-tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
    }

    .items-table {
        font-size: 0.875rem;
    }

    .items-table th,
    .items-table td {
        padding: 0.5rem 0.375rem;
    }

    .items-table th:first-child,
    .items-table td:first-child {
        padding-left: 0.5rem;
    }

    .items-table th:last-child,
    .items-table td:last-child {
        padding-right: 0.5rem;
    }

    .item-sku {
        font-size: 0.75rem;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-col-btn {
        align-items: stretch;
    }

    .btn-add {
        width: 100%;
    }

    .added-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .added-item .item-details {
        margin: 0;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 6px;
    }

    /* Mobile: Horizontal scroll table with fixed layout */
    .items-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        font-size: 0.8125rem;
    }

    .items-table table,
    .items-table thead,
    .items-table tbody,
    .items-table tr {
        display: table;
        width: 100%;
    }

    .items-table thead {
        background: var(--bg-gray);
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .items-table th,
    .items-table td {
        padding: 0.625rem 0.5rem;
        min-width: fit-content;
    }

    /* Fixed widths for mobile to prevent overlap */
    .items-table th:nth-child(1),
    .items-table td:nth-child(1) {
        min-width: 180px; /* Item name */
    }

    .items-table th:nth-child(2),
    .items-table td:nth-child(2) {
        min-width: 100px; /* SKU */
    }

    .items-table th:nth-child(3),
    .items-table td:nth-child(3) {
        min-width: 70px; /* Price */
    }

    .items-table th:nth-child(4),
    .items-table td:nth-child(4) {
        min-width: 90px; /* Quantity */
    }

    .items-table th:nth-child(5),
    .items-table td:nth-child(5) {
        min-width: 70px; /* Total */
    }

    .item-name {
        font-size: 0.875rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .item-sku {
        font-size: 0.75rem;
    }

    .qty-input {
        width: 60px;
        min-height: 40px;
        font-size: 0.875rem;
    }

    .order-summary {
        padding: 1rem;
    }

    .summary-row {
        font-size: 0.9375rem;
    }

    .summary-row.total-row {
        font-size: 1.125rem;
    }

    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 1rem;
    }

    header {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9375rem;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .category-tabs {
        margin-bottom: 1rem;
    }

    .tab-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Success/Error Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

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

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

.notification.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    background: var(--success-color);
    color: white;
}

.notification.error .notification-icon {
    background: var(--danger-color);
    color: white;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

.loading-spinner {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    text-align: center;
}

.spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    color: var(--text-primary);
    font-weight: 500;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Banner Styles */
.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease-out;
    gap: 1rem;
    position: relative;
}

.banner-content {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.banner-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.banner-link:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.banner-link-text {
    margin-left: 0.5rem;
    font-weight: 600;
    text-decoration: underline;
}

.banner-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.banner-close:hover {
    opacity: 1;
}

/* Banner Types */
.banner-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #2563eb;
}

.banner-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.banner-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #059669;
}

.banner-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

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

/* Responsive Banner Styles */
@media (max-width: 768px) {
    .banner {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
        flex-direction: row;
        align-items: flex-start;
    }

    .banner-content {
        font-size: 0.9375rem;
    }

    .banner-close {
        font-size: 1.5rem;
        padding: 0.125rem 0.375rem;
    }

    .banner-link-text {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

@media (max-width: 480px) {
    .banner {
        padding: 0.75rem;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    .banner-content {
        font-size: 0.875rem;
    }

    .banner-close {
        font-size: 1.25rem;
    }
}

/* ===================================
   Product Images - Phase 1
   =================================== */

/* Image thumbnail in item table */
.item-image-cell {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
}

.image-preview-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: block;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin: 0 auto;
}

.image-preview-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.image-preview-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.item-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback icon for items without images */
.item-thumbnail.placeholder {
    opacity: 0.4;
    filter: grayscale(50%);
}

/* ===================================
   Image Modal/Lightbox
   =================================== */

.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.2s ease;
}

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

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.2s ease;
}

.image-modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.image-modal-caption {
    text-align: center;
    color: white;
    padding: 1rem;
    font-size: 1.125rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 8px 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.image-modal-close:hover {
    background: var(--danger-color);
    color: white;
}

/* Animations */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsiveness for images */
@media (max-width: 768px) {
    .item-image-cell {
        width: 50px;
    }

    .image-preview-btn {
        width: 40px;
        height: 40px;
    }

    .image-modal-content {
        max-width: 95%;
    }
}

/* Hide image column on very small screens */
@media (max-width: 480px) {
    .item-image-cell {
        display: none;
    }

    .items-table th:first-child {
        display: none;
    }
}
