

:root {
  --primary-color: #4CAF50;
  --primary-dark: #388E3C;
  --primary-light: #C8E6C9;
  --accent-color: #8BC34A;
  --text-primary: #212121;
  --text-secondary: #757575;
  --divider-color: #BDBDBD;
  --background-color: #f9f9f9;
  --white: #ffffff;
  --error-color: #F44336;
  --warning-color: #FFC107;
  --success-color: #4CAF50;
  --info-color: #2196F3;
  
  
  --happy-leaf-4: #4CAF50; 
  --happy-leaf-5: #FFFFFF; 
  --happy-leaf-6: #9C27B0; 
  --happy-leaf-7: #FFC107; 
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  padding-bottom: 60px; 
  overflow-x: hidden;
}


h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}


.container {
  max-width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

.header {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
  color: var(--white);
  margin-bottom: 0;
  font-size: 1.5rem;
}

.product-selector {
  display: flex;
  overflow-x: auto;
  padding: 0.5rem 0;
  background-color: var(--white);
  border-bottom: 1px solid var(--divider-color);
  position: sticky;
  top: 60px;
  z-index: 99;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; 
}

.product-selector::-webkit-scrollbar {
  display: none; 
}

.product-tab {
  padding: 0.75rem 1.25rem;
  margin-right: 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s;
  border: 1px solid var(--divider-color);
  user-select: none;
  -webkit-user-select: none;
}

.product-tab.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.product-tab:last-child {
  margin-right: 1rem;
}

.content {
  padding: 1rem 0;
}

.product-content {
  display: none;
  background-color: var(--white);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-content.active {
  display: block;
}


.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

table, th, td {
  border: 1px solid var(--divider-color);
}

th, td {
  padding: 0.75rem;
  text-align: left;
}

th {
  background-color: var(--primary-light);
  color: var(--text-primary);
}

tr:nth-child(even) {
  background-color: #f2f2f2;
}


.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

select, input[type="date"], input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--divider-color);
  border-radius: 4px;
  font-size: 1rem;
  background-color: var(--white);
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23757575'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.5rem;
  padding-right: 2.5rem;
}

button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  background-color: var(--primary-dark);
}

button:active {
  transform: translateY(1px);
}


.accordion {
  margin-bottom: 1rem;
  border: 1px solid var(--divider-color);
  border-radius: 4px;
  overflow: hidden;
}

.accordion-header {
  background-color: var(--primary-light);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}

.accordion-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: var(--white);
}

.accordion-content.active {
  padding: 1rem;
  max-height: 1000px;
}


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}


.calendar {
  margin-bottom: 1.5rem;
}

.reminder-list {
  list-style: none;
}

.reminder-item {
  background-color: var(--white);
  border-left: 4px solid var(--primary-color);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.reminder-date {
  font-weight: bold;
  color: var(--primary-dark);
}

.reminder-action {
  margin-top: 0.5rem;
}


.product-hl4 {
  border-left: 4px solid var(--happy-leaf-4);
}

.product-hl5 {
  border-left: 4px solid var(--divider-color); 
}

.product-hl6 {
  border-left: 4px solid var(--happy-leaf-6);
}

.product-hl7 {
  border-left: 4px solid var(--happy-leaf-7);
}


.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.hidden {
  display: none;
}


@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .product-selector {
    justify-content: center;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}


.loader {
  border: 4px solid var(--primary-light);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.notification {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-dark);
  color: white;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  max-width: 90%;
  text-align: center;
}

.notification.show {
  opacity: 1;
}

.notification.error {
  background-color: var(--error-color);
}

.notification.success {
  background-color: var(--success-color);
}


.crop-selector {
  margin-bottom: 1.5rem;
}

.crop-category {
  margin-bottom: 1rem;
}

.crop-category-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
}

