/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Navbar */
.navbar {
    background-color:  #2A2B2D;
    display: flex;
    width: 100%;
    max-width: 1520px;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    height: 90px;
    box-shadow: 0 2px 5px rgba(42, 43, 45, 0.1);
    margin: 0 auto;
}

.navbar-container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.navbar-title {
    font-size: 32px;
    font-weight: bold;
    color:  #FFF5F7;
    flex-grow: 1;
    text-align: center;
}

.footer {
    background-color:  #2A2B2D;
    text-align: center;
    padding: 15px;
    width: 100%;
    margin-top: 40px;
    color: #FFF5F7;
    font-size: 16px;
    font-weight: bold;
}

/* Logo Styling */
.logo-container {
    width: 60px;
    height: 60px;
    background-color: #FFF5F7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 50px;
    font-weight: 600;
    color:  #2A2B2D;
    font-family: 'Times New Roman';
    display: flex;
    align-items: center;
}

.logo-link {
    text-decoration: none;
}

/* --- Custom Animated Back Button --- */
.back-button {
    display: block;
    position: absolute;
    top: 100px;
    left: 20px;
    width: 56px;
    height: 56px;
    background-color: transparent;
    cursor: pointer;
    border: 0;
    overflow: hidden;
    outline: none;
}

.back-button:before,
.back-button:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    inset: 7px;
}

.back-button:before {
    border: 4px solid #2A2B2D;
    transition: opacity 0.4s ease-in-out, transform 0.5s ease-in-out;
}

.back-button:after {
    border: 4px solid #2A2B2D;
    transform: scale(1.3);
    opacity: 0;
    transition: opacity 0.4s ease-in-out, transform 0.5s ease-in-out;
}

.back-button:hover:before {
    opacity: 0;
    transform: scale(0.7);
}

.back-button:hover:after {
    opacity: 1;
    transform: scale(1);
}

.button-box {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
}

.button-elem {
    display: block;
    width: 20px;
    height: 20px;
    margin: 17px 18px 0 18px;
    transform: rotate(180deg);
    fill: #4A403A;
}

.back-button:hover .button-box {
    transition: 0.4s;
    transform: translateX(-56px);
}



/* Subcategory Title */
#subcategory-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin: 25px 0;
  color: #4A403A;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

#subcategory-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background-color: #2A2B2D;
  margin: 8px auto 0;
}

/* Product Grid Layout */
#product-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 30px auto;
  max-width: 1400px;
  padding: 15px;
}

/* Product Card */
.product-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.12);
  padding: 18px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0px 8px 18px rgba(0, 0, 0, 0.18);
}

.product-card img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.product-card:hover img {
  transform: scale(1.05);
}

.product-card h4 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 12px;
  color: #4A403A;
}

.product-card p {
  font-size: 14px;
  color: #555;
  margin: 6px 0;
}

.product-card .price {
  font-size: 20px;
  font-weight: bold;
  color: #2A2B2D;
  margin-bottom: 10px;
}

.product-card .buy-btn {
  background-color: #4A403A;
  color: white;
  border: none;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 12px;
  width: 100%;
  transition: background 0.3s ease, transform 0.2s ease;
}

.product-card .buy-btn:hover {
  background-color: #520101;
  transform: scale(1.05);
}

/* Star rating */
.star-rating {
  font-size: 16px;
  color: #FF9900;
  margin-bottom: 5px;
}

/* Add to cart button */
.cart-button {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 35px;
  height: 35px;
  background-color: #ffd500   ;
  color: #ffffff;
  
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

.cart-button:hover {
  background-color: #ff9100  ;
}

/* 🛒 Icon Styling */
.add-to-cart-btn .cart-icon {
  font-size: 20px;
  color: #000000; /* Gunmetal Gray */
}




/* ----------------- Responsive for Mobile ----------------- */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 10px;
  }

  .logo-container {
    width: 45px;
    height: 45px;
  }

  .logo-text {
    font-size: 26px;
  }

  .navbar-title {
    font-size: 20px;
    margin-top: 8px;
  }

  #subcategory-title {
      font-size: 20px;
  }

  #product-container {
      grid-template-columns: 1fr;
      padding: 10px;
      gap: 20px;
  }

  .product-card img {
      height: 200px;
  }

  .product-card h4 {
      font-size: 18px;
  }

  .product-card p {
      font-size: 13px;
  }

  .product-card .price {
      font-size: 18px;
  }

  .product-card .buy-btn {
      font-size: 14px;
      padding: 10px;
  }

  .footer {
      padding: 20px;
      font-size: 14px;
  }

  .back-button {
    display: block;
    position: absolute;
    top: 80px;
    left: 15px;
    width: 56px;
    height: 56px;
    margin: 0;
    overflow: hidden;
    outline: none;
    background-color: transparent;
    cursor: pointer;
    border: 0;
  }
  
  .back-button:before,
  .back-button:after {
    content: "";
    position: absolute;
    border-radius: 50%;
    inset: 7px;
  }
  
  .back-button:before {
    border: 4px solid #4A403A;
    transition: opacity 0.4s ease-in-out, transform 0.5s ease-in-out;
  }
  
  .back-button:after {
    border: 4px solid #8C4A32;
    transform: scale(1.3);
    transition: opacity 0.4s ease-in-out, transform 0.5s ease-in-out;
    opacity: 0;
  }
  
  .back-button:hover:before {
    opacity: 0;
    transform: scale(0.7);
  }
  
  .back-button:hover:after {
    opacity: 1;
    transform: scale(1);
  }
  
  .button-box {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
  }
  
  .button-elem {
    display: block;
    width: 20px;
    height: 20px;
    margin: 17px 18px 0 18px;
    transform: rotate(180deg);
    fill: #4A403A;
  }
  
  .back-button:hover .button-box {
    transition: 0.4s;
    transform: translateX(-56px);
  }
}
