/*---------------------------- Typography ----------------------------*/

/*
fontfamily: Poppins,sans-serif
font-weight:600/700 ---> titles
font-weight:400 ---> Body
small-text:0.9 rem  
 */

/* ---------------------- Color Style ---------------------------- */

/*
Background: Light (#F2F2F2 or #FBFBFB).

Cards / Sections: White (#FFFFFF) with subtle shadow.

Text: Mostly dark (#000000, #333333), gray (#666666) for secondary info.

Buttons: Black background (#000000) with white text — hover: lighter shade (#333333).

Navbar/Footer: Dark (#000000 or #333333) with light text.
 */
:root {
  --black-900: #000;
  --black-800: #333;
  --black-700: #4d4d4d;
  --black-600: #666;
  --black-500: #808080;
  --black-400: #999;
  --black-300: #b3b3b3;
  --black-200: #cccccc;
  --black-100: #e6e6e6;
  --black-50: #f2f2f2;
  --black-25: #fbfbfb;

  --accent-yellow: #ffc107;
  --accent-red: #ff6b6b;
}

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

html {
  font-size: 10px;
}

body {
  color: var(--black-900);
  font-family: "Poppins", sans-serif;
  background-color: var(--black-25);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  flex: 1;
}

h1 {
  font-size: 6.2rem;
  font-weight: 700;
}

h2 {
  font-size: 4rem;
  font-weight: 700;
  color: var(--black-800);
  margin-bottom: 3rem;
}

h3 {
  font-size: 3.2rem;
  font-weight: 600;
}

h4 {
  font-size: 2.4rem;
  font-weight: 500;
}

p {
  font-size: 1.6rem;
}

a {
  text-decoration: none;
}

ul,
li {
  list-style: none;
}

span {
  font-weight: 600;
  color: var(--black-900);
}

header {
  background-color: var(--black-50);
  padding: 1rem 7rem;
  height: 8vh;
}

/* ----------------------------- SECTIONS ----------------------------- */
/* -------------- Navbar Section ------------ */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.navbar-left .logo a {
  font-weight: 700;
  color: var(--black-800);
  font-size: 2rem;
}

.nav-links ul {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--black-800);
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 1.5rem;
  transition: background 0.3s;
  border-radius: 2rem;
}

.nav-links a:hover {
  background-color: var(--black-100);
}

.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2rem;
}

.navbar-search {
  background-color: var(--black-100);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0.5rem;
}

.navbar-search input {
  flex: 1;
  border: none;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  background-color: var(--black-100);
  min-width: 40rem;
}

.navbar-search input:focus {
  outline: none;
}

.navbar-search img {
  width: 1.5rem;
  height: 1.5rem;
}

.icons ul {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.icons li {
  position: relative;
}

.icons img {
  width: 2rem;
  height: 2rem;
}

.counter {
  position: absolute;
  top: -9px;
  right: -12px;
  background: var(--accent-red);
  color: white;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}

/* ============================================================================================================================================ */
/* ----------------------------- HERO SECTION ----------------------------- */
.hero-section {
  width: 100%;
  height: 92vh;
  margin-bottom: 20px;
  position: relative;
}

.hero-section img {
  width: 100%;
  height: 92vh;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: var(--black-900);
  max-width: 500px;
}

.hero-text h1 {
  margin-bottom: 1rem;
}

.hero-text h2 {
  margin-bottom: 2rem;
  color: var(--black-800);
}

.hero-text button {
  padding: 1rem 2rem;
  background-color: var(--black-100);
  color: var(--black-800);
  cursor: pointer;
  font-size: 2rem;
  border-radius: 0.5rem;
  transition: transform 0.3s ease;
}

.hero-text button:hover,
.hero-text button:active {
  background-color: var(--black-200);
  transform: scale(1.05);
}
/* ============================================================================================================================================ */
/*------------------------------------------- Category Section--------------------------------------------------- */
.category-section {
  margin: 0 10%;
  padding: 4rem 0;
}

.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.category-card {
  display: flex;
  align-items: center;
  padding: 2.5rem;
  background-color: white;
  border-radius: 1.5rem;
  cursor: pointer;
  transition: all 0.6s ease;
  border-left: 4px solid var(--black-100);
  box-shadow: 0px 2px 15px rgb(0, 0, 0, 0.04);
}

.category-card:hover {
  border-left-color: var(--black-900);
  transform: translate(1rem);
  /* moving to the right */
  box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.1);
}

