/* Eluvity Store - Single Store Reverse Template CSS */
/* Dựa trên single-store.css nhưng đảo vị trí cột */

/* ==============================================
   POPPINS FONT FROM RELIABLE CDN
   ============================================== */

/* Load Poppins từ CDN reliable */
@import url("https://fonts.bunny.net/css?family=poppins:400,500,600&display=swap");

/* CSS Variables cho font stack với fallback */
:root {
  --font-poppins: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Roboto", "Helvetica Neue", Arial, sans-serif;
}

/* Base styles for body and page */
body.single-store,
body.single-store #page,
body.single-store #content {
  background-color: #edf1f8;
}

body.single-store {
  overflow-x: hidden !important;
  width: 100% !important;
}

/* Core template structure and reset */
.eluvity-store-template {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
  overflow: hidden !important;
  left: 0 !important;
  right: 0 !important;
}

.store-container,
.store-title-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.eluvity-store-template > * {
  width: 100% !important;
  display: block !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
}

/* Reset container của theme nếu cần */
body.single-store .content-area,
body.single-store .site-content,
body.single-store .entry-content {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Store header */
.store-header {
  width: 100vw !important;
  position: relative !important;
  left: 50% !important;
  right: 50% !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  box-sizing: border-box;
  background-color: #ffffff !important;
  margin-bottom: 10px !important;
  border-bottom: 1px solid #bcc6d7 !important;
}

.store-title-heading {
  padding-top: 15px;
  width: 100%;
  display: block;
  clear: both;
}

.store-title-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.store-main-title {
  font-family: var(--font-poppins);
  font-size: 16px;
  color: #333;
  margin: 0;
  font-weight: 500;
  padding: 5px 0;
}

/* Container wrapper cho layout 2 cột */
.store-container-wrapper {
  width: 100%;
  background-color: #edf1f8;
  padding: 0;
  display: block;
  clear: both;
  position: relative;
  padding-top: 0 !important;
}

/* Đảm bảo các container hiển thị đúng */
.store-header,
.store-container-wrapper {
  display: block;
  width: 100%;
  float: none;
  overflow: hidden;
  border-bottom: 1px solid #bcc6d7;
}

.store-header-container {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.store-header-logo {
  width: 128px;
  height: 128px;
  flex-shrink: 0;
  margin-right: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
}

.store-header-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

.store-header-info {
  flex-grow: 1;
}

.store-header-title {
  font-size: 36px;
  color: #333;
  margin: 0 0 10px 0;
}

.store-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.store-header-rating {
  display: flex;
  align-items: center;
  margin-right: 15px;
}

.store-header-stars {
  background: #ffd43b;
  color: #333;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: bold;
  margin-right: 10px;
  font-size: 14px;
}

.store-header-stars i {
  color: #333;
  margin-left: 5px;
}

.store-header-votes {
  color: #666;
  font-size: 14px;
  font-weight: 600;
}

.store-header-tips {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.store-header-tips:hover {
  text-decoration: underline;
}

/* Main container - Đảo thứ tự cột */
.store-container {
  display: grid;
  grid-template-columns: 70% 30%;
  margin: 1rem 0;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.5rem 0.5rem 2rem;
  gap: 20px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Sidebar styles */
.store-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.store-box {
  background-color: white;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #bcc6d7;
}

/* Store info box */
.store-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.store-info__logo {
  width: 150px;
  height: auto;
  max-height: 100px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.store-info__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0073aa;
  margin-bottom: 0.5rem;
  text-align: center;
}

.store-info__rating {
  margin-bottom: 1rem;
  text-align: center;
}

.store-info__rating-star {
  color: #f39d13;
  font-size: 1.2rem;
}

.store-info__rating-text {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.3rem;
}

.store-info__alert {
  font-weight: 600;
  font-size: 1rem;
  color: #0073aa;
  background-color: white;
  border: 1px solid #0073aa;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  width: 100%;
  max-width: 12rem;
  margin: 0 auto;
}

.store-info__alert:hover {
  background-color: #0073aa;
  color: white;
}

/* Store count box */
.store-count {
  display: flex;
  flex-direction: column;
}

.store-count__title {
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  font-size: 16px;
}

.store-count__item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

.store-count__item:last-child {
  border-bottom: none;
}

/* Main content area */
.store-content {
  padding: 0 !important;
  width: 100%;
}

.store-content__title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: #333;
}

.store-content__description {
  margin-bottom: 1.5rem;
  color: #666;
  line-height: 1.6;
}

.store-content__category > button {
  color: #3258b3;
  background-color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 16px;
  font-weight: 500;
  border-radius: 0.3rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.store-content__category > button:hover {
  color: #3258b3;
  background-color: #f0f8ff;
}

.store-content__category > button.active {
  background-color: #3258b3;
  color: white;
  cursor: default;
}

/* Offers list */
.store-content__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Filter logic for offers */
.store-content__list[data-type="all"] > .store-content__list-item {
  display: flex;
}

.store-content__list[data-type="verified"]
  > .store-content__list-item[data-verified] {
  display: flex;
}

.store-content__list[data-type="code"]
  > .store-content__list-item[data-type="code"] {
  display: flex;
}

.store-content__list[data-type="deal"]
  > .store-content__list-item[data-type="deal"] {
  display: flex;
}

.store-content__list-item {
  display: none;
  flex-wrap: nowrap;
  background-color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.35);
  overflow: visible !important; /* Đảm bảo nội dung không bị cắt */
}

/* Đảm bảo các item khi hiển thị sẽ dùng flex đúng cách */
.store-content__list[data-type="all"] > .store-content__list-item,
.store-content__list[data-type="verified"]
  > .store-content__list-item[data-verified],
.store-content__list[data-type="code"]
  > .store-content__list-item[data-type="code"],
.store-content__list[data-type="deal"]
  > .store-content__list-item[data-type="deal"] {
  display: flex !important;
  align-items: stretch !important; /* Quan trọng để các phần tử con giãn theo chiều cao */
}

/* Offer discount section */
.store-content__list-item-discount {
  display: flex;
  align-self: stretch !important;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed #e7e6e6;
  padding: 0 1rem;
  font-size: 1.3rem;
  font-weight: 600;
  min-width: 7rem;
  text-align: center;
  color: #0073aa;
  height: auto !important;
}

/* Offer content section */
.store-content__list-item-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  gap: 1rem;
  padding: 0 1rem;
}

.store-content__list-item-type {
  color: #0073aa;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
}

.store-content__list-item-title {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.store-content__list-item-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Coupon code section */
.store-content__list-item-code {
  flex-shrink: 0;
  position: relative;
  min-width: 140px;
}

.store-content__list-item-code > button {
  color: white;
  background-color: #3258b3;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.3rem;
  font-weight: 500;
  font-size: 1rem;
  min-width: 120px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.store-content__list-item-code > button:hover {
  background-color: #487eff;
}

/* Điều chỉnh khối CSS này điều khiển nút Get Code */
.store-content__list-item[data-type="code"]
  .store-content__list-item-code
  > button {
  position: relative;
  color: white;
  background-color: #3258b3;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.3rem;
  font-weight: 500;
  font-size: 1rem;
  width: 97%;
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
  z-index: 2;
}

/* Bạn cũng có thể muốn điều chỉnh phần tử after cho hiệu ứng bóng */
.store-content__list-item[data-type="code"]
  .store-content__list-item-code
  > button::after {
  content: "";
  position: absolute;
  background-color: rgba(0, 0, 0, 0.15);
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  clip-path: polygon(90% 0, 85% 50%, 100% 85%);
  pointer-events: none;
}

/* Thêm hiệu ứng hover cho nút */
.store-content__list-item[data-type="code"]
  .store-content__list-item-code
  > button:hover {
  transform: translateX(-10px);
  transition: transform 0.3s ease;
  background-color: #487eff;
}

/* Hiển thị mã coupon - điều chỉnh vị trí */
.store-content__list-item[data-type="code"]
  .store-content__list-item-code-text {
  position: absolute;
  width: 100%;
  height: 99%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-transform: uppercase;
  color: #3258b3;
  font-size: 1rem;
  font-weight: 600;
  padding-right: 8px;
  border: 1px dashed #3258b3;
  border-radius: 0.3rem;
  box-sizing: border-box;
  background-color: #f7fafc;
  z-index: 1;
  overflow: hidden;
  white-space: nowrap;
}

/* Tạo container cho text để điều chỉnh vị trí */
.store-content__list-item[data-type="code"]
  .store-content__list-item-code-text:after {
  content: attr(data-code);
  margin-right: 1px;
}

.store-content__list-item[data-type="deal"]
  .store-content__list-item-code-text {
  display: none;
}

/* Content boxes (About, How to Apply, FAQ) */
.store-content__box {
  margin-bottom: 1rem;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.store-content__box-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
  margin-top: 1rem !important;
  padding-top: 0 !important;
}

.store-content__box-description {
  padding: 1rem;
  border: 1px solid #bcc6d7;
  border-radius: 10px;
  background-color: white;
  font-size: 1rem;
  line-height: 1.6;
}

/* Category filter styles */
.store-content__list[data-type^="category-"] > .store-content__list-item {
  display: none;
}

.store-content__list[data-type^="category-"]
  > .store-content__list-item[data-categories*="category-"] {
  display: flex;
}

/* Star ratings */
.full-star {
  color: #f39d13;
}

.empty-star {
  color: #ddd;
}

/* Điều chỉnh nút lọc để hiển thị đúng */
.store-content__category {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.3rem;
  margin-top: 0.5rem;
}

/* Điều chỉnh cách hiển thị nội dung dưới header */
.store-content {
  padding: 0;
}

/* Fix cho theme Astra */
.ast-container {
  max-width: 100% !important;
  padding: 0 !important;
}

#page,
#content {
  max-width: 100% !important;
  padding: 0 !important;
}

/* Dòng chữ thông báo hoa hồng */
.store-commission-notice {
  font-family: var(--font-poppins) !important;
  font-size: 12px;
  text-align: left;
  display: block !important;
}

.store-commission-notice-mobile {
  display: none !important;
  font-family: var(--font-poppins) !important;
  font-size: 12px;
  text-align: center;
  padding: 10px 10px 0px 10px;
  background-color: #f5f5f5;
  width: 100%;
}

/* Reset các thuộc tính display mặc định trước */
body .eluvity-store-template .store-commission-notice {
  display: block !important;
  font-family: var(--font-poppins) !important;
  font-size: 12px;
  text-align: left;
  padding-bottom: 15px;
}

body .eluvity-store-template .store-commission-notice-mobile {
  display: none !important;
  font-family: var(--font-poppins) !important;
  font-size: 12px;
  text-align: center;
  padding: 10px 10px 0px 10px;
  width: 100%;
}

/* Popular Stores styles */
.popular-stores__title {
  font-weight: 600;
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.popular-stores__list {
  display: flex;
  flex-direction: column;
}

.popular-stores__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease;
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.popular-stores__item:last-child {
  border-bottom: none;
}

.popular-stores__item:hover {
  background-color: #f0f8ff;
}

.popular-stores__logo {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  padding: 2px;
}

.popular-stores__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 5px;
}

.popular-stores__info {
  flex-grow: 1;
}

.popular-stores__name {
  font-weight: 600;
  font-size: 18px;
  color: #333;
}

.popular-stores__rating .rating-value {
  font-weight: 600;
  font-size: 14px;
}

.popular-stores__rating .star-icon {
  color: #ffd43b;
  font-size: 14px;
}

.popular-stores__rating .votes-count {
  color: #666;
  font-size: 14px;
}

.popular-stores__item:hover .popular-stores__rating .star-icon {
  color: #ffd43b !important;
}

.popular-stores__item:hover .popular-stores__rating .votes-count {
  color: #666 !important;
}

.popular-stores__item:hover .popular-stores__rating .rating-value {
  color: #333 !important;
}

/* Chỉ áp dụng cho menu Astra */
.site-header .ast-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 15px !important;
}

.site-header .main-header-bar {
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Exlusive Offer */
.store-content__list-item.exclusive-offer .store-content__list-item-discount {
  position: relative !important;
  border: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%23FDDC2B' stroke-dasharray='4, 6' stroke-dashoffset='3' stroke-linecap='square' stroke-width='2' rx='8' ry='8'/%3E%3C/svg%3E") !important;
  padding: 40px 10px 10px !important;
  min-width: 130px !important;
  min-height: 130px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  color: #333 !important;
  text-transform: capitalize !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 100% 99% !important;
}

/* Label "Exclusive" nằm trong khung */
.store-content__list-item.exclusive-offer
  .store-content__list-item-discount:before {
  content: "Exclusive" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  background-color: #fddc2b !important;
  color: #333 !important;
  border-radius: 8px 8px 0 0 !important;
  overflow: visible !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  font-family: var(--font-poppins) !important;
  z-index: 2 !important;
  display: block !important;
  white-space: nowrap !important;
  width: 100% !important;
}

/* Cân chỉnh nội dung "30% OFF" */
.store-content__list-item.exclusive-offer .store-content__list-item-discount {
  line-height: 1.4 !important;
  font-size: 1.3rem !important;
}

/* Verified Offer */
.store-content__list-item.verified-offer .store-content__list-item-discount {
  position: relative !important;
  border: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%2363c8af' stroke-dasharray='4, 6' stroke-dashoffset='3' stroke-linecap='square' stroke-width='2' rx='8' ry='8'/%3E%3C/svg%3E") !important;
  padding: 40px 15px 15px !important;
  min-width: 130px !important;
  min-height: 130px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  color: #333 !important;
  border-radius: 8px !important;
  overflow: visible !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 100% 99% !important;
}

/* Label "Verified" nằm trong khung */
.store-content__list-item.verified-offer
  .store-content__list-item-discount:before {
  content: "Verified" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  transform: none !important;
  background-color: #63c8af !important;
  color: #333 !important;
  border-radius: 8px 8px 0 0 !important;
  overflow: hidden !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  font-family: var(--font-poppins) !important;
  z-index: 2 !important;
  display: block !important;
  white-space: nowrap !important;
  width: 100% !important;
  text-transform: capitalize !important;
}

/* Thêm quy tắc CSS để ưu tiên exclusive nếu offer vừa là exclusive vừa là verified */
.store-content__list-item.exclusive-offer.verified-offer
  .store-content__list-item-discount {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%23FDDC2B' stroke-dasharray='4, 6' stroke-dashoffset='3' stroke-linecap='square' stroke-width='2' rx='8' ry='8'/%3E%3C/svg%3E") !important;
}

.store-content__list-item.exclusive-offer.verified-offer
  .store-content__list-item-discount:before {
  content: "Exclusive" !important;
  background-color: #fddc2b !important;
  color: #333 !important;
}

/* Khung màu xám cho mã code thông thường */
.store-content__list-item:not(.exclusive-offer):not(.verified-offer)
  .store-content__list-item-discount {
  position: relative !important;
  border: none !important;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%23bcc6d7' stroke-dasharray='4, 6' stroke-dashoffset='3' stroke-linecap='square' stroke-width='2' rx='8' ry='8'/%3E%3C/svg%3E") !important;
  padding: 20px 20px 20px !important;
  min-width: 130px !important;
  min-height: 140px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  color: #333 !important;
  width: 130px !important;
  max-width: 130px !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  border-radius: 8px !important;
  overflow: visible !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 100% 99% !important;
}

/* Kích thước chuẩn cho tất cả các khung */
.store-content__list-item .store-content__list-item-discount {
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  min-height: 140px !important;
  height: auto !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  align-self: stretch !important;
  margin-bottom: 0 !important; /* Bảo đảm không có margin-bottom */
  position: relative !important; /* Đảm bảo định vị tương đối */
  z-index: 1 !important; /* Tăng z-index để tránh bị che lấp */
}

/* Giữ padding giống nhau cho tất cả khung */
.store-content__list-item.exclusive-offer .store-content__list-item-discount,
.store-content__list-item.verified-offer .store-content__list-item-discount {
  padding: 40px 20px 20px !important;
  justify-content: center !important;
  align-items: center !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Font stack kết hợp - sẽ dùng font hệ thống trên iOS, Poppins trên thiết bị khác */
.store-main-title,
.store-commission-notice,
.store-commission-notice-mobile,
.store-content__list-item.exclusive-offer
  .store-content__list-item-discount:before,
.store-content__list-item.verified-offer
  .store-content__list-item-discount:before,
.store-content__list-item:not(.exclusive-offer):not(.verified-offer)
  .store-content__list-item-discount:before {
  font-family: var(--font-poppins) !important;
}

/* Consolidated Media Queries for Mobile */
@media screen and (max-width: 768px) {
  /* Header styles */
  .store-header {
    background-color: #f5f5f5;
    padding: 0;
  }

  .store-header-container {
    background: #fff;
    border-radius: 4px;
    margin: 5px;
    padding: 0;
  }

  .store-header-logo {
    width: 80px;
    height: 80px;
    margin-right: 15px;
  }

  .store-header-title {
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 0 0 5px 0;
  }

  .store-header-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-header-rating {
    margin-bottom: 5px;
  }

  /* Hide elements on mobile */
  .store-title-heading {
    display: none !important;
  }

  .store-content__category {
    display: none !important;
  }

  .store-commission-notice {
    display: none !important;
  }

  .store-commission-notice-mobile {
    display: block !important;
  }

  /* Container structure */
  .store-container {
    grid-template-columns: 100%;
    gap: 10px;
  }

  .store-main-title {
    font-size: 16px;
  }

  /* Content item styles */
  .store-content__list-item-content {
    flex-direction: row;
    align-items: flex-start;
    padding-left: 15px;
  }

  .store-content__list-item-content > div {
    margin: auto 0;
  }

  .store-content__list-item-discount {
    padding-right: 1rem;
    min-width: 5rem;
    width: auto;
    min-width: 70px;
    max-width: 80px;
    border-right: 1px dashed #e7e6e6;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    font-size: 1rem;
    padding: 0 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .store-content__list-item-description {
    display: none;
    font-size: 0.85rem;
    padding-right: 30px;
  }

  .store-content__list-item-title {
    margin-bottom: 8px;
    position: relative;
    font-size: 18px;
    margin: 0.3rem 0;
  }

  .store-content__list-item-title:after {
    content: "See details";
    display: block;
    color: #3258b3;
    font-size: 0.85rem;
    font-weight: normal;
    margin-top: 4px;
  }

  /* List item on mobile */
  .store-content__list-item {
    flex-direction: row;
    position: relative;
    cursor: pointer;
    padding-right: 30px;
    box-shadow: none;
    border: 1px solid #bcc6d7;
    padding: 0.5rem;
  }

  .store-content__list-item:after {
    content: "\f054";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #3258b3;
    font-size: 1.2rem;
  }

  .store-content__box-title {
    font-size: 22px;
  }

  /* Hide code elements on mobile */
  .store-content__list-item-code > button,
  .store-content__list-item-code-text,
  .store-content__list-item-code {
    display: none !important;
  }

  /* Popular stores on mobile */
  .popular-stores {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0 10px;
  }

  .popular-stores__logo {
    width: 72px;
    height: 72px;
  }

  .popular-stores__name {
    font-size: 18px;
  }

  .popular-stores__rating {
    font-size: 14px;
  }

  .popular-stores__title {
    padding-top: 20px;
    padding-left: 10px;
  }

  .store-aside {
    gap: 10px;
  }

  /* Astra menu adjustments */
  .site-header .site-branding,
  .site-header .ast-site-identity,
  .site-header .ast-mobile-menu-buttons {
    padding-left: 15px !important;
  }

  .main-header-bar .ast-mobile-menu-buttons {
    padding-right: 30px !important;
  }

  .site-header .ast-mobile-header-stack .site-branding {
    padding: 10px 15px !important;
  }

  .ast-builder-grid-row > .site-header-section {
    padding-right: 15px;
  }

  /* Exclusive and verified offers on mobile */
  .store-content__list-item.exclusive-offer .store-content__list-item-discount,
  .store-content__list-item.verified-offer .store-content__list-item-discount {
    min-width: 90px !important;
    min-height: 105px !important;
    padding: 30px 5px 5px !important;
    font-size: 1.5rem !important;
  }

  .store-content__list-item.exclusive-offer
    .store-content__list-item-discount:before,
  .store-content__list-item.verified-offer
    .store-content__list-item-discount:before {
    font-size: 13px !important;
  }

  /* Standard offer discount on mobile */
  .store-content__list-item:not(.exclusive-offer):not(.verified-offer)
    .store-content__list-item-discount {
    min-width: 100px !important;
    min-height: 105px !important;
    width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    padding: 5px 5px 6px !important;
    font-size: 20px !important;
  }

  /* All discount containers on mobile */
  .store-content__list-item .store-content__list-item-discount {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    min-height: 105px !important;
  }

  /* Giữ nguyên thứ tự các mã trên mobile */
  .store-content__list-item.exclusive-offer,
  .store-content__list-item.verified-offer,
  .store-content__list-item.exclusive-offer.verified-offer {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
  }

  /* Tùy chỉnh badge trên mobile */
  .store-content__list-item.exclusive-offer::before {
    top: -8px;
    right: 10px;
    font-size: 10px;
    padding: 1px 6px;
  }

  /* Giữ thứ tự ưu tiên các mã trên mobile */
  .store-content__list {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Định dạng chung cho text trong discount box */
.store-content__list-item .store-content__list-item-discount {
  font-family: var(--font-poppins) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  text-align: center !important;
  color: #333333 !important;
  line-height: 1.2 !important;
}

/* Kích cỡ text cho prefix (UP TO, EXTRA, SAVE) và suffix (OFF, BACK) */
.store-content__list-item .store-content__list-item-discount span.prefix {
  font-size: 1rem !important;
  line-height: 1.2 !important;
  color: #03120e !important;
  font-family: "Open Sans", sans-serif !important;
  display: block !important;
  margin-bottom: 3px !important;
  font-weight: 500 !important;
}

.store-content__list-item .store-content__list-item-discount span.suffix {
  font-size: 1rem !important;
  line-height: 1.2 !important;
  color: #03120e !important;
  font-family: "Open Sans", sans-serif !important;
  display: block !important;
  margin-top: 3px !important;
  font-weight: 500 !important;
}

/* Số phần trăm ở giữa */
.store-content__list-item .store-content__list-item-discount span.percent {
  font-size: 2rem !important;
  line-height: 1 !important;
  color: #333 !important;
  font-weight: 600 !important;
  display: block !important;
}

/* CSS cho layout có prefix-suffix */
.store-content__list-item .store-content__list-item-discount.has-prefix-suffix {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 2px !important;
}

/* CSS đặc biệt cho FREE SHIPPING - ĐẢM BẢO GHI ĐÈ TẤT CẢ CSS KHÁC */
.store-content__list-item .store-content__list-item-discount.free-shipping {
  font-size: 1rem !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.store-content__list-item
  .store-content__list-item-discount.free-shipping
  .free {
  font-size: 1.3rem !important; /* Giảm kích thước chữ */
  display: block !important;
  line-height: 1 !important;
  margin-bottom: 3px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

.store-content__list-item
  .store-content__list-item-discount.free-shipping
  .shipping {
  font-size: 1.1rem !important; /* Giảm kích thước chữ */
  display: block !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

/* Đảm bảo CSS tương tự cho FREE GIFT */
.store-content__list-item .store-content__list-item-discount.free-gift {
  font-size: 1.5rem !important;
}

.store-content__list-item .store-content__list-item-discount.free-gift .free {
  font-size: 1.8rem !important;
  display: block !important;
  line-height: 1.1 !important;
  margin-bottom: 5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

.store-content__list-item .store-content__list-item-discount.free-gift .gift {
  font-size: 1.5rem !important;
  display: block !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

/* Kiểu x% OFF - độ ưu tiên cao */
.store-content__list-item[data-type]
  .store-content__list-item-discount
  .percent {
  font-size: 2.25rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  display: block !important;
  margin-bottom: 5px !important;
  color: #333 !important;
}

.store-content__list-item[data-type] .store-content__list-item-discount .off {
  font-size: 1.5rem !important;
  font-weight: 500 !important;
  display: block !important;
  line-height: 1 !important;
  color: #333 !important;
}

/* Điều chỉnh cho mobile */
@media screen and (max-width: 768px) {
  /* Exclusive and verified offers on mobile - độ ưu tiên cao */
  .store-content__list-item[data-type].exclusive-offer
    .store-content__list-item-discount,
  .store-content__list-item[data-type].verified-offer
    .store-content__list-item-discount {
    min-width: 90px !important;
    min-height: 105px !important;
    padding: 30px 5px 5px !important;
  }

  body
    .store-content__list-item[data-type]
    .store-content__list-item-discount
    .currency-amount {
    font-size: 1.75rem !important;
  }

  /* Label trên mobile */
  .store-content__list-item.exclusive-offer
    .store-content__list-item-discount:before,
  .store-content__list-item.verified-offer
    .store-content__list-item-discount:before {
    font-size: 1rem !important;
  }

  /* Các kiểu hiển thị trên mobile - độ ưu tiên cao */
  .store-content__list-item[data-type]
    .store-content__list-item-discount
    .percent {
    font-size: 1.75rem !important;
  }

  .store-content__list-item[data-type] .store-content__list-item-discount .off {
    font-size: 1.125rem !important;
    margin-top: 1px !important;
  }

  .store-content__list-item[data-type]
    .store-content__list-item-discount
    .free {
    font-size: 1.5rem !important;
  }

  .store-content__list-item[data-type]
    .store-content__list-item-discount
    .shipping,
  .store-content__list-item[data-type]
    .store-content__list-item-discount
    .gift {
    font-size: 1.2rem !important;
  }
}

/* Các kiểu đặc biệt cho từng loại mã giảm giá */

/* Kiểu x% OFF */
.store-content__list-item .store-content__list-item-discount .percent {
  font-size: 2.25rem !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  display: block !important;
}

.store-content__list-item .store-content__list-item-discount .off {
  font-size: 1.5rem !important;
  font-weight: 500 !important;
  display: block !important;
  margin-top: 5px !important;
  text-transform: uppercase !important;
  color: #03120e;
}

/* Kiểu UP TO x% BACK */
.store-content__list-item
  .store-content__list-item-discount.has-prefix-suffix
  .prefix {
  font-size: 1.125rem !important;
  display: block !important;
  line-height: 1.2 !important;
  margin-bottom: 5px !important;
}

.store-content__list-item
  .store-content__list-item-discount.has-prefix-suffix
  .suffix {
  font-size: 1.125rem !important;
  display: block !important;
  line-height: 1.2 !important;
  margin-top: 5px !important;
}

/* CSS đặc biệt cho FREE SHIPPING - Với độ ưu tiên cao nhất */
.store-content__list-item[data-type] .store-content__list-item-discount .free {
  font-size: 1.8rem !important;
  display: block !important;
  line-height: 1 !important;
  margin-bottom: 5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

.store-content__list-item[data-type]
  .store-content__list-item-discount
  .shipping,
.store-content__list-item[data-type] .store-content__list-item-discount .gift {
  font-size: 1.4rem !important;
  display: block !important;
  line-height: 1 !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
}

/* Kiểu BUY 1 GET 1 */
.store-content__list-item .store-content__list-item-discount .buy,
.store-content__list-item .store-content__list-item-discount .get {
  font-size: 1.5rem !important;
  display: block !important;
  line-height: 1.3 !important;
}

/* Kiểu mã giảm giá tiền tệ ($10 OFF) - Độ ưu tiên cao */
.store-content__list-item[data-type]
  .store-content__list-item-discount
  .currency-amount {
  font-size: 2.25rem !important;
  font-weight: 600 !important;
  display: block !important;
  line-height: 1.1 !important;
  margin-bottom: 5px !important;
}

/* Kiểu chung cho các trường hợp khác */
.store-content__list-item .store-content__list-item-discount .first-part,
.store-content__list-item .store-content__list-item-discount .second-part {
  display: block !important;
  line-height: 1.3 !important;
}

.store-content__list-item .store-content__list-item-discount .first-part {
  font-size: 1.75rem !important;
  font-weight: 600 !important;
}

.store-content__list-item .store-content__list-item-discount .second-part {
  font-size: 1.5rem !important;
}

/* Điều chỉnh cho mobile */
@media screen and (max-width: 768px) {
  .store-content__list-item .store-content__list-item-discount .off {
    margin-top: 2px !important;
  }

  .store-content__list-item
    .store-content__list-item-discount.has-prefix-suffix
    .prefix,
  .store-content__list-item
    .store-content__list-item-discount.has-prefix-suffix
    .suffix {
    font-size: 0.9rem !important;
    margin-bottom: 3px !important;
    margin-top: 3px !important;
  }

  .store-content__list-item
    .store-content__list-item-discount.free-shipping
    .free,
  .store-content__list-item .store-content__list-item-discount.free-gift .free {
    font-size: 1.5rem !important;
  }

  .store-content__list-item
    .store-content__list-item-discount.free-shipping
    .shipping,
  .store-content__list-item .store-content__list-item-discount.free-gift .gift {
    font-size: 1.2rem !important;
  }

  .store-content__list-item .store-content__list-item-discount .amount {
    font-size: 1.75rem !important;
  }

  .store-content__list-item .store-content__list-item-discount .first-part {
    font-size: 1.5rem !important;
  }

  .store-content__list-item .store-content__list-item-discount .second-part {
    font-size: 1.2rem !important;
  }
}

/* Thiết lập layout flexbox cho danh sách */
.store-content__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* Quy tắc sắp xếp thứ tự cho mã - thứ tự số càng thấp thì hiển thị càng cao */
.store-content__list-item {
  order: 3; /* Mặc định - mã thường (priority thấp nhất) */
}

.store-content__list-item.verified-offer {
  order: 2; /* Mã verified (priority trung bình) */
}

.store-content__list-item.exclusive-offer {
  order: 1; /* Mã exclusive (priority cao nhất) */
}

/* Đảm bảo mã vừa verified vừa exclusive vẫn được ưu tiên như exclusive */
.store-content__list-item.exclusive-offer.verified-offer {
  order: 1; /* Vẫn giữ priority cao nhất */
}

/* ==============================================
   MODAL STYLE - SIMPLIFIED COUPONFOLLOW STYLE
   ============================================== */

/* Modal overlay - Simple approach */
.store-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(51, 51, 51, 0.48);
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

/* Show state - No animation */
.store-modal-overlay.show {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Modal content */
.store-modal-content {
  background: white;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
}

/* Close button - CouponFollow style */
.store-close-modal {
  background-color: #f8f8f8;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  position: absolute;
  right: 10px;
  top: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
}

.store-close-modal:hover {
  background-color: #e6e6e6;
}

/* Close icon */
.store-close-modal .close-icon {
  background-color: #505050;
  height: 14px;
  width: 14px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* Body when modal open */
body.modal-open {
  overflow: hidden;
}

/* Modal store info */
.store-modal__store-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  margin-bottom: 1rem;
}

.store-modal__store-avatar {
  width: 80px;
  height: 80px;
  border-radius: 5px;
  object-fit: contain;
}

.store-modal__offer-title {
  font-weight: 600;
  font-size: 1.2rem;
  color: #333;
}

/* Modal content sections */
.store-modal__content {
  padding: 1rem;
}

.store-modal__content-description {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #666;
}

.store-modal__content-description a {
  color: #3258b3;
  text-decoration: none;
}

.store-modal__content-description a:hover {
  text-decoration: underline;
}

/* Copy code section */
.store-modal__content-copy {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  max-width: 350px;
  margin-left: auto;
  margin-right: auto;
}

.store-modal__content-copy-code {
  border: 2px dashed #3258b3;
  background-color: #f7fafc;
  color: #333;
  border-radius: 0.3rem 0 0 0.3rem;
  border-right: none;
  padding: 0.75rem 1rem;
  flex: 1;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  min-width: 0;
  user-select: all;
  -webkit-user-select: all;
}

.store-modal__content-copy-code:focus {
  outline: none;
}

.store-modal__content-copy > button {
  background-color: #3258b3;
  color: white;
  border: none;
  border-radius: 0 0.3rem 0.3rem 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.store-modal__content-copy > button:hover {
  background-color: #005a87;
}

/* Deal button */
.store-modal__content-deal {
  margin-bottom: 1.5rem;
}

.store-modal__content-deal-button {
  display: inline-block;
  background-color: #3258b3;
  color: white;
  text-decoration: none;
  border-radius: 0.3rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.store-modal__content-deal-button:hover {
  background-color: #005a87;
  color: white;
  text-decoration: none;
}

/* Redeem link */
#modal-redeem-link {
  color: #3258b3;
  text-decoration: none;
  font-size: 0.9rem;
}

#modal-redeem-link:hover {
  text-decoration: underline;
}

/* Mobile specific styles */
@media screen and (max-width: 768px) {
  /* Modal on mobile */
  .store-modal-overlay {
    padding: 10px;
  }

  .store-modal-content {
    width: 95%;
    max-width: none;
    margin: 20px auto;
    max-height: calc(100vh - 40px);
  }

  /* Larger close button for mobile */
  .store-close-modal {
    width: 44px;
    height: 44px;
    right: 5px;
    top: 5px;
  }

  .store-close-modal .close-icon {
    width: 16px;
    height: 16px;
  }

  /* Adjust copy section for mobile */
  .store-modal__content-copy {
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    padding: 0 10px;
  }

  .store-modal__content-copy-code {
    border-radius: 0.3rem !important; /* Full border radius */
    border: 2px dashed #3258b3 !important;
    margin-bottom: 0;
    width: 100%;
    font-size: 1.1rem !important;
    padding: 0.75rem 1rem !important;
  }

  .store-modal__content-copy > button {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  /* Better touch targets */
  .store-modal__content-deal-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

/* Force modal display on mobile when needed */
@media screen and (max-width: 768px) {
  .store-modal-overlay.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* ==============================================
   ENHANCED COPY FUNCTIONALITY
   ============================================== */

/* Ensure input selection works properly */
.store-modal__content-copy-code {
  user-select: all !important;
  -webkit-user-select: all !important;
  -moz-user-select: all !important;
  -ms-user-select: all !important;
}

/* Better touch targets on mobile */
@media screen and (max-width: 768px) {
  .store-modal__content-copy > button {
    border-radius: 0.3rem !important; /* Full border radius */
    width: 100%;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    margin-top: 0;
  }

  .store-modal__content-copy-code {
    min-height: 44px;
    font-size: 1.1rem;
  }
}

/* Copy button states */
.store-modal__content-copy > button:active {
  transform: scale(0.98);
}

/* Ensure modal z-index is high enough */
.store-modal-overlay {
  z-index: 999999 !important;
}

/* Prevent background scroll when modal open - SAFER VERSION */
body.modal-open {
  overflow: hidden !important;
  /* Remove position: fixed - causes layout issues */
}

/* Ensure modal hides completely when closed */
.store-modal-overlay:not(.show) {
  display: none !important;
  z-index: -1 !important;
}

/* ==============================================
   COPY BUTTON STATES & ANIMATIONS
   ============================================== */

/* Copy button copied state */
.store-modal__content-copy > button.copied {
  background-color: #28a745 !important; /* Màu xanh lá cây */
  transform: scale(1.05);
  transition: all 0.2s ease-in-out;
}

/* Smooth transition cho tất cả states */
.store-modal__content-copy > button {
  transition: all 0.2s ease-in-out;
}

/* Hover state vẫn giữ nguyên khi chưa copied */
.store-modal__content-copy > button:not(.copied):hover {
  background-color: #487eff;
}

/* Mobile - tăng feedback rõ hơn */
@media screen and (max-width: 768px) {
  .store-modal__content-copy > button.copied {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  }
}

/* ==============================================
   MOBILE TOUCH FIX - REMOVE HOVER STATES
   ============================================== */

/* Remove hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
  .store-modal__content-copy > button:hover {
    background-color: #3258b3 !important; /* Giữ màu gốc */
    transform: none !important;
  }

  .store-modal__content-copy > button:not(.copied):hover {
    background-color: #3258b3 !important; /* Giữ màu gốc */
  }
}

/* Alternative: Use touch-specific styles */
@media screen and (max-width: 768px) {
  .store-modal__content-copy > button {
    /* Remove hover, add active state instead */
    transition: background-color 0.1s ease;
  }

  .store-modal__content-copy > button:hover {
    background-color: #3258b3 !important; /* No hover change */
  }

  .store-modal__content-copy > button:active {
    background-color: #3258b3 !important; /* Active state instead */
    transform: scale(0.98);
  }
}

/* Ensure copied state still works */
@media screen and (max-width: 768px) {
  .store-modal__content-copy > button.copied {
    background-color: #28a745 !important;
    transform: scale(1.05) !important;
  }

  .store-modal__content-copy > button.copied:hover,
  .store-modal__content-copy > button.copied:active {
    background-color: #28a745 !important;
  }
}

/* ==============================================
   RATING CARD STYLES
   ============================================== */

/* Rating card container */
.store-rating-card {
  background-color: white;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #bcc6d7;
}

.store-rating-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: #333;
}

/* Star rating display */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.star-rating .rate-box {
  align-items: center;
  background-color: rgb(253, 220, 43);
  border-radius: 12px;
  color: rgb(80, 80, 80);
  display: inline-flex;
  font-family: var(--font-poppins);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.14;
  margin: auto;
  padding: 2px 0.5rem;
}

.star-rating .rate-box .rate-icon {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none'%3E%3Cpath fill='%23505050' fill-rule='evenodd' stroke='%23505050' stroke-linecap='round' stroke-linejoin='round' d='M6 9.292 2.91 11l.59-3.618L1 4.82l3.455-.528L6 1l1.545 3.292L11 4.82 8.5 7.382 9.09 11z' clip-rule='evenodd'/%3E%3C/svg%3E")
    50% center no-repeat;
  height: 1rem;
  width: 1rem;
  margin-left: 4px;
}

.star-rating .votes {
  color: rgb(80, 80, 80);
  font-family: var(--font-poppins);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.14;
  margin: auto;
  padding-left: 4px;
}

/* User rating section */
.rating .user-rating {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.rating .user-rating .star {
  cursor: default;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.rating .user-rating .star .screen-reader {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.rating .user-rating .star .icon {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27' height='27' fill='none' viewBox='0 0 31 31'%3E%3Cpath stroke='%23D9D9D9' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M15.5 24.388 7.157 29l1.593-9.769L2 12.313l9.328-1.425L15.5 2l4.172 8.888L29 12.313l-6.75 6.918L23.843 29z' clip-rule='evenodd'/%3E%3C/svg%3E")
    50% center no-repeat;
  display: inline-block;
  height: 1.6875rem;
  width: 1.6875rem;
}

.rating .user-rating .star.selected .icon {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27' height='27' fill='none' viewBox='0 0 31 31'%3E%3Cpath fill='%23FDDC2B' fill-rule='evenodd' stroke='%23FDDC2B' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M15.5 24.388 7.157 29l1.593-9.769L2 12.313l9.328-1.425L15.5 2l4.172 8.888L29 12.313l-6.75 6.918L23.843 29z' clip-rule='evenodd'/%3E%3C/svg%3E")
    50% center no-repeat;
}

.rating .user-rating .star:last-child {
  padding-right: 0px;
}

.rating .user-rating.empty .star {
  cursor: pointer;
}

.rating .user-rating.empty .star .icon {
  transition: 0.5s;
}

.rating .user-rating.empty .star:focus-visible {
  outline: none;
}

.rating .user-rating.empty .star:focus-visible .icon {
  outline: rgb(29, 50, 102) solid 2px;
  transition: none;
}

.rating .user-rating.empty:hover:has(.star:hover) .star .icon {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27' height='27' fill='none' viewBox='0 0 31 31'%3E%3Cpath fill='%23FDDC2B' fill-rule='evenodd' stroke='%23FDDC2B' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M15.5 24.388 7.157 29l1.593-9.769L2 12.313l9.328-1.425L15.5 2l4.172 8.888L29 12.313l-6.75 6.918L23.843 29z' clip-rule='evenodd'/%3E%3C/svg%3E")
    50% center no-repeat;
  transition: 0.5s;
}

.rating .user-rating.empty:hover:has(.star:hover) .star:hover ~ .star .icon {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27' height='27' fill='none' viewBox='0 0 31 31'%3E%3Cpath stroke='%23D9D9D9' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M15.5 24.388 7.157 29l1.593-9.769L2 12.313l9.328-1.425L15.5 2l4.172 8.888L29 12.313l-6.75 6.918L23.843 29z' clip-rule='evenodd'/%3E%3C/svg%3E")
    50% center no-repeat;
  transition: 0.5s;
}

.rating .user-message {
  color: rgb(51, 51, 51);
  font-size: 0.75rem;
  line-height: 1.33;
  margin-bottom: 0.75rem;
  font-family: var(--font-poppins);
}

/* Mobile adjustments for rating */
@media screen and (max-width: 768px) {
  .store-rating-card {
    padding: 1.2rem;
    margin-top: 1rem;
  }

  .store-rating-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .rating .user-rating {
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
  }

  .rating .user-rating .star .icon {
    height: 2.2rem !important;
    width: 2.2rem !important;
  }

  .rating .user-message {
    font-size: 0.9rem;
    text-align: left;
    margin-bottom: 1rem;
  }

  .star-rating {
    justify-content: center;
    gap: 0.7rem;
  }

  .star-rating .rate-box {
    font-size: 1rem;
    padding: 4px 0.7rem;
  }

  .star-rating .votes {
    font-size: 1rem;
  }
}
