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

body {
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    line-height: 1.6;
    height: 100%;
}

p {
    padding-top: 10px;
}
/* Header and Navigation Styles */
.header {
    width: 100%;
    background-color: white;
    border-bottom: 1px solid #ccc;
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed; /* Keep the header fixed at the top */
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0 20px;
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between; /* Space between left and right sections */
    align-items: center;
}

.left-section {
    display: flex;
    align-items: center;
}

.brand {
    flex-shrink: 0; /* Prevent the brand/logo from shrinking */
}

.brand .logo {
    height: 60px;
    max-width: 100px;
    object-fit: contain;
}

.site-heading {
    margin-left: 20px;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #007bff;
    transition: color 0.3s ease;
    text-decoration: none; 
    padding: 16px 0;
    white-space: nowrap;
}

.nav-link:hover {
    color: #0056b3;
}

.language-switcher {
    margin-left: 20px;
}

#language-select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    background-color: white;
    color: #333;
    outline: none;
    cursor: pointer;
}

#language-select:hover {
    border-color: #007bff;
}

/* Form Styling */
#product-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

#product-form label {
    display: block;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #555;
}

#product-form input[type="text"], 
#product-form textarea, 
#product-form select, 
#product-form button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
}

#product-form textarea {
    resize: vertical;
    min-height: 100px;
}

#product-form button {
    width: auto;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

#product-form button:hover {
    background-color: #0056b3;
}

/* Additional Image Uploader Styling */
#additional-images-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.additional-image {
    flex: 1;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    padding: 8px;
    border-radius: 4px;
    display: inline-block;
}

.upload-additional-image {
    margin-left: 10px;
    background-color: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.upload-additional-image:hover {
    background-color: #218838;
}

#add-more-images {
    margin-top: 10px;
    background-color: #17a2b8;
    color: white;
    padding: 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

#add-more-images:hover {
    background-color: #138496;
}

/* Table Styling */
#product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#product-table th, 
#product-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-size: 14px;
    color: #333;
}

#product-table th {
    background-color: #f2f2f2;
    font-weight: 600;
    color: #555;
}

#product-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Language Switcher */
#language-switcher {
    display: inline-block;
    margin-left: auto;
    position: relative;
}

#language-switcher select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    cursor: pointer;
}

/* Hero Image */
.hero {
    width: 100%;
    height: 600px;
    margin: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Section Styling */
.section {
    padding: 36px 20px;
}

.title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    color: #000;
    margin-bottom: 36px;
}

/* Category Navigation */
.category-nav {
    margin-bottom: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-link {
    background-color: #f3f4f6;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none; /* Ensure no decoration */
    color: #333;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.category-link:hover {
    background-color: #e5e7eb;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 36px;
}

/* Each product card */

main.section {
    padding-top: 140px; /* Add enough padding to prevent content from being hidden */
}
.product-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 350px; 
    max-width: 400px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.product-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.product-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-decoration: none;     
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-description {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
}

.product-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push the price and button to the bottom */
}

.product-price {
    font-size: 1.6rem;
    color: #3f3f3f;
    font-weight: bold;
}



.buy-now-btn {
    font-size: 1rem;
    padding: 10px 20px;
}

/* Product Image Styling */
#product-image {
    width: 100%;
    height: auto;
    max-width: 600px;
    max-height: 600px;
    border-radius: 10px;  
    object-fit: cover; 
}

/* Additional Images Styling */
#additional-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 10px; /* Adjust gap between images */
}

#additional-images img {
    width: 100%;
    height: 100%;
    max-width: 100%; 
    max-height: 100%; 
    border-radius: 10px; /* Rounded corners */
    object-fit: cover; /* Maintain aspect ratio and ensure images are square */
    aspect-ratio: 1/1; /* Ensure the images are square */
}


.buy-now-btn {
    background-color: #007bff;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.buy-now-btn:hover {
    background-color: #0056b3;
}

#related-products {
    padding-top: 36px;
}

/* Footer Navigation */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #f8f8f8;
    border-top: 1px solid #e7e7e7;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.footer-link {
    color: #a1a2a2;
    text-decoration: none;
    font-weight: 500;
}

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

.footer-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap; /* Prevent wrapping into multiple lines */
    padding-left: 20px;
    padding-right: 20px;
}

.footer-nav .container > .footer-links {
    flex-grow: 1;
}

.footer-nav .text-gray-500 {
    color: #6c757d;
    white-space: nowrap; /* Prevent wrapping */
}

.footer-nav .container > .footer-links {
    display: flex;
    align-items: center;
}

.footer-nav .container > .footer-links a {
    white-space: nowrap; /* Prevent wrapping */
    margin-right: 20px; /* Ensure space between links */
}

.footer-nav .container > .footer-links a:last-child {
    margin-right: 0;
}


/* Responsive Adjustments */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for laptops */
    }
}

@media (max-width: 1023px) {
    /* Adjustments for tablet view */
    .columns {
        flex-direction: column;
    }

    .column.is-half {
        width: 100%;
    }

    #product-image {
        max-width: 100%;
        height: auto;
    }

    #additional-images {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 20px;
    }

    .product-info {
        margin-top: 30px;
    }

    #product-name {
        font-size: 2.5rem;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    #product-description {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    #product-long-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    #product-price {
        font-size: 2.2rem;
    }

    #buy-now {
        padding: 12px 25px;
        font-size: 1.1rem;
    }

    /* Related products adjustments */
    #related-products .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}


@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr; /* Full width for single column on mobile */
    }
}