body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #efebe2;
    line-height: 1.7;
    overflow-x: hidden;
}

.top-actions{
    position:fixed;
    top:15px;
    right:90px;
    width:50px;
    height:50px;

    display:flex;
    align-items:center;
    justify-content:center;

    z-index:2000;
    direction:ltr;
}

.basket-icon{
    width:50px;
    height:50px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:34px;
    color:#000;
    cursor:pointer;
    transition:.3s;
}

.basket-icon:hover{
    transform:scale(1.1);
}

.menu-toggle{
    display:none;
    font-size:28px;
    color:#fff;
    cursor:pointer;
    z-index:1002;
}


.loading {
    grid-column: 1 / -1;
    min-height: 300px;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner{
    width:55px;
    height:55px;
    border:4px solid rgba(168,141,121,.2);
    border-top:4px solid #a88d79;
    border-radius:50%;
    animation:spin .9s linear infinite;
}

.loading p{
    font-size:18px;
    color:#5d1c34;
    font-weight:500;
}

@keyframes spin{
    to{
        transform:rotate(360deg);
    }
}

.language-switcher {
    position: fixed;
    top: 15px;
    left: 30px;
    z-index: 1000;
}

.lang-toggle {
    background: #ffffff;
    color: #000000;
    border: 2px solid #e0dcd6;
    padding: 12px 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.lang-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

#auth-container {
    position: static;
    top: 25px;
    right: 100px;
    z-index: 1000;
}

.sign-link {
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
    background-color: #5d1c34;
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(93, 28, 52, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
}

.sign-link:hover {
    background-color: #a77e46;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(167, 126, 70, 0.3);
}

.profile{
    display:flex;
    align-items:center;
    gap:8px;

    position: static;

    background:#000;
    padding:10px 15px;
    border-radius:25px;
    cursor:pointer;
}


.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;
}

header {
    background-color: #5d1c34;
    text-align: center;
    box-shadow: 0 4px 20px rgba(93, 28, 52, 0.15);
    position: sticky;
    top: 0;
    z-index: 900;
    padding: 12px 0;
}

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

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

nav p {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

nav a {
    color: #ffffff;
    font-weight: 500;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #a77e46;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #a77e46;
}

.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;
}

.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) {
    .menu-toggle{
        display:flex;
        align-items:center;
        justify-content:center;
        position:fixed;
        top:15px;
        right:20px;
        width:50px;
        height:50px;
        font-size:34px;
        color:#fff;
        cursor:pointer;
        z-index:2000;
    }

    .language-switcher{
        position:fixed;
        top:15px;
        left:15px !important;
        right:auto !important;
        z-index:2000;
    }

    .lang-toggle{
        width:52px;
        height:52px;
        font-size:16px;
    }

    .top-actions{
        top:15px;
        right:90px;

        width:50px;
        height:50px;
    }

    .basket-icon{
        width:50px;
        height:50px;
        font-size:34px;
    }

    .sign-link{
        font-size:20px;
        padding:8px 18px;
    }

    header{
        padding:0;
    }

    header .container{
        height:80px;
    }

    header nav{
        position:absolute;
        top:80px;
        left:0;
        width:100%;
        background:#5d1c34;

        display:flex;
        justify-content:center;
        align-items:center;
        gap:22px;

        max-height:0;
        overflow:hidden;

        transition:.35s ease;
    }

    header nav.active{
        max-height:90px;
        padding:18px 0;
    }

    header nav p{
        margin:0;
    }

    header nav a{
        font-size:16px;
        white-space:nowrap;
    }
    /* 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 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;
    }
}

@media (max-width: 768px) {

    [dir="rtl"] .language-switcher{
        left:15px;
        right:auto;
    }

    /* Keep these identical to LTR */
    [dir="rtl"] #auth-container {
        right: 100px;
        left: auto;
    }
}