.crop-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.crop-item {
  background-color: var(--primary-light);
  padding: 0.5rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.crop-item.selected {
  background-color: var(--primary-color);
  color: var(--white);
}


.schedule-builder {
  background-color: var(--white);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.schedule-timeline {
  position: relative;
  padding-left: 30px;
  margin-top: 1.5rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.timeline-item:after {
  content: '';
  position: absolute;
  left: -16px;
  top: 10px;
  width: 2px;
  height: calc(100% - 10px);
  background-color: var(--primary-light);
}

.timeline-item:last-child:after {
  display: none;
}

.timeline-date {
  font-weight: bold;
  color: var(--primary-dark);
}

.timeline-content {
  margin-top: 0.25rem;
}


.faq-item {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 1rem;
}

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

.faq-question {
  font-weight: 500;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.faq-answer {
  padding-left: 0.5rem;
  border-left: 2px solid var(--primary-light);
}


.product-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge-hl4 {
  background-color: var(--happy-leaf-4);
  color: white;
}

.badge-hl5 {
  background-color: var(--divider-color);
  color: var(--text-primary);
}

.badge-hl6 {
  background-color: var(--happy-leaf-6);
  color: white;
}

.badge-hl7 {
  background-color: var(--happy-leaf-7);
  color: var(--text-primary);
}


.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem;
  padding-left: 2.5rem;
  border: 1px solid var(--divider-color);
  border-radius: 4px;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-results {
  background-color: var(--white);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-height: 300px;
  overflow-y: auto;
  display: none;
  position: absolute;
  width: 100%;
  z-index: 10;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--divider-color);
  cursor: pointer;
}

.search-result-item:hover {
  background-color: var(--primary-light);
}

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


.tabs {
  display: flex;
  border-bottom: 1px solid var(--divider-color);
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; 
}

.tabs::-webkit-scrollbar {
  display: none; 
}

.tab {
  padding: 0.75rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.tab.active {
  border-bottom: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 500;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}


.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 3px 5px rgba(0,0,0,0.2);
  z-index: 99;
  font-size: 1.5rem;
}


.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.modal-title {
  margin-bottom: 1.5rem;
}

.modal-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.modal-footer button {
  margin-left: 0.5rem;
}


.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.05);
}


.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--error-color);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  justify-content: center;
  align-items: center;
}


.highlight {
  animation: highlight-pulse 2s;
}

@keyframes highlight-pulse {
  0% { background-color: var(--primary-light); }
  50% { background-color: var(--primary-light); }
  100% { background-color: transparent; }
}


@media (max-width: 768px) {
  .product-tab, .tab, .crop-item, button, .nav-item, .contact-btn {
    min-height: 44px; 
  }
  
  .product-tab {
    padding: 0.75rem 1rem;
  }
  
  input, select, button {
    font-size: 16px; 
  }
  
  .reminder-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .reminder-actions button {
    flex: 1;
    min-width: 100px;
  }
}


@media print {
  .header, .product-selector, .bottom-nav, .fab, .quick-contact, .search-container {
    display: none;
  }
  
  body {
    padding-bottom: 0;
    background-color: white;
  }
  
  .container {
    max-width: 100%;
    padding: 0;
  }
  
  .product-content {
    display: block;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  a {
    text-decoration: none;
    color: var(--text-primary);
  }
  
  .schedule-timeline {
    page-break-inside: avoid;
  }
  
  .timeline-item {
    page-break-inside: avoid;
  }
}




.quick-contact {
  position: fixed;
  right: 20px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99;
}


.contact-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  text-decoration: none;
}

.contact-btn:hover {
  transform: scale(1.1);
}


.zalo-btn {
  background-color: #0068ff;
}


.phone-btn {
  background-color: #4CAF50;
}


.qr-btn {
  background-color: #FF9800;
}


.qr-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.qr-modal.active {
  display: flex;
}

.qr-modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 300px;
  width: 80%;
  text-align: center;
  position: relative;
}

.qr-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 24px;
  cursor: pointer;
  color: #757575;
}

.qr-code-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 10px auto;
}

.qr-modal-title {
  margin-bottom: 10px;
  color: #4CAF50;
}

.qr-modal-text {
  margin-bottom: 15px;
  font-size: 14px;
}