.category-card img {
  width: 100px;
  height: 100px;
  margin-right: 2.5rem;
  transition: all 0.6s ease;
}

.category-card:hover img {
  transform: rotate(15deg) scale(1.1);
}

.category-card h4 {
  font-weight: 600;
  color: var(--black-700);
}


/* ================================================================================================= */
/* Best Seller Section and product card */
.bestseller-section {
  margin: 0 10%;
  padding: 4rem 0;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.product-card {
  background-color: var(--black-50);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0px 3px 10px rgb(0, 0, 0, 0, 0.05);
  transition: all 0.6s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* product-badge */
.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: #ff6b6b;
  color: white;
  border-radius: 1rem;
  padding: 0.8rem 1.6rem;
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 2;
}

.product-image-container {
  width: 100%;
  height: 20rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  background-color: var(--black-25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
  padding: 1rem;
}

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

.product-title {
  font-size: 1.6rem;
  color: var(--black-800);
  margin-bottom: 0.5rem;
  line-height: 1.2;
  overflow: hidden;
  height: 3.6rem;
}

.product-category {
  font-size: 1.2rem;
  color: var(--black-600);
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.product-rating {
  display: flex;
  align-items: center;
  margin: 1rem;
  gap: 0.5rem;
}

.rating-stars {
  font-size: 2rem;
}

.rating-value {
  font-size: 1.8rem;
  color: var(--black-600);
  font-weight: 500;
}

.product-card-price {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: 3rem;
}

.product-price-final {
  font-size: 2rem;
  font-weight: 700;
  color: var(--black-900);
}

.product-card-previous-price {
  text-decoration: line-through;
  font-size: 2rem;
  color: var(--black-700);
  font-weight: 400;
}

.product-card-discount {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--accent-red);
  border-radius: 1rem;
  padding: 0.5rem 1rem;
}

.product-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
}

.btn-favorite {
  background-color: white;
  border: 1px solid var(--black-200);
  border-radius: 0.5rem;
  padding: 0.8rem;
  cursor: pointer;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  transition: all 0.6s ease;
}

.btn-favorite img {
  width: 2rem;
  height: 2rem;
  transition: all 0.6s ease;
}

.btn-favorite:hover,
.btn-favorite.active {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
  transform: scale(1.1);
}

.btn-favorite:hover img,
.btn-favorite.active img {
  filter: brightness(0) invert(1);
}

.btn-add-to-cart {
  flex: 1;
  background-color: var(--black-900);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.8rem 1.6rem;
  font: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.6s ease;
}

.btn-add-to-cart:hover {
  background-color: var(--black-800);
  transform: translateY(-2px);
}

.view-more-container {
  text-align: center;
}

.view-more-btn {
  background-color: var(--black-900);
  color: white;
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.4rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.view-more-btn:hover {
  background-color: var(--black-800);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===================================================================================== */
/* Filter and Sorting  */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--black-100);
  border-bottom: 1px solid var(--black-400);
  margin-bottom: 2rem;
  height: 7vh;
  margin-top: 2rem;
}

.sort-options label {
  margin-right: 1rem;
  font-weight: 600;
  font-size: 1.5rem;
}

#sort-select {
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--black-300);
  border-radius: 1rem;
  background-color: var(--black-25);
  color: var(--black-800);
}

.products-main-container {
  display: flex;
  gap: 2rem;
  padding: 0 2rem;
  min-height: 60vh;
}

.filters-sidebar {
  width: 30rem;
  flex-shrink: 0;
  padding: 0;
  background-color: var(--black-50);
  border-radius: 8px;
  height: fit-content;
  border: 1px solid var(--black-200);
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--black-200);
  background-color: var(--black-25);
  border-radius: 1rem;
}

