@import url('https://fonts.googleapis.com/css2?family=Elms+Sans:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Elms Sans', Arial, sans-serif;
}


main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
}

.upload-form {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.upload-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-form input, .upload-form button {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.upload-form button {
    background-color: #333;
    color: white;
    cursor: pointer;
    border: none;
}

.upload-form button:hover {
    background-color: #555;
}

.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-item {
    background-color: white;
    border: 1px solid #ddd;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    width: calc(33.333% - 1rem);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item .info {
    padding: 1rem;
}

.gallery-item .info p {
    margin: 0 0 0.5rem 0;
}

.gallery-item .info .price {
    font-weight: bold;
    margin-bottom: 1rem;
}

.gallery-item .add-to-cart-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.gallery-item .add-to-cart-btn:hover {
    background-color: #218838;
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

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

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem 0;
    gap: 1rem;
}

.cart-item-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.controls-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.language-switcher {
    display: flex;
    gap: 5px;
    background-color: rgb(65, 65, 65);
    padding: 5px;
    border-radius: 5px;
}


.lang-option.active {
    background-color: #555;
    font-weight: bold;
}

.lang-option:not(.active):hover {
    background-color: #666;
}

.search-section {
    margin-bottom: 2rem;
    text-align: center;
}

#searchInput {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 50%;
    max-width: 400px;
}

.size-selector {
    display: inline-flex;
    gap: 5px;
    background-color: #444;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.size-selector input[type="radio"] {
    display: none;
}

.size-selector label {
    padding: 5px 10px;
    color: white;
    cursor: pointer;
    border-radius: 3px;
}

.size-selector input[type="radio"]:checked + label {
    background-color: #555;
    font-weight: bold;
}

.size-selector label:not(:has(:checked)):hover {
    background-color: #666;
}


.logo {
    width: 120px;
    height: auto;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

/* Container for the whole component */
.language-switcher-container {
    position: relative; /* Essential for positioning the dropdown relative to the active language */
    display: inline-block;
}

/* Style for the visible, clickable language indicator */
.current-lang {
    background-color: transparent;
    color: rgb(201, 169, 169);
    padding: 10px 15px;
    cursor: pointer;
    /* Add a dropdown arrow icon for better UX */
    padding-right: 30px; 
    /* Using a standard text character for the arrow */
    /* You could also use a background image */
    position: relative;
}

.current-lang:after {
    content: ' \25BC'; /* Unicode for a small downward black triangle */
    font-size: 10px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Style for the hidden dropdown menu */
.language-dropdown {
    display: none; /* KEY: Hides the menu by default */
    position: absolute;
    background-color: #f9f9f9;
    min-width: 60px; /* Adjust width as needed */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10; /* Ensure it appears above other elements */
}

/* Style for each option within the dropdown */
.lang-option {
    color: black;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    text-align: center;
}

.lang-option:hover {
    background-color: #ddd;
}

/* CSS to show the menu when the 'show' class is added by JavaScript */
.language-dropdown.show {
    display: block;
}

/* Optionally, hide the 'active' option within the dropdown */
.language-dropdown .lang-option.active {
    display: none;
}

#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color:  #fcf9f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 999;
    position: sticky;
    top: 0;
    left: 0;
}

#navbar {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

#navbar li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}
#navbar li a:hover,
#navbar li a.active {
    color: #ff6600;
}

#navbar li a.active::after {
    content: '';
    display: block;
    width: 60%;
    height: 2px;
    background-color: #ff6600;
    margin-top: 5px;
}

#mobile {
    display: none;
}

#close {
    display: none;
}

#hero {
    background-image: url("/static/photos/back.JPG");
    height: 90vh;
    background-position: right 0 top 25%;
    background-size: cover;
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    
}

#hero h4 {
    padding: 15px;
}

#hero h1 {
    color: #088178;
}

#hero button {
    background-image: url(/static/photos/button.png);
    background-color: transparent;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    padding: 14px 80px 14px 65px;
    background-repeat: no-repeat;
    font-weight: 700;
}

li.cart-container {
    position: relative;
    display: inline-block;
}

#cartCount {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 20px;
}

/* Product Detail Page */
#product-detail-container.container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

.product-gallery {
    display: flex;
    flex: 1; /* Takes up half the space */
    gap: 1rem;
}

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

.thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.thumbnail:hover, .variant-thumbnail:hover {
    border-color: #000;
}

.main-product-image {
    max-width: calc(100% - 70px); /* Adjust based on thumbnail width and gap */
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.product-info {
    flex: 1; /* Takes up the other half */
    display: flex;
    flex-direction: column;
}

.product-info h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.product-info .product-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.product-info .price {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.size-table-photo {
    width: 100%;
    max-width: 400px; /* Adjust as needed */
    margin-bottom: 1.5rem;
    border-radius: 4px;
    border: 1px solid #eee;
}

.variant-selector, .size-selector-container {
    margin-bottom: 1.5rem;
}

.variant-selector p, .size-selector-container p {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.variant-options {
    display: flex;
    gap: 0.5rem;
}

.variant-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 4px;
}

.variant-thumbnail.selected {
    border-color: #000;
}

.size-selector {
    /* display: flex; */
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-selector input[type=radio] {
    display: none;
}

.size-selector label {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-selector input[type=radio]:checked + label {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.size-selector label:hover {
    border-color: #888;
}


.add-to-cart-btn {
    width: 100%;
    padding: 1rem;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 25px; /* Pill shape */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: auto; /* Pushes button to the bottom */
}

.add-to-cart-btn:hover {
    background-color: #333;
}

/* About Us Page */
.about-us-container {
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.6;
}

.about-us-container h1, .about-us-container h2 {
    color: #333;
    margin-bottom: 1rem;
}

.about-us-container h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.about-us-container h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
}

.about-us-container p {
    margin-bottom: 1rem;
    color: #555;
}

.about-us-container ul {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.about-us-container li {
    margin-bottom: 0.5rem;
}


/* Responsive */
@media (max-width: 830px) {
    #navbar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        position: fixed;
        top: 0;
        right: -300px;
        height: 100vh;
        width: 300px;
        background-color: #fcf9f5;
        box-shadow: 0 40px 60px rgba(0, 0, 0, 0.1);
        padding: 80px 0 0 10px;
        transition: 0.3s;
    }

    #navbar.active {
        right: 0px;
    }

    #navbar li {
        margin-bottom: 25px;
    }

    #mobile {
        display: flex;
        align-items: center;
    }

    #mobile i {
        color: #1a1a1a;
        font-size: 24px;
        padding-left: 20px;
    }

    #close {
        display: initial;
        position: absolute;
        top: 30px;
        left: 30px;
        color: #222;
        font-size: 24px;
    }

    #lg-bag {
        display: none;
    }

    #hero {
        height: 70vh;
        padding: 0 80px;
        background-position: top 30% right 30%;
    }

    #product-detail-container.container {
        flex-direction: column;
    }

    .product-gallery {
        flex-direction: column-reverse; /* Main image on top */
    }

    .thumbnails {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }

    .main-product-image {
        max-width: 100%;
    }
}

@media (max-width: 477px) {
    #header {
        padding: 10px 30px;
    }

    #hero {
        padding: 0 20px;
        background-position: 55%;
    }

    #hero h2 {
        font-size: 32px;
    }

    #hero h1 {
        font-size: 38px;
    }

    #searchInput {
        width: 100%;
    }

    .gallery-item {
        width: 100%;
    }
}