.contact-tooltip {
  position: absolute;
  right: 60px;
  background-color: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

.contact-btn:hover .contact-tooltip {
  opacity: 1;
}


@media (max-width: 768px) {
  .quick-contact {
    bottom: 70px;
  }
  
  .contact-btn {
    width: 45px;
    height: 45px;
  }
}


@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

.phone-btn {
  animation: pulse 2s infinite;
}


.floating-label {
  position: fixed;
  bottom: 130px;
  right: 20px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(10px);
  pointer-events: none;
}

.floating-label.show {
  opacity: 1;
  transform: translateY(0);
}


@media print {
  .quick-contact {
    display: none;
  }
}




html {
  touch-action: manipulation;
}

body {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


button, 
.nav-item, 
.product-tab, 
.tab, 
.crop-item, 
.contact-btn,
.faq-question,
select,
input[type="date"],
input[type="text"] {
  min-height: 48px;
  min-width: 48px;
}


input, 
select, 
textarea {
  font-size: 16px !important;
}


.product-selector,
.tabs,
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.product-tab,
.tab {
  scroll-snap-align: start;
}


@media (max-width: 480px) {
  .table-responsive {
    margin: 0 -1rem;
    width: calc(100% + 2rem);
    padding: 0 1rem;
  }
  
  table {
    font-size: 0.85rem;
  }
  
  th, td {
    padding: 0.5rem;
  }
}


select {
  background-position: right 0.5rem center;
  background-size: 1.25rem;
}


@media (max-width: 360px) {
  .nav-item {
    font-size: 0.7rem;
  }
  
  .nav-icon {
    font-size: 1.25rem;
  }
}


@media (max-width: 480px) {
  .quick-contact {
    bottom: 65px;
  }
  
  .contact-btn {
    width: 42px;
    height: 42px;
  }
}


@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: 1rem;
  }
  
  .modal-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }
}


.faq-question {
  position: relative;
  padding-right: 30px;
  cursor: pointer;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--primary-color);
}

.faq-question.active::after {
  content: '−';
}

.faq-answer {
  display: none;
}

.faq-answer.active {
  display: block;
}


.product-content {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


.header {
  height: 60px;
  display: flex;
  align-items: center;
}


.product-selector {
  height: 50px;
  align-items: center;
}


.notification {
  max-width: 85%;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}


.search-input {
  height: 48px;
  border-radius: 24px;
}


@media (max-height: 500px) and (orientation: landscape) {
  .header {
    height: 50px;
  }
  
  .header h1 {
    font-size: 1.2rem;
  }
  
  .product-selector {
    height: 40px;
  }
  
  .product-tab {
    padding: 0.5rem 1rem;
  }
  
  .bottom-nav {
    padding: 0.5rem 0;
  }
  
  .quick-contact {
    bottom: 55px;
  }
}


@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .product-content {
    padding: 1.5rem;
  }
  
  .quick-contact {
    right: 30px;
  }
  
  .contact-btn {
    width: 55px;
    height: 55px;
  }
}


.product-tab,
.tab,
button,
.contact-btn {
  transition: transform 0.15s ease, background-color 0.3s ease;
}

.product-tab:active,
.tab:active,
button:active,
.contact-btn:active {
  transform: scale(0.95);
}


@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


@media (prefers-color-scheme: dark) {
  .dark-mode-supported {
    --background-color: #121212;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --divider-color: #333333;
    --white: #1e1e1e;
  }
  
  .dark-mode-supported .product-content,
  .dark-mode-supported .modal-content,
  .dark-mode-supported .bottom-nav {
    background-color: #1e1e1e;
  }
  
  .dark-mode-supported table tr:nth-child(even) {
    background-color: #2a2a2a;
  }
}


@media print {
  body {
    font-size: 12pt;
  }
  
  .product-content {
    break-inside: avoid;
  }
  
  table {
    break-inside: auto;
  }
  
  tr {
    break-inside: avoid;
    break-after: auto;
  }
}




:root {
  --vh: 1vh;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


body {
  position: relative;
  
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  
  max-height: 999999px;
}


@supports (-moz-appearance:none) {
  body {
    font-size: 16px !important;
  }
  
  input, select, textarea, button {
    font-size: 16px !important;
  }
}


input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
  font-size: 16px !important;
  max-height: 999999px;
}


input, textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
}


button, 
.button,
[role="button"] {
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}


* {
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-tap-highlight-color: transparent;
}


.scrollable,
.product-selector,
.tabs,
.container,
.tab-content {
  -webkit-overflow-scrolling: touch;
}


.container {
  overscroll-behavior-y: none;
  overflow-y: auto;
}


.product-content,
.tab-content {
  overflow-x: hidden;
  width: 100%;
}


.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}


@supports (-moz-appearance:none) {
  body, input, button, select, textarea {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  }
}


