body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f0f2f5;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
}

.top-bar .logo {
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 40px;
    margin-right: 10px;
}

.top-bar .search-bar {
    width: 50%;
    margin: 0 20px;
}

.top-bar .search-bar input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.top-bar .menu a {
    margin-left: 15px;
    text-decoration: none;
    color: #333;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(375px, 1fr));
    gap: 30px;
    padding: 30px;
    max-width: 2000px;
    margin: 0 auto;
}

.tile {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 400px; /* Fixed height for all tiles */
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.tile-link {
    text-decoration: none;
    color: inherit;
}

.tile:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    transition: all 0.2s ease-in-out;
}

.tile-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.tile-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-header .gtin {
    color: #777;
    font-size: 0.9em;
    margin: 0;
}

.tile-image-container,
.tile-image-placeholder {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f9f9f9;
}

.tile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-image-placeholder i {
    font-size: 5em;
    color: #ccc;
}

.tile img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.tile .title {
    font-weight: bold;
    margin: 10px 0 5px;
}

.tile .gtin {
    color: #777;
    font-size: 0.9em;
}

/* Dropdown Button */
.dropbtn {
    background-color: #fff;
    color: #333;
    padding: 8px;
    font-size: 24px;
    border: none;
    cursor: pointer;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f1f1f1;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {background-color: #ddd;}

.dropdown-content a i {
    margin-right: 10px;
}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {display: block;}

.language-dropdown {
    column-count: 2;
}

/* Chat icon */
.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Chat popup */
.chat-popup {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 600px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    box-shadow: 0px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.chat-header {
    padding: 10px;
    background: #007bff;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
}

.chat-header h3 i {
    margin-right: 10px;
}

.chat-header .btn.cancel {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.chat-body {
    padding: 15px;
    height: 400px;
    overflow-y: auto;
}

.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-footer input {
    flex-grow: 1;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 5px;
}

.chat-footer button {
    background: #007bff;
    color: white;
    border: none;
    padding: 0 12px;
    margin-left: 5px;
    border-radius: 5px;
    cursor: pointer;
}

/* Coming Soon Popup */
.coming-soon-popup {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.popup-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    text-align: center;
    border-radius: 10px;
    position: relative;
}

.popup-content i {
    font-size: 50px;
    color: #007bff;
    margin-bottom: 20px;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.user-message {
    text-align: right;
    margin: 10px 0;
}

.user-message p {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border-radius: 10px 10px 0 10px;
    display: inline-block;
}

.bot-message {
    text-align: left;
    margin: 10px 0;
}

.bot-message p {
    background-color: #f1f1f1;
    color: black;
    padding: 10px;
    border-radius: 10px 10px 10px 0;
    display: inline-block;
}

.bot-typing {
    text-align: left;
    margin: 10px 0;
}

.bot-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 2px;
    animation: blink 1.4s infinite both;
}

.bot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.bot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0.2;
    }
}

.form-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.characteristic-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.characteristic-item input {
    flex: 1;
}

.remove-char-btn {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

#add-char-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.submit-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Drop Zone Styles */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    color: #aaa;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.drop-zone--over {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.drop-zone__input {
    display: none;
}

.drop-zone__thumb {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    background: #ccc;
    display: inline-block;
    margin: 5px;
    position: relative;
}

.drop-zone__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drop-zone__thumb-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    display: none; /* Hide by default */
}

.drop-zone__thumb:hover .drop-zone__thumb-remove {
    display: block; /* Show on hover */
}

#previews-container {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-detail-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-images {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.product-images img {
    max-width: 200px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.characteristics-table th,
.characteristics-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.characteristics-table th {
    background-color: #f2f2f2;
}

/* New Product Detail Page Styles */
.product-detail-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
}

.image-zone {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.main-image-display {
    flex: 0 0 68%; /* Approx 70% taking gap into account */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.main-image-display img {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-list {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-content: start;
}

.thumbnail-list .thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumbnail-list .thumbnail:hover,
.thumbnail-list .thumbnail.active {
    border-color: #007bff;
}

.product-info-details h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.info-section {
    display: flex;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info-label {
    font-weight: bold;
    width: 100px;
    color: #555;
}

.description-section {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.description-section h2 {
    margin-top: 0;
}

.characteristics-section {
    margin-top: 30px;
    border: 1px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.characteristics-list {
    list-style: none;
    padding: 0;
}

.characteristics-list li {
    display: flex;
    flex-direction: row;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.characteristics-list li:last-child {
    border-bottom: none;
}

.characteristics-list li strong {
    width: 30%;
    flex-shrink: 0;
    padding-right: 1em;
}

.characteristics-list li span {
    width: 70%;
}

.delete-section {
    text-align: right;
    margin-top: 20px;
}

.delete-btn {
    background-color: #dc3545; /* Red */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px; /* Rounded corners */
    cursor: pointer;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.delete-btn:hover {
    background-color: #c82333; /* Darker red on hover */
}

.alert-success {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-info {
    padding: 15px;
    background-color: #d1ecf1;
    color: #0c5460;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-warning {
    padding: 15px;
    background-color: #fff3cd;
    color: #856404;
    border-radius: 5px;
    margin-bottom: 20px;
}

.brand-name {
    color: #007bff; /* Blue */
    font-weight: bold;
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-bar .search-bar {
        width: 100%;
        margin: 10px 0;
    }

    .gallery {
        padding: 15px;
    }

    .tile {
        height: auto;
    }

    .chat-popup {
        width: 90%;
        right: 5%;
    }

    .product-detail-container {
        padding: 15px;
    }

    .image-zone {
        flex-direction: column;
    }

    .main-image-display {
        width: 100%;
    }

    .thumbnail-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .info-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-label {
        width: auto;
        margin-bottom: 5px;
    }

    .description-section,
    .characteristics-section {
        padding: 15px;
    }

    .characteristics-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .characteristics-list li strong {
        width: auto;
        margin-bottom: 5px;
    }

    .delete-section {
        text-align: center;
    }
}
