body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #efebe2;
}

/* Profile Section */
#auth-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

/* Basket Icon */
.basket-icon {
    position: fixed;
    top: 25px;
    right: 20px;
    font-size: 35px;
    cursor: pointer;
    z-index: 10;
}

/* Profile */
.profile {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #000000;
    padding: 10px 15px;
    border-radius: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: fixed; /* Fixed positioning for the profile */
    top: 25px; /* Align with the basket icon */
    right: 80px; /* Adjusted to be next to the basket icon */
    z-index: 9; /* Slightly lower than the basket icon */
}


.profile span {
    font-weight: bold;
    color: #ffffff;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

#profile-icon {
    font-size: 20px;
    color: #ffffff;
    cursor: pointer;
}

#dropdown-menu {
    display: none;
    position: absolute;
    top: 25px;
    right: 5px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    width: 220px;
    padding: 15px;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

#dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

#dropdown-menu p {
    margin: 10px 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

#dropdown-menu button {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: #a88d79;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#dropdown-menu button:hover {
    background-color: #5d1c34;
    transform: scale(1.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.container2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    width: 90%;
    max-width: 1000px;
    min-width: 300px;
    padding: 20px;
    margin: 0 auto;
}

.sign-link {
    position: fixed;
    top: 25px;
    right: 70px;
    font-size: 15px;
    cursor: pointer;
    z-index: 10;
    text-decoration: none;
    background-color: #000000;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.sign-link:hover {
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    transform: scale(1.05);
}

header {
    background-color: #5d1c34;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px;
    gap: 30px;
}

a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.2rem;
}

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

.hero {
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000000;
    text-align: center;
    height: 150px;
}

.hero h2 {
    font-size: 2rem;
    margin: 0;
}

.hero p {
    font-size: 1.2rem;
    margin-top: 10px;
}

.products {
    margin-top: 50px;
}

.product {
    position: relative;
    background-color: #efebe2;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.product * {
    transition: color 0.3s ease;
}

.product::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #a77e46;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 0;
}

.product:hover::before {
    opacity: 1;
}

.product:hover {
    color: #ffffff;
}

.product:hover * {
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.product img {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.product-info h3 {
    margin: 0;
    color: #000000;
}

.product h3 {
    font-size: 1em;
    color: #000000;
}

.center-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.center-image {
    max-width: 150px;
    height: auto;
}

#about, #contact {
    background-color: #a88d79;
    font-size: 20px;
}

.about p {
    display: flex;
    align-items: center;
    font-size: 1em;
}

.contact p {
    display: flex;
    align-items: center;
    font-size: 1em;
}

.contact p i {
    margin-right: 10px;
    font-size: 1.5em;
}

.contact a {
    color: inherit;
    text-decoration: none;
}

.contact a:hover {
    text-decoration: underline;
}

.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background-color: #efebe2;
}

.back-button {
    text-decoration: none;
    background-color: #a88d79;
    color: #ffffff;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-button:hover {
    background-color: #5d1c34;
    transform: scale(1.05);
}

.basket-btn {
    background-color: #a88d79;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.basket-btn:hover {
    background-color: #5d1c34;
    transform: scale(1.05);
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(5px);
}

.popup-content {
    background-color: #fff;
    border-radius: 12px;
    max-width: 500px;
    max-height: 80vh;
    margin: 60px auto;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease-out;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ff6347;
}

#product-info {
    text-align: left;
    margin-bottom: 25px;
    padding: 10px;
    border-left: 4px solid #a77e46;
}

#product-info p {
    font-size: 1em;
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

select, input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 0.8em;
    margin-bottom: 25px;
    border: 2px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

select {
    background-color: #f9f9f9;
}

input[type="text"] {
    background-color: #fff;
}

select:hover, input[type="text"]:hover {
    border-color: #5d1c34;
}

.quantity-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#submit-btn {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: #a88d79;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#submit-btn:hover {
    background-color: #5d1c34;
    transform: scale(1.05);
}

#basket-summary-popup .popup-content {
    max-width: 600px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    position: relative;
}

#basket-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

#basket-summary p {
    margin: 5px 0;
    font-weight: bold;
}

