:root {
  --divider: #eee;
  --primary-color: #6d62ff;
  --primary-hover-color: #3e2fff;
  --info-color: #0066cc;
  --secondary-color: #ff266f;
  --primary-text: #000;
  --bg-default: #fff;
  --bg-paper: #f5f5f5;
  --text-primary: var(--primary-text);
  --common-white: #fff;
  --secondary-text: #888;
  --text-secondary: var(--secondary-text);
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --success-color: #198754;
  --transition-duration: 0.3s;
}

:root[data-theme='dark'] {
  --divider: #333;
  --primary-color: #8d84ff;
  --primary-hover-color: #a9a2ff;
  --info-color: #3399ff;
  --secondary-color: #ff4c8c;
  --primary-text: #f5f5f5;
  --bg-default: #121212;
  --bg-paper: #1e1e1e;
  --text-primary: var(--primary-text);
  --common-white: #fff;
  --secondary-text: #bbb;
  --text-secondary: var(--secondary-text);
  --warning-color: #ffca28;
  --error-color: #ff6b6b;
  --success-color: #4caf50;
  --transition-duration: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-default);
  color: var(--primary-text);
  font-family: sans-serif;
}

.theme-toggle {
  cursor: pointer;
  background-color: var(--primary-color);
  color: var(--common-white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none;
}

.theme-toggle svg {
  width: 30px;
  height: 30px;
}

ul,
li {
  all: revert;
}

a {
  color: inherit;
  text-decoration: none;
}

#theme-icon svg {
  width: 25px;
  height: 25px;
}

input,
textarea,
button,
select {
  border: 1px solid var(--divider);
  outline: none;
  background-color: var(--bg-paper);
  color: var(--primary-text);
}

input:focus {
  outline: none;
}

textarea {
  outline: none;
}

textarea:focus {
  outline: none;
}

.container {
  padding: 0 32px;
}

@media (min-width: 1536px) {
  .container {
    width: 1536px;
    margin: 0 auto;
  }
}

/*  */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #111035;
  color: white;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  gap: 12px;
  margin-bottom: 32px;
}

.header-left {
  flex: 1;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 60px;
  margin-left: 30px;
}

.header-center {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-container {
  display: flex;
  align-items: center;
  background: var(--bg-paper);
  border-radius: 12px;
  overflow: hidden;
  height: 50px;
  margin: 0 auto;
  border: 1px solid var(--divider);
  margin-bottom: 12px;
}

.search-input {
  border: none;
  padding: 10px 20px;
  outline: none;
  flex: 1;
}

.search-btn {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0 24px;
  font-weight: bold;
  height: 50px;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
}

.nav-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 40px;
  width: 100%;
  position: relative;
  margin-bottom: 15px;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--secondary-color, #ff2f7b);
}

.nav-links a.active {
  color: var(--secondary-color, #ff2f7b);
}

.nav-item {
  position: relative;
}

.arrow {
  font-size: 10px;
  margin-left: 3px;
  transition: transform 0.3s ease;
}

.home-dropdown {
  position: relative; /* Required for positioning submenus */
  z-index: 99;
}

.home-dropdown:hover > .arrow {
  transform: rotate(180deg);
}

.home-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-paper);
  border-radius: 8px;
  overflow: hidden;
  width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  overflow: visible;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.home-dropdown:hover > .home-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(5px);
}

.home-submenu a {
  color: var(--secondary-text);
  padding: 12px 15px;
  display: block;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-submenu a :where(img, svg) {
  width: 20px;
  height: 20px;
}

.home-submenu a:hover {
  color: var(--secondary-color, #ff2f7b);
}

.home-submenu .home-dropdown {
  position: relative;
}

.home-submenu .home-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  transform: translateX(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
}

.home-submenu .home-dropdown:hover > .home-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(5px);
}

.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
}

.header__menu.icon {
  display: none;
}

@media (max-width: 900px) {
  .header__menu.icon {
    display: block;
  }
}

.icon {
  background-color: var(--primary-color, rgba(123, 103, 255, 0.15));
  border-radius: 12px;
  padding: 12px;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.icon-img {
  width: 30px;
  height: 30px;
  filter: brightness(0) invert(1);
}

.badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--secondary-color, #ff2f7b);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 50%;
}

.header-links {
  display: flex;
  gap: 25px;
  position: absolute;
  top: 20px;
  left: 20px;
}

.header-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.3s;
}