.filter-header h3 {
  margin: 0;
  color: var(--black-900);
  font-size: 1.8rem;
}

.filter-buttons {
  display: flex;
  gap: 1.5rem;
}

.filter-buttons button {
  padding: 0.8rem 1.6rem;
  border-radius: 0.8rem;
  cursor: pointer;
  border: none;
  font-size: 1.4rem;
  font-weight: 500;
  transition: all 0.6s ease;
}

#apply-filters {
  background-color: var(--black-800);
  color: var(--black-25);
}

#apply-filters:hover {
  background-color: var(--black-900);
}

#clear-filters {
  background-color: var(--accent-red);
  color: var(--black-25);
}

#clear-filters:hover {
  background-color: #E56060;
}

.filter-content {
  padding: 2rem;
}

.filter-group {
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  padding: 0 2rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group h4 {
  margin-bottom: 12px;
  color: var(--black-700);
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group label {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0.5rem 0;
  color: var(--black-800);
}

.filter-group input {
  margin-right: 10px;
  cursor: pointer;
}

.filter-group input[type="checkbox"] {
  transform: scale(1.1);
}

.products-section {
  flex-grow: 1;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 4rem 0;
  padding: 2rem;
}

.page-btn {
  padding: 8px 16px;
  border: 1px solid var(--black-200);
  background-color: var(--black-25);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  color: var(--black-800);
}

.page-btn:hover:not(:disabled) {
  background-color: var(--black-100);
  border-color: var(--black-800);
}

.page-btn:disabled {
  color: var(--black-500);
  cursor: not-allowed;
  opacity: 0.6;
}

.page-numbers {
  display: flex;
  gap: 5px;
}

.page-number {
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--black-200);
  background-color: var(--black-25);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.4rem;
  transition: all 0.3s ease;
  color: var(--black-800);
}

.page-number.active {
  background-color: var(--black-800);
  color: var(--black-25);
  border-color: var(--black-800);
}

.page-number:hover:not(.active) {
  background-color: var(--black-100);
  border-color: var(--black-800);
}

.product-count {
  font-size: 14px;
  color: var(--black-600);
}

/* proudcts.html */
@media (max-width: 768px) {
  .products-main-container {
    flex-direction: column;
    padding: 0 10px;
  }

  .filters-sidebar {
    width: 100%;
    order: 2;
  }

  .products-section {
    order: 1;
  }

  .sort-bar {
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
  }

  .sort-options select{
    font-size: 1.1rem;
  }

  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .filter-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .filter-buttons {
    width: 100%;
  }

  .filter-buttons button {
    flex: 1;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .products-container {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
  .filter-content {
    padding: 15px;
  }
}

/* ===================================================================================== */
/* -------------------------------------- Footer Section ------------------------------------ */
.footer {
  background-color: #1c1c1c;
  padding: 4rem 10%;
  font-size: 1.4rem;
  color: #ccc;
}

.footer a {
  color: var(--black-300);
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fff;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-column {
  flex: 1 1 180px;
}

.footer-column h3 {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-column h4 {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-column p {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-column ul li {
  margin-bottom: 0.8rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--black-800);
  padding-top: 2rem;
}

.social-icons a {
  margin-left: 1rem;
}

.social-icons img {
  width: 2rem;
  filter: brightness(0) invert(1);
  transition: all 0.3s ease;
}

.social-icons img:hover {
  transform: scale(1.2);
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px;
  display: none;
  z-index: 9999;
  font-size: 1.4rem;
}

.toast.show {
  display: block;
  animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    display: none;
  }
}
/* ============================================================================================================================================ */
/* ---------------- PRODUCT PAGE ---------------- */
.product-page-container {
  background-color: var(--black-25);
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.product-page {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 3rem;
  padding: 3rem;
  background-color: var(--black-50);
  border-radius: 1.2rem;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--black-100);
}

.product-page-images {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
}

.product-main-image-container {
  width: 100%;
  max-width: 55rem;
  border-radius: 0.8rem;
  background-color: var(--black-25);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--black-200);
}

.product-page-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-page-thumb {
  display: flex;
  width: 100%;
  max-width: 10rem;
  overflow: hidden;
  margin: 0 auto;
  gap: 1rem;
}

.product-page-thumb img {
  height: 100%;
  width: 100%;
  background-color: var(--black-25);
  object-fit: contain;
  border: 1px solid var(--black-200);
  border-radius: 0.8rem;
  transition: border 0.6s ease;
}

.product-page-thumb img:hover {
  border: 1px solid var(--black-400);
}

/* Info(Title,Rating) */
.product-page-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.product-page-title {
  margin-bottom: 0px;
  color: var(--black-900);
}

.product-page-rating p {
  color: var(--black-700);
}

/* Price */
.product-page-price {
  padding: 2rem 1rem;
  border-top: 1px solid var(--black-600);
  border-bottom: 1px solid var(--black-600);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.product-page-main-price {
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--black-900);
}

.product-page-previous-price {
  text-decoration: line-through;
  font-size: 2.8rem;
  color: var(--black-700);
  font-weight: 400;
}

.product-page-main-discount {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  background-color: var(--accent-red);
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.2);
}

.product-page-feature {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-direction: column;
}

.product-feature {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--black-25);
  border-radius: 0.8rem;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--black-200);
  width: auto;
  height: 7rem;
  padding: 1rem 2rem;
  transition: all 0.4s ease;
}

.product-feature:hover {
  border-color: var(--black-400);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.08);
  transform: scale(1.05);
}