.header {
  padding-top: env(safe-area-inset-top, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}


.header,
.bottom-nav,
.quick-contact {
  position: fixed;
  z-index: 1000;
  left: 0;
  right: 0;
}

.header {
  top: 0;
}

.bottom-nav {
  bottom: 0;
}


@media screen and (max-height: 450px) {
  .bottom-nav {
    position: absolute;
  }
  
  .quick-contact {
    display: none;
  }
}


html {
  position: fixed;
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}


html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}


@supports (-moz-appearance:none) {
  .product-selector,
  .tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .product-selector::-webkit-scrollbar,
  .tabs::-webkit-scrollbar {
    display: none;
  }
}


@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
    height: calc(60px + env(safe-area-inset-top));
  }
  
  .container {
    margin-top: calc(60px + env(safe-area-inset-top));
  }
}


@supports (padding-top: constant(safe-area-inset-top)) {
  .header {
    padding-top: constant(safe-area-inset-top);
    height: calc(60px + constant(safe-area-inset-top));
  }
  
  .container {
    margin-top: calc(60px + constant(safe-area-inset-top));
  }
}


@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(50px + env(safe-area-inset-bottom));
  }
  
  .container {
    margin-bottom: calc(50px + env(safe-area-inset-bottom));
  }
  
  .quick-contact {
    bottom: calc(65px + env(safe-area-inset-bottom));
  }
}


@supports (padding-bottom: constant(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: constant(safe-area-inset-bottom);
    height: calc(50px + constant(safe-area-inset-bottom));
  }
  
  .container {
    margin-bottom: calc(50px + constant(safe-area-inset-bottom));
  }
  
  .quick-contact {
    bottom: calc(65px + constant(safe-area-inset-bottom));
  }
}


@supports (-moz-appearance:none) {
  .container {
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    height: calc(100% - 110px);
  }
}


.modal {
  -webkit-overflow-scrolling: touch;
}

.modal-content {
  transform: translate(0, 0);
}


@media screen and (max-width: 480px) {
  .modal-content {
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
  }
}


@supports (-moz-appearance:none) {
  .modal-content {
    max-height: 80vh;
    overflow-y: auto;
  }
}


input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
}


select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0l6 6 6-6z' fill='%23333'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px !important;
}


@supports (-moz-appearance:none) {
  select {
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0l6 6 6-6z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px !important;
  }
}


img {
  -webkit-touch-callout: none;
}


img {
  max-width: 100%;
  height: auto;
}


@supports (-moz-appearance:none) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}


body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


body {
  text-rendering: optimizeLegibility;
}


@supports (-moz-appearance:none) {
  body {
    text-rendering: optimizeLegibility;
  }
}



.product-image-container {
    margin: 20px 0;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    padding: 15px;
}

.product-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

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

.product-image-caption {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}


.product-hl4 .product-image-container {
    border-left: 4px solid #4CAF50;
}

.product-hl5 .product-image-container {
    border-left: 4px solid #2196F3;
}

.product-hl6 .product-image-container {
    border-left: 4px solid #9C27B0;
}

.product-hl7 .product-image-container {
    border-left: 4px solid #FFC107;
}


.qr-verification-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.qr-code-container {
    margin: 15px 0;
    text-align: center;
}

