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

body{
    background-color: rgb(98, 22, 168);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  padding: 15px 20px;
  width: 100%;
  font-size: 18px;
}

.nav-container a{
    text-decoration: none;
    color: grey;
}

#company-image-logo{
    display: flex;
  align-items: center;
  gap: 8px;
     
}

#company-image-logo img{
    width: 40px;
    height: 40px;
}

#company-image-logo a {
  color: black;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
}

.cart-logo,
.wishlist-logo,
.account-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-right,.nav-left{
    gap: 25px;
}
.nav-right{
    flex-wrap: nowrap;
}

.nav-right img{
    width: 25px;
    height: 25px;
}

.account-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}
.account-dropdown a {
  margin-left: 12px;
}

.dropdown-menu {
   position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);

  background-color: white;
  min-width: 120px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 6px;

  z-index: 1000;


  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: all 0.2s ease;
}


.dropdown-menu a {
  display: block;
  padding: 10px;
  color: grey;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: #f0f0f0;
}

.account-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}


.cart-logo{
    display: flex;
    align-items: center;
    gap: 8px;
}

.wishlist-logo{
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-center {
  flex: 1;
  justify-content: center;
}

.nav-center input, button {
  border: 1px solid #ccc;
  outline: none;
  border-radius: 5px;
  font-size: 16px;
  padding: 8px 12px;
}


.nav-center button{
    color: white;
    background-color: #ff6b00;
}

.nav-center button:hover{
    background-color:  rgba(255, 106, 0, 0.803);
    cursor: pointer;
}

.product-categories {
  display: flex;
  flex-direction: column;
 justify-content: space-evenly;
 align-items: center;
 font-size: 18px;

  background-color:  #f8fafc;
  width: 300px;         
  padding: 20px;

  border-radius: 8px;
}

.product-categories p {

 
  text-align: center;
  padding: 10px 0;
  margin: 0;

  
}

.product-categories p:hover {

 
color: #ff6b00;
  cursor: pointer;

  
}

.category-item {
  width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #ddd;
}

.category-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.main-categories{
    display: flex;
    margin-top: 25px;
    justify-content: center;
   gap: 20px;
    
}

.advertisement-1 {
    position: relative;
    overflow: hidden;

    color: white;
    font-family: Arial, sans-serif;
    border-radius: 10px; 
    background-color: #ff6b00;
    width: 850px; 
    height: 550px;
}

.advertisement-1 img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;    
}



.main-categories-2{
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 10px;
}

.customer-service{
    
    width: 270px;
    height: 270px;
    
    display: flex;
  flex-direction: column;
 justify-content: space-evenly;
 align-items: center;
 font-size: 18px;

  background-color:  #f8fafc;
          
  padding: 20px;

  border-radius: 8px;
}

.customer-service p {
  
  text-align: center;
  padding: 10px 0;
  margin: 0;

  
}

.customer-service p:hover{
  color: #ff6b00;
  cursor: pointer;
}

.advertisement-2{
  background-color: #ff6b00;
   width: 270px;
   height: 270px;
   border-radius: 10px;
   position: relative;
   overflow: hidden;
    
}

.advertisement-2 img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;      
}



.customer-categories{
    margin-top: 20px;
    display: flex;
    justify-content: space-evenly;
    
}

.customer-categories-container{
    background-color: white;
    display: flex;
    align-items: center;
    border-radius: 10px;
    width: 320px;
    padding: 10px;
    font-size: 20px;
    gap: 8px;
    transition: ease-in-out;
    
}

.customer-categories img{
    width: 40px;
    height: 40px;
}

.customer-categories-container:hover{
     transform: scale(1.1);
     cursor: pointer;
}

.products{
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.product-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    background-color: #f8fafc;
    transition: ease-in-out;
    
    width: 100%;
    max-width: 250px;

    
    height: 400px;
}
.products img{
    width: 200px;
    height: 200px;
}
.products button{
    color: white;
    border: none;
    background-color: #ff6b00;
}
.products button:hover{
      background-color: rgba(255, 106, 0, 0.819);
      cursor: pointer;
}

.product-card:hover{
    border-radius: 10px;
    transform: scale(0.9);
    
   
}

.price{
    font-weight: bolder;
    font-size: 18px;
}

.product-name{
    color: gray;
    font-size: 16px;
}

.price-action{
    display: flex;
   
    gap: 25px;
    align-items: center;
}

.flash-message {
  width: 100%;
  max-width: 500px;
  margin: 20px auto 10px auto;
  padding: 12px 16px;
  border-radius: 8px;

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

  font-family: Arial, sans-serif;
  font-size: 14px;

  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.flash-success {
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}


.flash-error {
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}


.flash-warning {
  background-color: #fff3cd;
  color: #664d03;
  border: 1px solid #ffecb5;
}

.flash-close {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    
    width: 90%;
}
 .account-toggle {
  background: none;
  border: none;
  text-decoration: none;
  color: grey;

  cursor: pointer;
  padding: 0;
}

@media (max-width: 1024px) {

    .main-categories {
        flex-wrap: wrap;
    }

    .advertisement-1 {
        width: 100%;
        max-width: 850px;
        height: auto;
        aspect-ratio: 16/9;
    }

    .product-categories,
    .customer-service,
    .advertisement-2 {
        width: 100%;
        max-width: 400px;
    }

    .customer-categories {
        flex-wrap: wrap;
        gap: 15px;
    }

}

@media (max-width: 768px) {

    .nav-container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-left,
    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-center {
        width: 100%;
    }

    .nav-center form {
        width: 100%;
        display: flex;
    }

    .nav-center input {
        flex: 1;
    }

    .main-categories {
        flex-direction: column;
        align-items: center;
    }

    .product-categories,
    .customer-service,
    .advertisement-2,
    .advertisement-1 {
        width: 95%;
        max-width: none;
    }

    .customer-categories {
        flex-direction: column;
        align-items: center;
    }

    .customer-categories-container {
        width: 95%;
    }
      .account-dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .account-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

}

@media (max-width: 480px) {

    .product-card {
        width: 100%;
    }

    .price-action {
        flex-direction: column;
        gap: 10px;
    }

    .nav-container {
        font-size: 14px;
    }

}
