/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Spartan:wght@400;500;600;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Kablammo:MORF@7&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Oi&family=Pacifico&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Potta+One&family=Raleway:ital,wght@0,100..900;1,100..900&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Kablammo:MORF@7&family=Lexend:wght@100..900&family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Oi&family=Pacifico&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Potta+One&family=Raleway:ital,wght@0,100..900;1,100..900&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap');
/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 4rem;

  /*========== Colors ==========*/
  --first-color: 	hsl(0, 75%, 33%);
  --first-color-alt: hsl(129, 44%, 94%);
  --second-color: hsl(45, 65%, 90%);
  --title-color: hsl(115, 67%, 13%);
  --text-color: hsl(154, 13%, 32%);
  --text-color-light: hsl(60, 1%, 56%);
  --body-color: hsl(0, 0%, 100%);
  --container-color: hsl(0, 0%, 93%);
  --border-color: hsl(129, 36%, 85%);
  --border-color-alt: hsl(113, 15%, 90%);
  --btn-color: 	hsl(46, 75%, 81%);


  /*========== Font and typography ==========*/
  --body-font: "Lexend", sans-serif;
  --second-font: "Raleway" sans-serif;
  --big-font-size: 3.5rem;
  --h1-font-size: 2.75rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.75rem;
  --h4-font-size: 1.375rem;
  --large-font-size: 1.125rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.75rem;
  --tiny-font-size: 0.6875rem;

  /*========== Font weight ==========*/
  --weight-400: 400;
  --weight-500: 500;
  --weight-600: 600;
  --weight-700: 700;

  /*========== Transition ==========*/
  --transition: cubic-bezier(0, 0, 0.05, 1);
}