.basket-item {
    margin-bottom: 20px;
    padding: 10px;
    background: #f1f1f1;
    border-radius: 5px;
}

.item-name, .item-quantity, .item-price, .item-total-price, .item-color, .item-scent {
    text-align: left;
    margin-bottom: 5px;
}

.remove-item-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.remove-item-btn:hover {
    background-color: #c82333;
}

.remove-item-btn:focus {
    outline: none;
}

#confirm {
    padding: 15px 25px;
    font-size: 1.2em;
    background-color: #a88d79;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#confirm:hover {
    background-color: #5d1c34;
    transform: scale(1.05);
}

.quantity-btn:active {
    background-color: #5d1c34;
    transform: scale(0.95);
}

#quantity:focus {
    border-color: #5d1c34;
    outline: none;
    background-color: #f9f9f9;
}

#about-text {
    white-space: pre-line;
}

.language-switcher {
    position: absolute;
    top: 20px;
    left: 30px;
    z-index: 100;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}


.lang-toggle {
    background: #ffffff;
    color: #000000;
    border: 2px solid #333;
    padding: 12px 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s, transform 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    font-weight: bold;
}

.lang-toggle:hover {
    transform: scale(1.1);
}


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

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

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

.quantity-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.quantity-container input {
    width: 60px;
    padding: 8px;
    text-align: center;
}

.button-container {
    text-align: center;
    margin: 30px 0;
}

#total-container {
  margin-top: 20px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
}

/* Copyright Section */
footer.copyright {
    background-color: #a88d79;
    color: #000000;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
}

.quantity-controls {
  display: flex;
  align-items: stretch; /* STRETCH ensures equal height */
  justify-content: center;
  gap: 8px;
  margin: 10px 0;
}

/* Buttons */
.quantity-btn {
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: bold;
  background-color: #ddd;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
}

/* Input */
#quantity {
  width: 40px;
  height: 40px;
  font-size: 20px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  line-height: 1;
  background-color: #fff;
  vertical-align: middle;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
    background-color: #5d1c34;
    color: white;
    transform: scale(1.1);
}

.quantity-btn:active {
    background-color: #5d1c34;
    transform: scale(0.95);
}

.quantity-controls input[type="text"],
.quantity-controls input[type="number"] {
    width: 60px;
    height: 40px;
    font-size: 18px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    padding: 0;
    line-height: 1;
    appearance: none;
    -moz-appearance: textfield;
    background-color: #fff;
}

/* Remove number input arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}



@media only screen and (max-width: 768px) {
    /* Product grid adjustment - changed from 3 to 2 columns */
    .container2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Reposition profile and basket */
    .profile {
        top: 80px;
        right: 17px;
        padding: 8px 12px;
    }

    a {
        font-size: 0.8rem;
    }

    /* Adjust hero section */
    .hero {
        height: 120px;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Make popups full width */
    .popup-content {
        width: 90%;
        margin: 20px auto;
        padding: 10px;
    }

    /* Adjust language switcher */
    .language-switcher {
        top: 20px;
        left: 10px;
    }

    .sign-link {
        top: 100px;
        right: 10px;
        font-size: 10px;
    }

    /* Adjust product info */
    .product-info {
        padding: 10px;
    }

    /* Center image container */
    .center-image-container {
        height: 150px;
    }

    /* Make buttons smaller */
    .back-button, .basket-btn, #submit-btn, #confirm {
        padding: 10px 20px;
        font-size: 1rem;
    }
    nav {
        gap: 20px;
    }

    #basket-summary-popup .popup-content {
    width: 95%;
    max-width: none;
    padding: 15px;
    margin: 30px auto;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
  }

  #basket-summary-popup h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  #basket-items .basket-item {
    padding: 10px;
    font-size: 0.9rem;
  }

  .basket-item div {
    margin-bottom: 5px;
  }

  #total-container {
    font-size: 1rem;
    margin-top: 15px;
  }

  #confirm {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
    margin-top: 15px;
  }

  .close-btn {
    top: 10px;
    right: 10px;
    font-size: 24px;
  }

  .quantity-controls {
    justify-content: center;
    gap: 8px;
    }

    .quantity-controls input,
    .quantity-btn {
        height: 40px;
        font-size: 18px;
    }
}