.qr-code-img {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-instruction {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.qr-instruction a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.qr-instruction a:hover {
    text-decoration: underline;
}


.product-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 8px;
}

.product-tag.product-4 {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2E7D32;
}

.product-tag.product-5 {
    background-color: rgba(33, 150, 243, 0.2);
    color: #0D47A1;
}

.product-tag.product-6 {
    background-color: rgba(156, 39, 176, 0.2);
    color: #7B1FA2;
}

.product-tag.product-7 {
    background-color: rgba(255, 193, 7, 0.2);
    color: #F57F17;
}


@media screen and (max-width: 480px) {
    .product-image-container {
        margin: 15px 0;
        padding: 10px;
    }
    
    .qr-code-img {
        max-width: 150px;
    }
}

@media screen and (min-width: 768px) {
    .product-image-container {
        max-width: 80%;
        margin: 20px auto;
    }
}


@media (prefers-color-scheme: dark) {
    .product-image-container {
        background-color: #2d2d2d;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
    .qr-verification-section {
        background-color: #2d2d2d;
        border-color: #444;
    }
    
    .product-image-caption,
    .qr-instruction {
        color: #bbb;
    }
}



/* --- Mobile optimization v4.1 --- */
:root{
  --hl-container: 100%;
  --hl-gap: 16px;
  --hl-radius: 12px;
}
html, body { overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; height: auto; }
picture, img { content-visibility: auto; contain-intrinsic-size: 800px 600px; }

/* Container */
.main-container{ max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (max-width: 1024px){
  .main-container{ max-width: 960px; }
}
@media (max-width: 768px){
  .main-container{ max-width: 100%; padding-inline: 12px; }
  h1{ font-size: 1.35rem; line-height: 1.25; }
  h2{ font-size: 1.15rem; }
  h3{ font-size: 1.05rem; }
  p, li, label, input, button{ font-size: 0.98rem; }
}

/* Tabs: make them horizontally scrollable on small screens */
.product-tabs, .tabs, .hl-tabs {
  display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scroll-snap-type: x proximity; padding-bottom: 6px;
}
.product-tabs > *, .tabs > * , .hl-tabs > * { flex: 0 0 auto; scroll-snap-align: start; }
.product-tabs button, .tabs button{
  min-height: 40px; padding: 8px 12px; border-radius: 999px;
}

/* Cards & blocks spacing */
.card, .block, .panel {
  border-radius: var(--hl-radius);
}
@media (max-width: 768px){
  .card, .block, .panel { padding: 12px; }
  .grid { gap: 12px; }
}

/* Search input touch target */
input[type="search"], .search-input {
  min-height: 44px; padding: 10px 12px; border-radius: 10px;
}

/* Bottom nav buttons (if any) – ensure touch-friendly */
.bottom-nav a, .bottom-nav button{
  min-height: 44px; min-width: 44px;
}

/* Sticky footer bar on mobile: compact */
@media (max-width: 768px){
  .footer-bar, .bottom-bar{ position: sticky; bottom: 0; backdrop-filter: saturate(120%) blur(8px); }
}

/* Progressive image placeholders */
img[loading="lazy"] { background: rgba(0,0,0,.03); border-radius: 8px; }

/* Reduce motion for users who prefer less */
@media (prefers-reduced-motion: reduce){
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Improve contrast for green theme on light bg */
.hl-green { color: #0a7a3a; }
.hl-green-bg { background-color: #eaf6ef; }


/* ===== Brand Mobile UX v4.2 ===== */
:root{
  --hl-green: #007a48;
  --hl-green-600: #0a7a3a;
  --hl-gold: #b57f1b;
  --hl-bg: #f6faf7;
  --hl-border: #d8e8df;
  --hl-radius: 14px;
  --hl-shadow: 0 6px 18px rgba(0,0,0,.06);
  --hl-shadow-soft: 0 4px 12px rgba(0,0,0,.04);
}

/* Page background */
body{ background: var(--hl-bg); }

/* Header with brand logo centered */
header{ background: linear-gradient(90deg,#f6faf7 0%, #eaf6ef 100%); border-bottom:1px solid var(--hl-border); }
header img[alt="HappyLeaf Logo"]{ filter: drop-shadow(0 2px 4px rgba(0,0,0,.06)); }

/* Pills Tabs with brand accent */
.product-tabs button, .tabs button{
  background: #fff; border:1px solid var(--hl-border); color:#2b3d33;
  border-radius:999px; box-shadow: var(--hl-shadow-soft);
}
.product-tabs button[aria-selected="true"], .tabs button[aria-selected="true"], 
.product-tabs .active, .tabs .active{
  background: linear-gradient(135deg, var(--hl-green) 0%, #0e9d59 100%);
  color:#fff; border-color: transparent;
}

/* Cards */
.card, .panel, .block{
  background:#fff; border: 1px solid var(--hl-border); box-shadow: var(--hl-shadow);
}

/* Primary buttons */
.btn-primary, button.primary, .cta-primary{
  background: linear-gradient(135deg, var(--hl-green) 0%, #0e9d59 100%);
  color:#fff; border:none; border-radius:12px; box-shadow: var(--hl-shadow);
}
.btn-primary:active{ transform: translateY(1px); }

/* Secondary buttons */
.btn-outline, .cta-outline{
  background:#fff; color: var(--hl-green-600);
  border:1px solid var(--hl-green-600); border-radius:12px;
}

/* Search field */
.search-input{
  border:1px solid var(--hl-border); box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}

/* Section headings */
h1,h2{
  color: var(--hl-green-600);
}

/* Sticky CTA bar (optional; will style if exists in HTML) */
.hlx-cta-bar{
  position: sticky; bottom:0; left:0; right:0;
  display:flex; gap:10px; padding:10px 12px; background:rgba(255,255,255,.85);
  backdrop-filter: saturate(120%) blur(8px); border-top:1px solid var(--hl-border);
}
.hlx-cta-bar a, .hlx-cta-bar button{
  flex:1 1 auto; min-height:48px; border-radius:12px; font-weight:600;
}

/* FAQ accordions: larger hit area */
details, .faq-item{ border-radius:12px; border:1px solid var(--hl-border); background:#fff; padding:12px; }
details + details{ margin-top:10px; }
summary{ cursor:pointer; outline:none; }
summary::-webkit-details-marker{ display:none; }
summary{ position:relative; padding-right:30px; }
summary:after{
  content:""; position:absolute; right:8px; top:50%; width:16px; height:16px;
  border-right:2px solid var(--hl-green); border-bottom:2px solid var(--hl-green);
  transform: translateY(-50%) rotate(-45deg); transition: transform .2s ease;
}
details[open] summary:after{ transform: translateY(-50%) rotate(45deg); }


/* --- v4.3: Pill/Tab gradient & borders refinement --- */
.product-tabs button, .tabs button{
  border-width:1px;
  border-color:#A8D5C1; /* mảnh hơn */
}
.product-tabs button[aria-selected="true"], .tabs button[aria-selected="true"],
.product-tabs .active, .tabs .active{
  background: linear-gradient(135deg, #0fb665 0%, #007a48 100%); /* đổi gradient */
  border-width:2px; /* đậm hơn khi active */
  border-color:#0e9d59;
  color:#fff;
}


/* ===== v4.4 All-devices mobile fixes ===== */
:root{
  --hl-header-h: 56px;
  --hl-bottom-h: 60px;
}

/* Typography clamp to avoid oversized headings on large-density phones */
h1{ font-size: clamp(1.25rem, 3.5vw, 1.75rem); line-height: 1.25; }
h2{ font-size: clamp(1.1rem, 3vw, 1.45rem); line-height: 1.3; }
h3{ font-size: clamp(1rem, 2.6vw, 1.25rem); line-height: 1.35; }
p, li, label, input, button{ font-size: clamp(.95rem, 2.2vw, 1rem); }

/* Sticky header spacing (if header sticks) */
@supports (padding-top: max(0px)) {
  body { padding-top: max(env(safe-area-inset-top), 0px); }
}

/* Tabs: single-line, ellipsis, consistent pill width */
.product-tabs, .tabs, .hl-tabs{
  gap: 10px;
}
.product-tabs button, .tabs button{
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
  max-width: clamp(110px, 28vw, 170px);
  min-width: clamp(96px, 24vw, 150px);
  font-weight: 600;
  padding: 10px 14px;
}

/* Prevent header/tabs overlap with content */
.main-container{ padding-top: 8px; }
@media (max-width: 768px){
  .main-container{ padding-top: 12px; }
}

/* Search input fixes on Samsung */
input[type="search"], .search-input{
  font-size: 16px; /* avoid zoom on iOS */
  line-height: 1.2;
}

/* Floating Contact Buttons: move right & avoid overlap */
.floating-buttons, .fab-stack, .contact-floating{
  position: fixed !important;
  left: 10px !important;
  top: auto !important;
  bottom: calc(var(--hl-bottom-h) + 24px) !important;
  z-index: 50;
}
@media (max-width: 768px){
  .floating-buttons, .fab-stack, .contact-floating{ left: 10px !important; bottom: calc(var(--hl-bottom-h) + 16px) !important; }
}
/* Reduce size on mobile to avoid covering content */
.floating-buttons > *, .fab-stack > *, .contact-floating > *{
  transform: scale(.92);
  transform-origin: bottom left;
}

/* Bottom nav spacing so content doesn't get hidden */
.page-content, .main-container{
  padding-bottom: calc(var(--hl-bottom-h) + 24px);
}

/* Tabs underline indicator (if present) keep within viewport */
.tab-indicator{ max-width: 100%; }

/* Ensure images don't overflow rounded containers */
.card img, .panel img{ border-radius: 10px; }