.product-feature img {
  height: 70%;
  width: auto;
  object-fit: contain;
  transition: all 0.4s ease;
}

.product-feature:hover img {
  transform: rotate(360deg);
}

.product-feature p {
  color: var(--black-700);
}

.product-page-action {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Details */
.product-page-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background-color: var(--black-50);
  border-radius: 1rem;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--black-100);
}

.product-page-details h3 {
  font-size: 2.4rem;
  margin-bottom: 2rem;
  line-height: 1.1;
}

.product-page-details p {
  line-height: 1.6;
  color: var(--black-700);
  margin-bottom: 2rem;
}

.product-page-details ul li {
  font-size: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--black-200);
  color: var(--black-700);
}

.product-page-details ul li:last-child {
  border-bottom: none;
}

.product-page-reviews {
  background-color: var(--black-50);
  border: 1px solid var(--black-100);
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 0.8rem;
  padding: 2rem;
  margin-bottom: 1rem;
}

.product-page-reviews h3 {
  font-size: 2.4rem;
  margin-bottom: 1.5rem;
}

.product-review {
  border-left: 4px solid var(--black-800);
  margin-bottom: 2rem;
  border-radius: 1rem;
  padding: 1.5rem;
  background-color: var(--black-25);
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
}

.product-review:hover {
  transform: translateX(1rem);
  box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.1);
}

.review-rating {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.review-comment {
  font-size: 2rem;
  color: var(--black-800);
  margin-bottom: 1rem;
}

.product-review small {
  font-size: 1.5rem;
  color: var(--black-700);
}

/* Responsive for productPage*/
@media (max-width: 768px) {
  .product-page {
    flex-direction: column;
  }

  .product-page-action {
    flex-direction: column;
  }

  .btn-favorite {
    width: 18%;

  }

  .social-icons {
    margin-top: 1rem;
  }
}

/* ============================================================================================================================================ */
/* Cart css */
.cart-main {
  max-width: 120rem;
  margin: 0 auto;
  padding: 4rem 2rem;
  min-height: 60vh;
}

.cart-container {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.cart-left-side {
  flex: 1;
  background-color: var(--black-50);
  border-radius: 1.2rem;
  padding: 3rem;
  min-height: 50rem;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--black-400);
}

.cart-header h1 {
  color: var(--black-900);
  margin: 0;
  font-size: 3rem;
}

.cart-item-counter {
  color: var(--black-600);
  font-size: 1.6rem;
}

.cart-items {
  min-height: 40rem;
  max-height: 60rem;
  overflow-y: auto;
  padding-right: 1rem;
}

/* ======================================= */
.empty-card {
  text-align: center;
  padding: 6rem 1rem;
}

.empty-card img {
  width: 12rem;
  height: 12rem;
  margin-bottom: 2rem;
  opacity: 0.6;
}

.empty-card h3 {
  color: var(--black-700);
  margin-bottom: 1.5rem;
  font-size: 2rem;
}

.empty-card p {
  color: var(--black-500);
  margin-bottom: 2rem;
  font-size: 1.6rem;
}

.cart-shop-btn {
  background-color: var(--black-800);
  padding: 1rem 2rem;
  border-radius: 1rem;
  font-size: 1.6rem;
  color: var(--black-25);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  display: inline-block;
}

.cart-shop-btn:hover {
  background: var(--black-900);
  transform: translateY(-2px);
}

/* Not empty style */
.cart-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid var(--black-200);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--black-800);
  font-size: 1.6rem;
  line-height: 1.3;
}

