/* ===== Root Variables ===== */
:root {
  --color-primary: #ff6700;
  --color-primary-light: #ffe6cc;
  --color-primary-shadow: rgba(255, 103, 0, 0.3);
  --color-bg-light: #f9f9f9;
  --color-bg-dark: #2d2d2d;
  --color-text-light: #fff;
  --color-text-muted: #666;
  --color-text-muted-light: #ccc;
  --color-text-disabled: #aaa;
  --color-success: #66bb6a;
  --color-warning: #fbc02d;
  --color-shadow-dark: rgba(0, 0, 0, 0.15);
  --font-family-base: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --transition-speed: 0.3s;
}


/* ===== Global Reset & Container ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-light);
  color: #333;
  line-height: 1.5;
}


.container {
  width: 100vw;
  max-width: 100%;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}


/* ===== Logo Bar ===== */
.logo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background-color: #ebe9e9;
}


.logo-bar .logo {
  height: 36px;
  width: auto;
  transition: transform var(--transition-speed) ease;
}


.logo-bar .logo:hover {
  transform: scale(1.05);
}


.brand-name {
  font-size: 26px;
  font-weight: 700;
  color: #070000;
  user-select: none;
}


/* ===== Banner ===== */
.banner-container {
  position: relative;
  width: 100%;
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
  max-height: 600px;
  margin-bottom: 30px;
}


.banner-gif {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}


.banner-gif:hover {
  transform: scale(1.05);
}


.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}


.banner-text h1 {
  font-size: 100px;
  font-weight: 900;
  margin: 0;
  letter-spacing: 2px;
}


.banner-text p {
  font-size: 22px;
  margin-top: 8px;
  font-weight: 400;
  font-style: italic;
}


/* ===== Filter Tabs ===== */
.filter-bar {
   margin-top: 20px;
  margin: 0 0 30px;
  display: flex;
  gap: 24px;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 2px solid #eee;
  padding-bottom: 8px;
  justify-content: center;
}


.filter-bar .tab {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 24px;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}


.filter-bar .tab:hover {
  background-color: #f0f0f0;
  color: var(--color-primary);
  box-shadow: 0 4px 10px var(--color-primary-shadow);
}


.filter-bar .tab.active {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 4px 14px rgba(255, 103, 0, 0.5);
  font-weight: 700;
}


/* ===== Filter & Sort Form ===== */
.filter-sort-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 0;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  user-select: none;
  width: 100%;
}


.filter-sort-inner {
  width: 100%;
  padding: 0 20px;
}


/* Dòng lọc */
.filters-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) #f0f0f0;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}


.filters-label {
  font-weight: 700;
  font-size: 18px;
  color: var(--color-primary);
  margin-right: 12px;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}


.filters {
  display: flex;
  gap: 18px;
  flex-grow: 1;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
}


.filters::-webkit-scrollbar {
  height: 6px;
}


.filters::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}


.filters::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 3px;
}


.filters select {
  min-width: 140px;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 14px;
  border: 2px solid #ddd;
  background-color: #fafafa;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  color: #333;
  font-weight: 600;
  user-select: none;
}


.filters select:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 12px var(--color-primary-shadow);
  color: #b35e00;
}


.filters select:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 18px var(--color-primary-shadow);
  color: #8a3e00;
}


/* Dòng sắp xếp */
.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  font-size: 18px;
  color: #444;
  user-select: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-right: 20px;
}




.sort-box label {
  white-space: nowrap;
  color: var(--color-primary);
  user-select: none;
}


.sort-box select {
  min-width: 140px;
  padding: 12px 16px;
  font-size: 15px;
  border-radius: 14px;
  border: 2px solid #ddd;
  background-color: #fafafa;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background-color 0.3s ease;
  color: #333;
  font-weight: 600;
  user-select: none;
}


.sort-box select:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 12px var(--color-primary-shadow);
  color: #b35e00;
}


.sort-box select:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 18px var(--color-primary-shadow);
  color: #8a3e00;
}


/* Nút submit */
.filter-sort-form button[type="submit"] {
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--color-primary), #ff9a00);
  border: none;
  border-radius: 32px;
  color: white;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  box-shadow:
    0 6px 15px rgba(255, 103, 0, 0.5),
    inset 0 -3px 8px rgba(255, 255, 255, 0.3);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.2s ease;
  user-select: none;
  white-space: nowrap;
  align-self: flex-start;
  margin-left: auto;
  margin-top: 8px;
}
.btn-reset {
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--color-primary), #ff9a00);
  border: none;
  border-radius: 32px;
  color: white;
  font-weight: 700;
  font-size: 17px;
  line-height: 1; /* THÊM DÒNG NÀY */
  cursor: pointer;
  box-shadow:
    0 6px 15px rgba(255, 103, 0, 0.5),
    inset 0 -3px 8px rgba(255, 255, 255, 0.3);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.2s ease;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
}