/* Responsive typography */
@media screen and (max-width: 1200px) {
  :root {
    --big-font-size: 2.25rem;
    --h1-font-size: 2rem;
    --h2-font-size: 1.375rem;
    --h3-font-size: 1.25rem;
    --h4-font-size: 1.125rem;
    --large-font-size: 1rem;
    --normal-font-size: 0.9375rem;
    --small-font-size: 0.8125rem;
    --smaller-font-size: 0.6875rem;
    --tiny-font-size: 0.625rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

input,
textarea,
body {
  color: var(--text-color);
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  font-weight: var(--weight-400);
}

body {
  background-color: var(--body-color);
}

h1,
h2,
h3,
h4 {
  font-family: var(--second-font);
  color: var(--title-color);
  font-weight: var(--weight-600);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

p {
  line-height: 1.5rem;
}

img {
  max-width: 100%;
}

button,
textarea,
input {
  background-color: transparent;
  border: none;
  outline: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 0.75rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.section {
  padding-block: 2rem;
}

.section--lg {
  padding-block: 4rem;
}

.section__title {
  font-size: var(--h4-font-size);
  margin-bottom: 1.5rem;
}

.section__title span {
  color: var(--first-color);
}

.form__input {
  border: 1px solid var(--border-color-alt);
  padding-inline: 1rem;
  height: 45px;
  font-size: var(--small-font-size);
  border-radius: 0.25rem;
  -webkit-border-radius: 0.25rem;
  -moz-border-radius: 0.25rem;
  -ms-border-radius: 0.25rem;
  -o-border-radius: 0.25rem;
}

.new__price {
  color: var(--first-color);
  font-weight: var(--weight-600);
}

.old__price {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  text-decoration: line-through;
}

.form {
  row-gap: 1rem;
}

.form__group {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.textarea {
  height: 200px;
  padding-block: 1rem;
  resize: none;
}


/*=============== HEADER & NAV ===============*/
.header__top {
  background-color: var(--first-color);
  border-bottom: 1px solid var(--first-color);
  padding-block: 0.875rem;
}

.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__contact span:first-child {
  margin-right: 2rem;
  color: #fefefe;
}

.header__contact span,
.header__alert-news,
.header__alert-top-action {
  font-size: var(--small-font-size);
}

.header__alert-news {
  color: #fefefe;
  font-weight: var(--weight-600);
}

.header__top-action {
  color: #fefefe;
}

.nav,
.nav__menu,
.nav__list,
.header__user-actions {
  display: flex;
  align-items: center;
}

.nav {
  height: calc(var(--header-height) + 2.5rem);
  justify-content: space-between;
  column-gap: 1rem;
}

.nav__logo-img {
  width: 120px;
}

.nav__menu {
  flex-grow: 1;
  margin-left: 2.5rem;
}

.nav__list {
  column-gap: 2.5rem;
  margin-right: auto;
}

.nav__link {
  color: var(--title-color);
  font-weight: var(--weight-700);
  transform: all 0.3s var(--transition);
  -webkit-transform: all 0.3s var(--transition);
  -moz-transform: all 0.3s var(--transition);
  -ms-transform: all 0.3s var(--transition);
  -o-transform: all 0.3s var(--transition);
}

.header__search {
  width: 340px;
  position: relative;
}

.header__search .form__input {
  width: 100%;
}

.search__btn {
  position: absolute;
  top: 24%;
  right: 1.25rem;
  cursor: pointer;
}

.header__user-actions {
  column-gap: 1.25rem;
}

.header__action-btn {
  position: relative;
}

.header__action-btn img {
  width: 24px;
}

.header__action-btn span.count {
  position: absolute;
  top: -0.625rem;
  right: -0.625rem;
  background-color: var(--first-color);
  color: var(--body-color);
  height: 18px;
  width: 18px;
  text-align: center;
  font-size: var(--tiny-font-size);
  line-height: 18px;
  border-radius: 50%;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  -o-border-radius: 50%;
}

.nav__menu-top,
.nav__toggle {
  display: none;
}

/* Active link */
.active-link,
.nav__link:hover {
  color: var(--first-color);
}


/*=============== BUTTONS ===============*/
.btn {
  display: inline-block;
  background-color: var(--first-color);
  border: 2px solid var(--first-color);
  color: var(--body-color);
  padding-inline: 1.75rem;
  /* padding: 0.75rem 1.75rem; */
  height: 49px;
  line-height: 43px;
  font-family: var(--second-font);
  font-size: var(--small-font-size);
  font-weight: var(--weight-700);
  border-radius: 0.25rem;
  -webkit-border-radius: 0.25rem;
  -moz-border-radius: 0.25rem;
  -ms-border-radius: 0.25rem;
  -o-border-radius: 0.25rem;
  transition: all 0.4s var(--transition);
  -webkit-transition: all 0.4s var(--transition);
  -moz-transition: all 0.4s var(--transition);
  -ms-transition: all 0.4s var(--transition);
  -o-transition: all 0.4s var(--transition);
  border-radius: 20px;
}

.btn:hover {
  background-color: transparent;
  color: var(--first-color);
}

.btn--md,
.btn--sm {
  font-family: var(--body-font);
}

.btn--md {
  height: 45px;
  line-height: 40px;
}

.btn--sm {
  height: 40px;
  line-height: 35px;
}

/*=============== CATEGORIES ===============*/

.flex {
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
}


/*=============== FOOTER ===============*/
.footer__container {
  grid-template-columns: 4.5fr repeat(2, 2fr) 3.5fr;
  padding-block: 2.5rem;
  margin: 0 100px;
  margin-top: 50px;
  
}

.footer__logo-img {
  width: 120px;
}

.footer__subtitle {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
  margin-block: 1.25rem 0.625rem;
}

.footer__description {
  margin-bottom: 0.25rem;
}

.footer__description span {
  font-weight: var(--weight-600);
}

.footer__social .footer__subtitle {
  margin-top: 1.875rem;
}

.footer__social-links {
  column-gap: 0.25rem;
}

.footer__social-icon {
  width: 20px;
  opacity: 0.7;
}

.footer__title {
  font-size: var(--large-font-size);
  margin-block: 1rem 1.25rem;
}

.footer__link {
  color: var(--title-color);
  font-size: var(--small-font-size);
  margin-bottom: 1rem;
  display: block;
  transition: all 0.3s var(--transition);
  -webkit-transition: all 0.3s var(--transition);
  -moz-transition: all 0.3s var(--transition);
  -ms-transition: all 0.3s var(--transition);
  -o-transition: all 0.3s var(--transition);
}

.footer__link:hover {
  color: var(--first-color);
  margin-left: 0.25rem;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-block: 1.25rem;
  border-top: 1px solid var(--border-color-alt);
}

.copyright,
.designer {
  color: var(--text-color-light);
  font-size: var(--small-font-size);
}

/*=============== BREADCRUMBS ===============*/
.breadcrumb {
  background-color: var(--container-color);
  padding-block: 1.5rem;
}

.breadcrumb__list {
  column-gap: 0.75rem;
}

.breadcrumb__link {
  color: var(--text-color);
  font-size: var(--small-font-size);
}

/*=============== CART ===============*/
/* Định dạng tiêu đề khung cho phần sản phẩm */
.giohang_title{
  color: var(--first-color);
  font-weight: bold;
  font-size: 24px;
  margin-top: 50px;
  text-align: center;
}

/* Thiết lập khung chứa toàn bộ trang */
.giohang{
  margin-top: 50px;
  margin: 0 250px;
}


/* Thiết lập khung cho phần sản phẩm trong giỏ hàng */
.w-r__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 0px;
 
  border-bottom: 1px solid #075309;
  margin-bottom: 15px;
  border-radius: 8px; /* Thêm viền bo tròn cho góc */
}

/* Thiết lập cho ảnh sản phẩm */
.w-r__img-wrap {
  width: 100px; /* Kích thước ảnh nhỏ */
  height: 100px; /* Kích thước ảnh nhỏ */
  margin-right: 15px;
}

.w-r__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px; /* Viền bo tròn cho ảnh sản phẩm */
}

/* Thông tin sản phẩm */
.w-r__info {
  flex: 1;
}

/* Tên sản phẩm */
.w-r__name {
  font-size: 1.1rem;
  color: var(--title-color);
  font-weight: bold;
  margin-bottom: 5px;
}

/* Chi tiết sản phẩm: danh mục và biến thể */
.w-r__details {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.w-r__category {
  font-size: 0.8rem;
  color: var(--text-color);
}

.w-r__variant {
  font-size: 0.8rem;
  color: var(--text-color-light);
}

/* Giá sản phẩm và giảm giá nằm trên các dòng riêng biệt */
.w-r__price-wrapper {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 5px;
}

.w-r__price {
  font-size: 1rem;
  color: var(--first-color);
}

.w-r__discount {
  font-size: 1rem;
  color: var(--text-color-light);
  text-decoration: line-through;
}

/* Khung bao quanh nút hành động */
.w-r__wrap-2 {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 10px; /* Thêm khoảng cách giữa giá và các nút hành động */
}

.w-r__link {
  font-family: var(--body-font); 
  font-size: 14px;               
  font-weight: 500;              
  background-color: var(--first-color);
  color: #fefefe;
  border: 1px solid;
  padding: 15px 20px;            
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* Hiệu ứng hover */
.w-r__link:hover {
  background-color: transparent;
  color: var(--first-color);
}

/* Các nút hành động trong giỏ hàng */
.cart__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Dấu phân cách giữa các phần trong giỏ hàng */
.divider {
  position: relative;
  text-align: center;
  margin-block: 3rem;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 2px solid var(--border-color-alt);
  z-index: -1;
}

.divider i {
  color: var(--text-color-light);
  background-color: var(--body-color);
  font-size: 1.5rem;
  padding-inline: 1.25rem;
}

/* Nhóm các sản phẩm trong giỏ hàng */
.cart__group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: flex-start;
}

.cart__shipping .section__title,
.cart__coupon .section__title,
.cart__total .section__title {
  margin-bottom: 1rem;
}

.cart__coupon {
  margin-top: 3rem;
}

.coupon__form .form__group {
  align-items: center;
}

/* Tổng giá trị giỏ hàng */
.cart__total {
  border: 1px solid var(--border-color-alt);
  padding: 1.75rem;
  border-radius: 0.25rem;
}

.cart__total-table {
  margin-bottom: 1rem;
}

.cart__total-table tr td {
  border: 1px solid var(--border-color-alt);
  padding: 0.75rem 0.5rem;
  width: 50%;
}

.cart__total-title {
  font-size: var(--small-font-size);
}

.cart__total-price {
  font-size: 1rem;
  color: var(--first-color);
  font-weight: 700;
  white-space: nowrap;
}

.cart__total-table tr td:last-child .cart__total-price {
  font-size: 1.1rem;
  color: #000;
  font-weight: bold;
}

.cart__total-price::after {
  content: "₫";
}

/* Nút trong tổng giỏ hàng */
.cart__total .btn {
  display: inline-flex;
}

/* Điều khiển số lượng sản phẩm */
.quantity-control {
  
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #9E2A2F;
  background-color: rgb(255, 255, 255);
  border-radius: 50px;
  padding: 5px 0px;
  font-size: 16px;
  width: 120px;
}

.quantity-btn {
 
  border: none;
  background-color: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  width: 30px;
  height: 30px;
}

/* Responsive cho các thiết bị di động */

/* Điều chỉnh cho các thiết bị có màn hình nhỏ hơn hoặc bằng 768px (tablet, điện thoại lớn) */
/* Responsive cho màn hình dưới 768px */
@media (max-width: 768px) {
  .giohang {
    margin: 0 10px;
  }

  .giohang_title {
    font-size: 18px;
    margin-top: 20px;
  }

  .w-r__container {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    gap: 15px;
  }

  .w-r__img-wrap {
    width: 80px;
    height: 80px;
    margin: 0 auto;
  }

  .w-r__info {
    width: 100%;
    text-align: center;
  }

  .w-r__name {
    font-size: 16px;
  }

  .w-r__details {
    justify-content: center;
    gap: 5px;
  }

  .w-r__price-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .w-r__wrap-2 {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    text-align: center;
  }

  .quantity-control {
    width: 100%;
    justify-content: space-between;
    padding: 5px;
  }

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

  .divider {
    margin-block: 2rem;
  }

  .cart__group {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cart__total {
    padding: 15px;
    font-size: 14px;
  }

  .cart__total-table tr td {
    padding: 5px;
  }

  .cart__total-price {
    font-size: 16px;
  }

  .cart__total .btn {
    width: 100%;
    justify-content: center;
  }
  .quantity-control {
    width: 110px;
    margin: auto;
    padding: 5px;
    font-size: 14px;
  }
}

/* Điều chỉnh cho các thiết bị có màn hình nhỏ hơn hoặc bằng 480px (điện thoại nhỏ) */
@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 15px;
  }

  .w-r__container {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .w-r__img-wrap {
    width: 60px;
    height: 60px;
  }

  .cart__group {
    grid-template-columns: 1fr;
  }

  .cart__total {
    padding: 1.5rem;
  }
}