.cart-item-category {
  color: var(--black-500);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  text-transform: capitalize;
}

.cart-item-price {
  font-weight: 700;
  color: var(--black-900);
  margin-bottom: 1.2rem;
  font-size: 1.8rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--black-50);
  border-radius: 0.6rem;
  padding: 0.6rem;
}

.quantity-btn {
  background: var(--black-200);
  border: none;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease;
}

.quantity-btn:hover {
  background: var(--black-300);
}

.quantity {
  font-weight: 600;
  min-width: 3rem;
  text-align: center;
  color: var(--black-800);
}

.remove-btn {
  background: var(--accent-red);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 1rem;
  cursor: pointer;
  font-size: 1.4rem;
  font-weight: 500;
  transition: background 0.2s ease;
}

.remove-btn:hover {
  background: #ff5252;
}

.cart-right-side {
  position: sticky;
  top: 3rem;
  flex-shrink: 0;
}

.order-summary {
  background-color: var(--black-50);
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;

}

.order-summary h2 {
  margin-bottom: 2rem;
  color: var(--black-900);
  font-size: 3rem;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--black-200);
}

.summary-details {
  margin-bottom: 2.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--black-200);
}

.summary-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.order-total-header {
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.summary-row.order-total-header {
  border-bottom: none;
  font-size: 1.5rem;
  font-weight: 700;
}

.btn-checkout {
  width: 100%;
  background-color: var(--black-800);
  padding: 1.2rem 1.6rem;
  color: var(--black-25);
  border-radius: 1rem;
  font-size: 1.6rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 2rem;
  border: none;
  transition: all 0.3s ease;
}

.btn-checkout-hover:not(:disabled) {
  background: var(--black-900);
  transform: translateY(-2px);
}

.btn-checkout:disabled {
  background: var(--black-400);
  cursor: not-allowed;
  transform: none;
}

.order-summary a {
  display: block;
  text-align: center;
  color: var(--black-600);
  font-size: 1.5rem;
  transition: color 0.3s ease;
  font-weight: 500;
}

.order-summary a:hover {
  color: var(--black-900)
}

/* Reponsive design for the cart */
@media (max-width:986px) {
  .cart-container {
    flex-direction: column;
    gap: 3rem;
  }

  .cart-right-side {
    position: static;
    width: 100%;
  }

  .order-summary {
    width: 100%;
  }
}

@media (max-width:768px) {
  .cart-main {
    padding: 2rem 1.5rem;
  }

  .cart-left-side,
  .order-summary {
    padding: 20px;
  }

  .cart-item {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .cart-item-controls {
    justify-content: center;
  }

  .cart-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cart-item-controls {
    flex-direction: column;
    gap: 10px;
  }

  .quantity-controls {
    align-self: center;
  }

  .cart-right-side {
    width: 100%;
  }
}
/* ================================================================================================= */
/* Check out Page */
.checkout-main {
  max-width: 120rem;
  margin: 0 auto;
  padding: 4rem 2rem;
  min-height: 60vh;
}

.checkout-container {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.checkout-left-side {
  flex: 1;
  background-color: var(--black-50);
  border-radius: 1rem;
  padding: 3rem;
}

.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--black-400);
}

.checkout-header h1 {
  color: var(--black-900);
  margin: 0;
  font-size: 3rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-group label {
  font-size: 600;
  font-size: 1.6rem;
  color: var(--black-800);
}

.form-group input {
  padding: 1rem 2rem;
  border: 1px solid var(--black-400);
  border-radius: 1rem;
  font-size: 1.6rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  border-color: var(--black-800);
}

.form-group input.error {
  border-color: var(--accent-red);
}

.error-message {
  color: var(--accent-red);
  font-size: 1.4rem;
  display: none;
}

.error-message.show {
  display: block;
}

.checkout-right-side {
  position: sticky;
  top: 3rem;
  flex-shrink: 0;
  width: 30rem;
}

.order-summary-checkout {
  background-color: var(--black-50);
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%;
}

.order-summary-checkout h2 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--black-200);
  font-size: 3rem;
  text-align: center;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--black-200);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-item-name {
  font-weight: 600;
  color: var(--black-800);
  font-size: 1.4rem;
}