.btn-reset:hover {
  background: linear-gradient(135deg, #ff8600, #ffb233);
  transform: scale(1.05);
  box-shadow:
    0 10px 30px rgba(255, 134, 0, 0.65),
    inset 0 -4px 12px rgba(255, 255, 255, 0.4);
}




.filter-sort-form button[type="submit"]:hover {
  background: linear-gradient(135deg, #ff8600, #ffb233);
  box-shadow:
    0 10px 30px rgba(255, 134, 0, 0.65),
    inset 0 -4px 12px rgba(255, 255, 255, 0.4);
  transform: scale(1.05);
}


/* Scrollbar filters */
.filters-wrapper::-webkit-scrollbar {
  height: 6px;
}


.filters-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}


.filters-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 3px;
}


/* ===== Product Grid ===== */
.product-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    padding: 0 20px 30px;
    background-color: var(--color-bg-light);
    width: 100%;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
    box-sizing: border-box;
}
.product-card img {
    max-height: 220px;
    object-fit: contain;
}


/* Responsive grid */
@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .product-grid {
    grid-template-columns: 1fr;
    padding: 0 10px 30px;
  }
}


/* Product Card */
.product-card {
  background-color: var(--color-bg-dark);
  border-radius: 24px;
  padding: 16px 12px 16px;
  text-align: center;
  color: var(--color-text-light);
  box-shadow: 0 8px 20px rgba(48, 231, 177, 0.3);
  border: 1.5px solid #30e7b1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  font-family: 'Nunito', 'Montserrat', Arial, sans-serif;


  display: flex;
  flex-direction: column;
  justify-content: space-between;


  min-width: 0;
  word-break: break-word;


  min-height: 420px; /* thay height bằng min-height */
  height: auto;
}


.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(36,180,126,0.25), 0 8px 40px rgba(44,44,62,0.18);
  border-color: #30e7b1;
}


.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover; /* thay contain thành cover */
  margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(120deg, #444 40%, #333 100%);
  border: 1px solid #555;
  box-shadow: 0 4px 12px rgba(0,150,120,0.3);
}


.product-card h3 {
  font-size: 20px;
  margin: 6px 0 6px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  letter-spacing: 0.5px;
}


.rating {
  color: #f5b600;
  font-size: 18px;
  margin-top: 8px;
  user-select: none;
  letter-spacing: 2px;
}


.price-row {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap; /* tránh xuống dòng */
}


.price {
  color: #f5b600;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.1em;
}


.old-price {
  text-decoration: line-through;
  color: #b5b5b5;
  font-size: 15px;
  margin-inline-start: 7px;
  font-weight: 400;
}


.discount {
  font-size: 14px;
  color: #66bb6a;
  margin-inline-start: 6px;
  font-weight: 700;
}


.installment {
  font-size: 13px;
  color: var(--color-warning);
  margin-block-start: 10px;
  font-style: italic;
  letter-spacing: 0.02em;
}




/* Pagination */
.pagination {
  text-align: center;
  margin: 40px 0;
}


.pagination a {
  padding: 10px 16px;
  border: 1.5px solid #ccc;
  border-radius: 10px;
  margin: 0 8px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}


.pagination a:hover {
  background-color: #eee;
  border-color: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary-shadow);
}


/* Utility */
.product-card-link, .product-link {
 display: block;
  max-width: 100%;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}


.hover-hand {
  cursor: pointer;
}
.wishlist-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 2;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.product-card {
  position: relative;
}
.wishlist-btn .wishlist-icon {
  width: 32px;
  height: 32px;
  margin: 0 2px;
}


.wishlist-btn.active .wishlist-icon {
  filter: none;
}




/* Responsive */
@media (max-width: 900px) {
  .filters-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .filters-label {
    margin-right: 8px;
  }
  .sort-wrapper {
    justify-content: flex-start;
    gap: 12px;
  }
  .filter-sort-form button[type="submit"] {
    margin-top: 12px;
    margin-left: 0;
  }
}



