
:root {
  
  --primary-color: #5C5346;
  --accent-color: #B19D89;
  --background-color: #FBEAEF;
  --text-color: #333333;

  --header-footer-bg: rgba(255, 255, 255, 0.9);
  --footer-bg-color: #333333;
  --footer-text-color: #FFFFFF;

  --shadow-color: rgba(0, 0, 0, 0.1);

  --font-family-base: 'Arial', sans-serif;
  --font-family-logo: 'Playfair Display', serif;

  --header-height: 70px;
  --footer-height: 60px;

  --container-padding: 40px;
  --nav-gap: 30px;

  --breakpoint-md: 768px;
  --breakpoint-sm: 480px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--header-height); 
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}


   .header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--header-footer-bg);
    padding: 0 20px; 
    z-index: 1000;
    display: flex;
    justify-content: center; 
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.header .container {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-family-logo);
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: auto; 
}

.navbar {
    display: flex;
    align-items: center;
    gap: var(--nav-gap);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links li a {
    text-decoration: none;
    font-size: 16px;
    color: #555555;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.cart {
    display: flex;
    align-items: center;
    position: relative;
    font-size: 18px;
}

.cart a {
    text-decoration: none;
    color: #555555;
    position: relative;
    transition: color 0.3s ease;
}

.cart a:hover {
    color: var(--accent-color);
}

#cart-count {
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    padding: 2px 6px;
    position: absolute;
    top: -8px;
    right: -10px;
}


main h2 {
  text-align: center;
  font-family: var(--font-family-logo, serif); 
  font-size: 28px; 
  color: var(--primary-color, #5C5346);
  margin: 40px 0 20px 0; 
  letter-spacing: 1px; 
}

.search-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 auto 30px auto; 
}

.search-bar input {
  width: 50%;                
  max-width: 600px;          
  padding: 12px 20px;
  font-size: 16px;
  color: var(--text-color, #333);
  background-color: #fff;
  border: 1px solid #ccc;    
  border-radius: 6px;
  box-shadow: 0 2px 5px var(--shadow-color, rgba(0,0,0,0.1));
  outline: none;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.search-bar input:focus {
  border-color: var(--accent-color, #B19D89);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}



#products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 40px;
}

#products-container .product-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 5px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 10px;
  min-height: 280px; 
}

#products-container .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#products-container .product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

#products-container .product-card h3 {
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 4px;
  line-height: 1.2;
}

#products-container .product-card .price {
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 8px;
}

#products-container .product-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  line-height: 1.4;
}

#products-container .product-card .add-to-cart {
  display: inline-block;
  padding: 6px 12px;
  background-color: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#products-container .product-card .add-to-cart:hover {
  background-color: #A08872;
  transform: scale(1.03);
}

#products-container .product-card img {
  width: auto;          
  height: 120px;       
  object-fit: contain;  
  margin: 0 auto 10px;  
  border-radius: 4px;   
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}



   footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    padding: 2px var(--container-padding);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
    width: 100%;
}

footer .contact-info {
    font-size: 14px;
    margin-bottom: 10px;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.social-icons a {
    color: var(--footer-text-color);
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
}

footer p {
    font-size: 14px;
    margin-top: 10px;
}

@keyframes bounce-cart {
  0%   { transform: translateY(0); }
  20%  { transform: translateY(-10px); }
  40%  { transform: translateY(0); }
  60%  { transform: translateY(-5px); }
  80%  { transform: translateY(0); }
  100% { transform: translateY(0); }
}

.bounce-cart {
  animation: bounce-cart 0.6s ease;
}



@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }
 .logo {
  font-size: 24px; 
}

.header .container {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.nav-links li a {
  font-size: 12px;
  white-space: nowrap; 
}

.cart {
  margin-left: auto; 
  font-size: 16px; 
}

  #products-container {
    gap: 15px;
  }
  
  #products-container .product-card {
    min-height: 260px;
  }
   footer .container {
    flex-direction: row;
    justify-content: space-between;
  }
  footer .contact-info,
  .social-icons,
  footer p {
    flex: 1 1 auto;
    text-align: center;
    margin-right: 0;
  }
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 60px;
  }

 .logo {
  font-size: 20px;
}

.header .container {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px; 
  height: auto; 
}

.nav-links li a {
  font-size: 11px;
  white-space: nowrap;
}

.cart {
  margin-left: auto;
  font-size: 14px;
}

  #products-container {
    gap: 10px;
  }

  #products-container .product-card {
    min-height: 240px;
  }

  #products-container .product-card img {
    height: 120px;
  }

  footer .container {
    flex-direction: row;
    align-items:initial;
    height: 100px;
    
  }
  footer p {
    text-align: center;
    margin-top: 10px;
    font-size: 10px;
    margin: 0px;
  }
  footer .contact-info,
  .social-icons,
  footer p {
    flex: 1 1 100%;
    text-align: center;
    font-size: 10px;
    margin: 0px;
  }
  .social-icons {
    justify-content: center;
    size: 10px;
    margin: 0px;
  }
}