.order-item-details {
  color: var(--black-600);
  font-size: 1.2rem;
}

.order-item-price {
  font-weight: 600;
  color: var(--black-900);
  font-size: 1.4rem;
}

.btn-place-order {
  width: 100%;
  background-color: var(--black-800);
  padding: 1.2rem 2rem;
  color: var(--black-25);
  font-weight: 600;
  border-radius: 1rem;
  cursor: pointer;
  margin-bottom: 2rem;
  border: none;
  transition: all 0.3s ease;
  font-size: 1.6rem;
}

.btn-place-order:hover:not(:disabled) {
  background-color: var(--black-900);
  transform: translateY(-2px);
}

.btn-place-order:disabled {
  cursor: not-allowed;
  background-color: var(--black-400);
  transform: none;
}

.btn-back-cart {
  width: 40%;
  font-size: 1.3rem;
  border-radius: 1rem;
  background-color: var(--black-500);
  color: var(--black-25);
  padding: 0.5rem 1rem;
  font-weight: 400px;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.success-message {
  text-align: center;
  padding: 4rem 2rem;
  display: none;
}

.success-message.show {
  display: block;
}

.success-message img {
  width: 8rem;
  height: 8rem;
  margin-bottom: 2rem;
}

.success-message h2 {
  color: var(--black-900);
  margin-bottom: 1.5rem;
}

.success-message p {
  color: var(--black-700);
  margin-bottom: 2rem;
  font-size: 1.6rem;
}

.btn-continue-shopping {
  padding: 1rem 2rem;
  background-color: var(--black-800);
  border-radius: 1rem;
  font-size: 1.6rem;
  color: var(--black-25);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  display: inline-block;
}

.btn-continue-shopping:hover {
  background-color: var(--black-900);
  transform: translateY(-2px);
}

@media(max-width:985px) {
  .checkout-container {
    flex-direction: column;
    gap: 2rem;
  }

  .checkout-right-side {
    position: static;
    width: 100%;
  }

  .order-summary-checkout {
    width: 100%;
  }
}

@media(max-width: 768px) {
  .checkout-main {
    padding: 2rem 1.5rem;
  }

  .checkout-left-side,
  .order-summary-checkout {
    padding: 2rem;
  }
}

/* ============================================================================ */
/* Favourite */
.favorites-main {
  max-width: 120rem;
  margin: 0 auto;
  padding: 2rem;
}

.favorites-container {
  background-color: var(--black-100);
  border-radius: 2rem;
  padding: 2rem;
}

.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
}

.favorites-header h1 {
  color: var(--black-900);
  margin: 0;
  font-size: 2.5rem;
}

.favorites-count {
  color: var(--black-600);
  font-size: 1.6rem;
}

#favorites-items {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: flex-start;
}

