@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap");

* {
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
body {
  font-family: "Open Sans", sans-serif;
}
/* ----------------------------------------------------- Header ----------------------------------------------------- */
/* Container */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Main Header */
.main-header {
  background-color: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Title */
.main-header h1 a {
  color: #2c3e50;
  text-decoration: none;
  font-size: 28px;
  font-weight: bold;
  transition: color 0.3s;
}

.main-header h1 a:hover {
  color: #007bff;
}

/* Username */
.header-user-name {
  font-size: 16px;
  color: #444;
  margin: 0 10px;
}

/* Login / Register */
.login-logout,
.logout-cart {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
}

.login-logout li a,
.logout-cart li {
  font-weight: 500;
  font-size: 16px;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.login-logout li a:hover,
.logout-cart li:hover {
  color: #007bff;
}

/* Cart Icon */
.cart-icon {
  position: relative;
}

.cart-icon .js-counter {
  position: absolute;
  top: -8px;
  right: -12px;
  background: red;
  color: white;
  font-size: 11px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
}

/* Dropdown products */
.selected-product {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  padding: 15px;
  z-index: 100;
  transition: 0.3s ease-in-out;
}

.logout-cart:hover .selected-product {
  display: block;
}

/* View All Button */
.view-all-products {
  display: block;
  text-align: center;
  color: #007bff;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 0;
}

.view-all-products:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .login-logout,
  .logout-cart {
    gap: 10px;
  }

  .main-header h1 {
    font-size: 22px;
  }

  .header-user-name {
    font-size: 14px;
  }
}

/* ----------------------------------------------------- selected products ----------------------------------------------------- */
.selected-product {
  position: absolute;
  top: 50px;
  right: 0;
  background-color: #fff;
  width: 320px;
  min-height: 200px;
  max-height: 500px;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 15px;
  z-index: 999;
  display: none;
}

.flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(128, 128, 128, 0.05);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  transition: background-color 0.3s ease;
}

.flex:hover {
  background-color: rgba(0, 128, 0, 0.05);
}

.selected-product span {
  flex-grow: 1;
  font-weight: 500;
  padding: 0 10px;
}

.selected-product i {
  background-color: #f0f0f0;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.selected-product i:hover {
  background-color: #e0e0e0;
}

/* View All Button */
.view-all-products {
  display: block;
  text-align: center;
  background-color: #28a745;
  color: #fff;
  font-weight: bold;
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.view-all-products:hover {
  background-color: #218838;
}

/* ----------------------------------------------------- Section Search ----------------------------------------------------- */
.section-search {
  background-color: #f9f9f9;
  padding: 30px;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
  margin: 30px auto;
  max-width: 800px;
}

.section-search select,
.section-search input {
  width: 250px;
  height: 40px;
  padding: 5px 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.section-search select:focus,
.section-search input:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* ----------------------------------------------------- Products ----------------------------------------------------- */
.products {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
  width: 90%;
  margin: 40px auto;
}

.product {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  padding: 20px;
  width: 280px;
  transition: 0.4s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.product img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.product-title {
  font-size: 20px;
  font-weight: 600;
  margin: 5px 0;
}

.product-price {
  font-size: 18px;
  color: #28a745;
  font-weight: bold;
}

.product-category {
  font-size: 14px;
  color: gray;
  margin-bottom: 15px;
}

.btn-icon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.btn-icon button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-icon button:hover {
  background-color: #0056b3;
}

.product i {
  font-size: 22px;
  color: #999;
  transition: color 0.3s;
}

.product i:hover {
  color: #ff5252;
}

/* ----------------------------------------------------- Login | Register ----------------------------------------------------- */

.section-form {
  background-color: #f9f9f9;
  padding: 30px;
  width: 80%;
  max-width: 700px;
  margin: 50px auto;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  font-family: "Segoe UI", sans-serif;
}

.section-form h2 {
  padding: 10px 0;
  margin-bottom: 25px;
  font-size: 32px;
  text-align: center;
  color: #333;
  border-bottom: 2px solid #007bff;
  display: inline-block;
}

.user-name {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.user-name div {
  flex: 1;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.3);
  outline: none;
}

input[type="submit"] {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  border: 0;
  cursor: pointer;
  background-color: #007bff;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  transition: background-color 0.3s ease-in-out;
}

input[type="submit"]:hover {
  background-color: #0056b3;
}

/* Responsive for mobile */
@media (max-width: 600px) {
  .user-name {
    flex-direction: column;
  }
}

/* -------------------Cart Style---------------------- */
.product-cart {
  display: flex;
  justify-content: start;
  align-items: center;
  /* width: 400px; */
  gap: 25px;
  padding: 18px;
  background-color: rgba(128, 128, 128, 0.1);
  border-radius: 10px;
  margin-top: 25px;
}
.btn-icon-cart span {
}
.btn-icon-cart i {
}
.btn-icon-cart button {
  background-color: red;
  border: 0;
  cursor: pointer;
  padding: 10px;
  padding: 8px;
  border-radius: 8px;
  margin-left: 90px;
}

/* Love */
.favorites {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.favorite-product {
  border: 1px solid gainsboro;
  border-radius: 10px;
  padding: 15px;
  margin: 10px;
  width: 300px;
}
.favorite-product img {
  display: block;
  margin: 0px auto;
  width: 100px;
  height: 100px;
  margin-bottom: 10px;
}
.category-heart {
  display: flex;
  justify-content: space-between;
}
.favorite-product i {
  font-size: 25px;
  color: red;
  cursor: pointer;
}

/* Footer */

.footer {
  width: 75%;
  margin: 0px auto;
  border-radius: 6px;
}

.footer .footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3.5rem;
  padding: 60px;
}

.footer-row .footer-col h4 {
  color: black;
  font-size: 1.2rem;
  font-weight: 400;
}

.footer-col .links {
  margin-top: 20px;
}

.footer-col .links li {
  list-style: none;
  margin-bottom: 10px;
}

.footer-col .links li a {
  text-decoration: none;
  color: black;
}

.footer-col .links li a:hover {
  color: #fff;
}

.footer-col p {
  margin: 20px 0;
  color: black;
  max-width: 300px;
}

.footer-col form {
  display: flex;
  gap: 5px;
}

.footer-col input {
  height: 40px;
  border-radius: 6px;
  background: none;
  width: 100%;
  outline: none;
  border: 1px solid #7489c6;
  caret-color: #fff;
  color: black;
  padding-left: 10px;
}

.footer-col input::placeholder {
  color: #ccc;
}

.footer-col form button {
  background: #fff;
  outline: none;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s ease;
}

.footer-col form button:hover {
  background: #cecccc;
}

.footer-col .icons {
  display: flex;
  margin-top: 30px;
  gap: 30px;
  cursor: pointer;
}

.footer-col .icons i {
  color: black;
}

.footer-col .icons i:hover {
  color: #fff;
}

/* @media (max-width: 768px) {
  .footer {
    position: relative;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
  }

  .footer .footer-row {
    padding: 20px;
    gap: 1rem;
  }

  .footer-col form {
    display: block;
  }

  .footer-col form :where(input, button) {
    width: 100%;
  }

  .footer-col form button {
    margin: 10px 0 0 0;
  }
} */