.header-links a:hover {
  color: var(--secondary-color, #ff2f7b);
}

.icon {
  position: relative;
}

.fav-text {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--secondary-color, #ff2f7b);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  margin-top: 8px;
}

.icon:hover .fav-text {
  display: block;
}

.tooltip {
  display: none;
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}

#cart-icon:hover .tooltip {
  display: block;
  opacity: 1;
}
.header-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.icon-group {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 900px) {
  .header {
    flex-direction: column;
    align-items: center;
  }
  .header .header-center {
    order: 3;
    width: 100%;
  }
  .header .header-center .search-container {
    width: 100%;
  }
  .header .header-center .nav-links {
    display: none;
  }
  .icon.header__menu {
    display: block;
  }
}

/*  */
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  font-size: 0.75rem;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  color: var(--text-secondary);
}

.form-inline {
  display: flex;
  gap: 10px;
}

.form-inline .form-group {
  flex: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--divider);
  border-radius: 4px;
}

.form-group .error-message {
  color: red;
  font-size: 12px;
  margin-top: 6px;
}

.global-box {
  display: none;
  background-color: #ffebee;
  color: #d32f2f;
  padding: 15px;
  margin-top: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border-left: 5px solid #d32f2f;
}

/*  */
.footer {
  background-color: var(--bg-paper);
  padding: 40px 20px 20px;
  font-size: 14px;
  margin-top: 60px;
  text-align: left;
}

.footer-container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-contact img {
  width: 30px;
  vertical-align: middle;
  margin-bottom: 10px;
}

.footer-contact h3 {
  margin: 5px 0;
  font-size: 12px;
  font-weight: normal;
}

.footer-contact .phone {
  font-weight: bold;
  font-size: 18px;
  margin: 5px 0;
}

.footer-contact p {
  margin: 10px 0;
}

.footer-contact {
  flex: 1;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 30px;
  min-width: 312px;
  flex: 1;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links li a {
  text-decoration: none;
  font-size: 14px;
}

.footer-links li a :hover {
  text-decoration: underline;
}

.footer-bottom {
  color: var(--text-secondary);
  text-align: left;
  padding: 10px 20px;
  font-size: 13px;
}

/*  */
.product__card .price-discount {
  text-decoration: line-through;
}

.product__card .img-description {
  display: flex;
  margin-top: 10px;
  font-weight: bold;
  font-size: 16px;
  color: var(--secondary-text);
  text-align: center;
  justify-content: center;
  height: 60px;
}

/*  */
.product__card {
  flex: 1 0 200px;
  height: 100%;
  max-height: 355px;
  position: relative;
  width: 200px;
  border-radius: 15px;
  overflow: hidden;
  text-align: center;
  margin: 5px;
  transition: transform 0.3s ease;
  scroll-snap-align: start;
  padding-bottom: 12px;
}

html[data-theme='dark'] .product__card {
  background-color: var(--bg-paper);
}

.product__card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 2px whitesmoke;
}

.product__card .img-container {
  position: relative;
  height: 200px;
  width: 100%;
}

.product__card .img-container img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: contain;
}

.product__card .overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  top: 0;
  width: 0;
  background-color: rgba(0 0 0 / 0.3);
  transition: all var(--transition-duration) ease-in-out;
}

.product__card:hover .overlay {
  width: 100%;
}

.product__card img {
  opacity: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.product__card .img-description {
  display: flex;
  padding: 10px;
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
}

.product__card .buttons {
  position: absolute;
  top: 10px;
  right: -36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: 0.3s;
}

.product__card:hover .buttons {
  right: 10px;
  opacity: 0.8;
}

.product__card .buttons button {
  background-color: #fff;
  border: none;
  border-radius: 100%;
  width: 35px;
  height: 35px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: var(--transition-duration);
}

.product__card .buttons button :where(img, svg) {
  width: 20px;
  height: 20px;
}

.product__card .buttons button:hover {
  background-color: var(--secondary-color);
  color: var(--common-white);
}

.product__card .buttons button:hover svg path {
  fill: var(--common-white);
  stroke: var(--common-white);
}

.product__card .buttons button:hover svg {
  fill: var(--common-white);
  stroke: var(--common-white);
}

.product__card .prices {
  font-size: 1.3rem;
  font-weight: 400;
  text-align: center;
  color: var(--secondary-color);
}

.product__card .ratingStar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;
}

.product__card .ratingStar svg {
  width: 30px;
  height: 30px;
}

.alert-page {
  min-height: 350px;
  width: 100%;
  text-align: center;
}

.alert-page .alert-icon {
  max-width: 130px;
  margin: 0 auto;
}

.alert-page.warning .alert-icon {
  stroke: var(--warning-color);
}

.alert-page.error .alert-icon {
  stroke: var(--warning-color);
}

.alert-page a {
  text-decoration: underline;
  font-size: inherit;
}

.alert-page .title {
  font-size: 1.12rem;
}

.alert-page .message {
  font-size: 0.75rem;
  max-width: 390px;
  margin: 0 auto;
}