#favorites-items .product-card {
  background-color: var(--black-25);
  border-radius: 1rem;
  padding: 1.5rem;
  flex-shrink: 0;
  border: 1px solid var(--black-200);
  box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.05);
  width: 25rem;
}

.empty-favorites {
  text-align: center;
  padding: 4rem 1rem;
  width: 100%;
}

.empty-favorites img {
  width: 100px;
  height: 100px;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-favorites h3 {
  color: var(--black-700);
  margin-bottom: 1rem;
}

.empty-favorites p {
  color: var(--black-500);
  margin-bottom: 2rem;
}

.shop-btn {
  background: var(--black-800);
  padding: 0.8rem 1.5rem;
  border-radius: 1rem;
  color: var(--black-25);
  font-weight: 600;
  font-size: 1.5rem;
  transition:  all 0.3s ease;
  display: inline-block;
}
.shop-btn:hover{
  transform: translateY(-2px) scale(1.02);
  background-color: var(--black-900);
}
@media(max-width:768px){
  #favorites-items .product-card {
    width: 100%;
  }
  .empty-favorites{
    text-align: center;
    padding: 4rem 1rem;
    width: 100%;
  }
  .empty-favorites img{
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
  }
  .empty-favorites h3 ,.empty-favorites p{
    margin-bottom: 1rem;
  }
}

/* tablet range(768px - 1080px)*/ 
/* Search bar in desktop was 40rem now it will be 20-25 rem for tables (med screen) */
@media(min-width:768px) and (max-width:1080px){
  .navbar-search input{
    min-width: 20rem;
    max-width: 25rem;
  }
}

/* Mobile only less than 767px */
@media(max-width:767px){
  html{
    /* To fit mobile view and 
    since we are using rems so it's easy to change the font */
    font-size: 9px;
  }
  header{
    padding: 1rem;
    height: auto;
  }
  .nav-bar{
    /* in mobile view we will make the nav bar as stack */
    flex-direction: column;
    gap: 1.5rem;
  }
  .navbar-left{
    width: 100%;
    flex-direction: column;
    gap: 1.5rem;
  }
  .navbar-left .logo{
    text-align: center;
  }
  /* wiwth gap 0 we will build stack as blocks on each other */
  .nav-links ul{
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  .nav-links li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--black-200);
  }
  
  .nav-links li:last-child {
    border-bottom: none;
  }
  .nav-links a {
    /* so each block in the stack take the full width */
    display: block;
    padding: 1.2rem;
  }
  /* Right side navbar */
  .navbar-right{
    width: 100%;
    flex-direction: column;
    gap: 1.5rem;
  }
  .navbar-search{
    width: 100%;
  }
  .navbar-search input{
    /* overridding the old min-width above in normal case */
    min-width: 0;
    width: 100%;
  }
  .icons ul{
    justify-content: center;
  }
  /* Hero section Part */
  .hero-section{
    height: 50vh;
  }
  .hero-section img{
    height: 50vh;
  }
  .hero-text{
    /* centering the text on the img (bc the text is abs) */
    left: 50%;
    transform: translate(-50%,-50%);
    width: 85%;
    text-align: center;
  }
  /* Category,best seller section */
  .category-section,.bestseller-section{
    margin: 0 4%;
  }
  .categories{
    /* category will be only two cards */
    grid-template-columns: repeat(1,1fr);
    gap: 1.5rem;
  }
  /* Best seller same as category */
  .products-container{
    grid-template-columns: repeat(2,1fr);
    gap: 1.5rem;
  }
  /* Footer */
  /* Same as nav we will stack the footer */
  .footer-top{
    flex-direction: column;
    text-align: center;
  }
  .footer-bottom{
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .social-icons{
    justify-content: center;
  }
}

/* Very small phones  */
@media(max-width:479px){
  html{
    font-size: 8px;
  }
  .hero-text h1{
    font-size: 3.5rem;
  }
  .hero-text h2{
    font-size: 2rem;
  }
  .category-section,.bestseller-section{
    margin: 0 3%;
  }
  .categories{
    grid-template-columns: 1fr;
  }
  .products-container {
    grid-template-columns: 1fr;
  }
}