:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #333;
    --border-color: #dee2e6;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-box {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: center;
}

.search-form {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.search-input {
    padding: 10px;
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-btn {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.search-btn:hover {
    background-color: #0056b3;
}

/* Results Table Styles */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background-color: #f1f3f5;
    font-weight: 600;
    color: #495057;
}

.results-table tr:hover {
    background-color: #f8f9fa;
}

.brand-col {
    font-weight: bold;
    color: var(--secondary-color);
}

.article-col {
    font-family: monospace;
    font-size: 1.1em;
    color: var(--primary-color);
}

.price-col {
    font-weight: bold;
    color: #28a745;
    white-space: nowrap;
}

/* Stock Info in Table */
.stock-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9em;
}

.stock-item {
    margin-bottom: 2px;
}

.stock-location {
    color: #666;
}

.stock-qty {
    font-weight: bold;
}

.out-of-stock {
    color: #dc3545;
    font-size: 0.9em;
}

/* Image Tooltip */
.image-trigger {
    position: relative;
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9em;
}

.image-tooltip {
    display: none;
    position: absolute;
    top: 50%;
    right: 100%;
    /* Show to the left of the link */
    transform: translateY(-50%);
    margin-right: 15px;
    background: white;
    padding: 5px;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    width: 200px;
    /* Fixed width for tooltip image */
    height: auto;
    border-radius: 4px;
}

.image-trigger:hover .image-tooltip {
    display: block;
}

.image-tooltip img {
    width: 100%;
    height: auto;
    display: block;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    /* Semi-transparent black backdrop */
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.image-modal-content {
    position: relative;
    margin: auto;
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    /* Limit width */
    max-height: 80vh;
    /* Limit height */
    width: auto;
    height: auto;
    animation: zoomIn 0.3s;
    display: flex;
    flex-direction: column;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    border-radius: 4px;
}

.image-modal-close {
    position: absolute;
    top: -35px;
    /* Move close button outside top-right */
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.8;
}

.image-modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Add a close button inside/below content for mobile friendliness if needed */
.image-modal-footer {
    margin-top: 10px;
    text-align: center;
}

.btn-close-modal {
    padding: 8px 20px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-close-modal:hover {
    background-color: #5a6268;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}