/* Style riêng trang our-product, gom từ các khối <style> inline trong public/view/our-product.html cũ. */
.tab-link {
          background: none;
          border: none;
          cursor: pointer;
          transition: all 0.3s ease;
          color: #374151;
          font-weight: 400;
        }

        .tab-link:hover {
          font-weight: 600;
        }

        .tab-link.active {
          font-weight: 600;
        }

        /* Tab Pane Styles */
        .tab-pane {
          opacity: 1;
          transition: opacity 0.3s ease;
        }

        .tab-pane.hidden {
          display: none;
        }

        /* Hide scrollbar but allow scroll for product-body */
        .product-body {
          /* hides scrollbar cross-browser */
          -ms-overflow-style: none; /* IE and Edge */
          scrollbar-width: none; /* Firefox */
        }
        .product-body::-webkit-scrollbar {
          display: none; /* Chrome, Safari, Opera */
        }

        /* Allow content taller than one screen inside product-body */
        .product-body .prose,
        .product-body .prose > .flex {
          height: auto !important; /* remove fixed 100% height that clipped content */
          min-height: 100%; /* ensure full height keeps min baseline for alignment */
        }

        /* Hide main_product images but retain layout */
        img[src$="main_product.png"] {
          visibility: hidden;
        }

        .product-description {
          font-family: 'Athiti', sans-serif;
          font-weight: 400;
          font-size: 20px;
          line-height: 145%;
          letter-spacing: 0%;
          text-align: center;
        }

        
        /* Product Container Animation */
        .product-container {
          opacity: 0;
          transform: translateY(50px);
          transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .product-container.animate-in {
          opacity: 1;
          transform: translateY(0);
        }

        /* Staggered animation for product items within container */
        .product-container.animate-in .product-item {
          opacity: 0;
          transform: translateY(30px);
          animation: fadeInUpStaggered 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
        }

        .product-container.animate-in .product-item:nth-child(1) { animation-delay: 0.1s; }
        .product-container.animate-in .product-item:nth-child(2) { animation-delay: 0.2s; }
        .product-container.animate-in .product-item:nth-child(3) { animation-delay: 0.3s; }
        .product-container.animate-in .product-item:nth-child(4) { animation-delay: 0.4s; }
        .product-container.animate-in .product-item:nth-child(5) { animation-delay: 0.5s; }
        .product-container.animate-in .product-item:nth-child(6) { animation-delay: 0.6s; }
        .product-container.animate-in .product-item:nth-child(7) { animation-delay: 0.7s; }
        .product-container.animate-in .product-item:nth-child(8) { animation-delay: 0.8s; }
        .product-container.animate-in .product-item:nth-child(9) { animation-delay: 0.9s; }
        .product-container.animate-in .product-item:nth-child(10) { animation-delay: 1.0s; }

        /* Header animation */
        .product-container .product-header {
          opacity: 0;
          transform: translateY(-20px);
          transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .product-container.animate-in .product-header {
          opacity: 1;
          transform: translateY(0);
          transition-delay: 0.2s;
        }

        /* Main product image and description animation */
        .product-container .flex.gap-12 > div {
          opacity: 0;
          transform: translateX(-30px);
          transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .product-container.animate-in .flex.gap-12 > div:first-child {
          opacity: 1;
          transform: translateX(0);
          transition-delay: 0.3s;
        }

        .product-container.animate-in .flex.gap-12 > div:last-child {
          opacity: 1;
          transform: translateX(0);
          transition-delay: 0.4s;
        }

        /* Active header animation */
        .tab-link.animate-active {
          transform: scale(1.05);
          transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        @keyframes fadeInUpStaggered {
          from {
            opacity: 0;
            transform: translateY(30px);
          }
          to {
            opacity: 1;
            transform: translateY(0);
          }
        }

        /* Scroll progress indicator (optional enhancement) */
        .container-progress {
          position: fixed;
          top: 0;
          left: 0;
          height: 3px;
          background: linear-gradient(90deg, #8b5a3c, #d4b896);
          z-index: 1001;
          transition: width 0.3s ease;
        }

        /* Enhanced responsive design */
        @media (max-width: 1200px) {
          .product-container {
            width: calc(4 * 208px);
          }
        }

        @media (max-width: 900px) {
          .product-container {
            width: calc(3 * 208px);
          }
        }

        @media (max-width: 768px) {
            /* Adjust font size for main description inside each product-body */
        .product-body .flex.flex-col strong,
        .product-body .flex.flex-col p {
          font-size: 14px;
          line-height: 150%;
        }

          .product-item {
            width: 120px !important;
            margin: 0 4px;
          }
          
          .product-container {
            width: calc(2 * 168px);
          }
          
          .arrow-btn {
            display: none !important;
          }
          
          .product-showcase {
            padding: 0 8px;
          }

          /* Mobile menu adjustments */
          .menu-item {
            margin-bottom: 1rem;
          }

          .menu-item h2 {
            font-size: 1rem;
          }

          .description {
            font-size: 0.875rem;
          }

          /* Reduce animation intensity on mobile */
          .product-container {
            transform: translateY(20px);
          }

          /* Mobile product typography & image sizes */
          .product-title {
            font-size: 14px !important;
          }

          .product-description {
            font-size: 8px !important;
            max-width: 100px;
            white-space: normal;
            word-wrap: break-word;
            overflow-wrap: anywhere;
          }

          .product-image img {
            width: 30px !important;
            height: 38px !important;
          }

          /* Mobile hero intro section adjustments */
          .flex.justify-center.items-center.gap-20 {
            flex-direction: column !important;
            gap: 10px !important;
          }

          .flex.justify-center.items-center.gap-20 * {
            font-size: 14px !important;
          }

          /* Mobile product header: show all 6 menu items */
          .product-header ul {
            font-size: 9px !important;
            flex-wrap: nowrap !important;
            gap: 4px !important;
            justify-content: center;
          }

          .product-header ul li .tab-link {
            padding: 2px 4px !important; /* reduce padding */
          }

          /* Set width for description container inside product-body */
          .product-body .flex.flex-col {
            width: 171px !important;
          }

          /* Ensure header area has enough width and increase product grid spacing */
          .product-container {
            width: 100% !important;
          }

          .product-body .grid {
            width: auto !important;        /* override w-full to allow natural width */
            margin-left: 5rem;             /* center horizontally */
            margin-right: auto;            /* center horizontally */
            justify-content: center;       /* distribute columns in center */
            gap: 23px !important;
          }
          img[src$="arrow_down.png"] {
            display: none;
          }
          .product-showcase .product-item {
            width: 82px !important; /* narrow item so 5 fit within viewport */
            margin: 0 12px;          /* keep small horizontal margins */
          }

          .product-showcase .product-image img {
            width: 3rem !important;
            height: 4rem !important;
          }

          .product-showcase .product-container {
            width: auto !important; /* allow JS to set max-width dynamically */
          }
          .product-body {
          /* hides scrollbar cross-browser */
          -ms-overflow-style: none; /* IE and Edge */
          scrollbar-width: none; /* Firefox */
          margin-left: -25px; /* shift product-body left */
        }
        /* Increase spacing between items in grids */
        .product-body .grid {
          gap: 23px !important;
        }
          /* ------------------------------------------------------------------ */
        }

        @media (max-width: 430px) {
          .product-item {
            width: 120px !important;
            margin: 0 4px;
          }
          
          .product-container {
            width: calc(2 * 168px);
          }
          
          .arrow-btn {
            display: none !important;
          }
          
          .product-showcase {
            padding: 0 8px;
          }

          /* Mobile menu adjustments */
          .menu-item {
            margin-bottom: 1rem;
          }

          .menu-item h2 {
            font-size: 1rem;
          }

          .description {
            font-size: 0.875rem;
          }

          /* Reduce animation intensity on mobile */
          .product-container {
            transform: translateY(20px);
          }

          /* Mobile product typography & image sizes */
          .product-title {
            font-size: 14px !important;
          }

          .product-description {
            font-size: 8px !important;
            max-width: 100px;
            white-space: normal;
            word-wrap: break-word;
            overflow-wrap: anywhere;
          }

          /* Mobile hero intro section adjustments */
          .flex.justify-center.items-center.md:gap-20 {
            flex-direction: column !important;
            gap: 10px !important;
          }

          .flex.justify-center.items-center.md:gap-20 * {
            font-size: 14px !important;
          }

          /* Mobile product header: show all 6 menu items */
          .product-header ul {
            font-size: 9px !important;
            flex-wrap: nowrap !important;
            gap: 4px !important;
            justify-content: center;
          }

          .product-header ul li .tab-link {
            padding: 2px 2px !important; /* reduce padding */
            white-space: nowrap !important;
          }

          /* Set width for description container inside product-body */
          .product-body .flex.flex-col {
            width: 400px !important;
          }

          /* Ensure header area has enough width and increase product grid spacing */
          .product-container {
            width: 100% !important;
          }

          .product-body .grid {
            width: auto !important;        /* override w-full to allow natural width */
            margin-left: auto;             /* center horizontally */
            margin-right: auto;            /* center horizontally */
            justify-content: center;       /* distribute columns in center */
            gap: 23px !important;          /* increased spacing on small mobile */
            padding-top:2rem;
          }
          /* Category-specific mobile styles */
          img[src$="category_1.png"] {
            content: url('/images/product/category_1_mobile.png');
          }

          img[src$="category_2.png"] {
              content: url('/images/product/category_2_mobile.png');
          }

          img[src$="category_3.png"] {
              content: url('/images/product/category_3_mobile.png');
          }

          img[src$="category_4.png"] {
              content: url('/images/product/category_4_mobile.png');
          }

          img[src$="category_5.png"] {
              content: url('/images/product/category_5_mobile.png');
          }

          img[src$="category_6.png"] {
              content: url('/images/product/category_6_mobile.png');
          }

          img[src$="arrow_down.png"] {
            display: none !important;
          }

          #header-section {
            display: none !important;
          }

          #header-section-mobile {
            display: flex !important;
          }
        }
  /* Center entire product-body on mobile to keep content horizontally aligned */
  @media (max-width: 768px) {
    .product-body {
      margin-left: auto !important;
      margin-right: auto !important;
    }
    /* Ensure inner grid is also centered */
    .product-body .grid {
      margin-left: auto !important;
      margin-right: auto !important;
    }
  }
  /* Center inner flex container and its content inside product-body */
  .product-body .flex.flex-col {
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: start !important; /* ensure children (image/description/grid) are centered */
  }
  /* Reflow image and description layout on very small screens */
  @media (max-width: 430px) {
    .product-body .flex.md\:gap-12 > div:first-child {
      margin-bottom: 1rem !important; /* spacing between image and text */
    }
    .product-body .flex.md\:gap-12 .flex.flex-col {
      width: 100% !important;          /* allow text block to take full width */
      max-width: 350px;                /* keep reasonable width */
    }
  }

@keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Enhanced menu styles */
  .menu-item {
    position: relative;
    overflow: hidden;
    height: auto;
    width: 400px; /* Fixed width to prevent layout shift */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    padding-left: 40px;
  }

  .menu-item h2 {
    cursor: pointer;
    position: relative;
    z-index: 2;
    padding-left: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
  }

  .product-description-mobile {
    font-family: 'Athiti', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 151%;
    letter-spacing: 0%;
    width: 80%;
  }


  .description {
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    padding-left: 0.5rem;
    font-size: 18px;
    font-weight: 400;
    line-height: 151%;
    width: 299px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .description.show {
    opacity: 1;
    color: #000;
    max-height: 500px;
    transform: translateY(0);
  }

  /* Menu container to prevent layout jumping */
  #leftMenu {
    min-width: 450px; /* Ensure enough space for expanded descriptions */
    max-width: 450px;
  }

  /* Smooth scrolling for right content */
  #rightContent {
    position: relative;
    min-height: 600px;
    overflow: hidden;
  }

  #rightContent section {
    position: relative;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateX(30px);
  }

  #rightContent section.active-section {
    opacity: 1;
    transform: translateX(0);
  }

  /* Section animations for tab switching */
  .section-hidden {
    display: none !important;
    opacity: 0;
  }

  .section-visible {
    display: block !important;
    opacity: 1;
  }

  /* Product showcase styles */
  .product-showcase {
    font-family: 'Inter', sans-serif;
  }

  .product-container {
    width: calc(5.5 * 208px); /* Exactly 5 items: 192px width + 16px margin each */
  }

  .product-item {
    animation: fadeInUp 0.6s ease-out;
    flex-shrink: 0;
  }

  /* Sticky header styles */
  #product-tab-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fffbef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 0 !important;
  }

  #product-tab-header.sticky + .p-6 {
    padding-top: 100px; /* Adjust based on header height */
  }

  /* Smooth scroll behavior */
  html {
    scroll-behavior: smooth;
  }

  .product-item:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
  }

  .product-image img {
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    transition: filter 0.3s ease;
    width: 100px;
    height: 126px;
    object-fit: contain;
  }

  .product-item:hover .product-image img {
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.2));
  }

  .arrow-btn:hover {
    background-color: #f0fdf4;
  }

  .arrow-btn:active {
    transform: scale(0.95);
  }

  .product-title {
    font-family: 'Athiti', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 160%;
    letter-spacing: 0%;
    text-align: center;
    text-transform: uppercase;
  }

  .product-description {
    font-family: 'Athiti', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 145%;
    letter-spacing: 0%;
    text-align: center;
  }


  /* Product Container Animation */
  .product-container {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .product-container.animate-in {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered animation for product items within container */
  .product-container.animate-in .product-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpStaggered 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  }

  .product-container.animate-in .product-item:nth-child(1) { animation-delay: 0.1s; }
  .product-container.animate-in .product-item:nth-child(2) { animation-delay: 0.2s; }
  .product-container.animate-in .product-item:nth-child(3) { animation-delay: 0.3s; }
  .product-container.animate-in .product-item:nth-child(4) { animation-delay: 0.4s; }
  .product-container.animate-in .product-item:nth-child(5) { animation-delay: 0.5s; }
  .product-container.animate-in .product-item:nth-child(6) { animation-delay: 0.6s; }
  .product-container.animate-in .product-item:nth-child(7) { animation-delay: 0.7s; }
  .product-container.animate-in .product-item:nth-child(8) { animation-delay: 0.8s; }
  .product-container.animate-in .product-item:nth-child(9) { animation-delay: 0.9s; }
  .product-container.animate-in .product-item:nth-child(10) { animation-delay: 1.0s; }

  /* Header animation */
  .product-container .product-header {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .product-container.animate-in .product-header {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
  }

  /* Main product image and description animation */
  .product-container .flex.gap-12 > div {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .product-container.animate-in .flex.gap-12 > div:first-child {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
  }

  .product-container.animate-in .flex.gap-12 > div:last-child {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.4s;
  }

  /* Active header animation */
  .tab-link.animate-active {
    transform: scale(1.05);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  @keyframes fadeInUpStaggered {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Scroll progress indicator (optional enhancement) */
  .container-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5a3c, #d4b896);
    z-index: 1001;
    transition: width 0.3s ease;
  }

  /* Enhanced responsive design */
  @media (max-width: 1200px) {
    .product-container {
      width: calc(4 * 208px);
    }
  }

  @media (max-width: 700px) {
    
    #product-section-mobile {
      display: block !important;
    }

    #product-section {
      display: none !important;
    }
    .product-item {
      width: 120px !important;
      margin: 0 4px;
    }
    
    .product-container {
      width: calc(2 * 168px);
    }
    
    .arrow-btn {
      display: none !important;
    }
    
    .product-showcase {
      padding: 0 8px;
    }

    /* Mobile menu adjustments */
    .menu-item {
      margin-bottom: 1rem;
    }

    .menu-item h2 {
      font-size: 1rem;
    }

    .description {
      font-size: 0.875rem;
    }

    /* Reduce animation intensity on mobile */
    .product-container {
      transform: translateY(20px);
    }

    /* Mobile product typography & image sizes */
    .product-title {
      font-size: 14px !important;
    }

    .product-description {
      font-size: 12px !important;
      max-width: 80px;
      white-space: normal;
      word-wrap: break-word;
      overflow-wrap: anywhere;
    }

    /* Mobile hero intro section adjustments */
    .flex.justify-center.items-center.md:gap-20 {
      flex-direction: column !important;
      gap: 10px !important;
    }

    .flex.justify-center.items-center.md:gap-20 * {
      font-size: 14px !important;
    }

    /* Mobile product header: show all 6 menu items */
    .product-header ul {
      font-size: 9px !important;
      flex-wrap: nowrap !important;
      gap: 4px !important;
      justify-content: center;
    }

    .product-header ul li .tab-link {
      padding: 2px 2px !important; /* reduce padding */
      white-space: nowrap !important;
    }

    /* Set width for description container inside product-body */
    .product-body .flex.flex-col {
      width: 80% !important;
    }

    /* Ensure header area has enough width and increase product grid spacing */
    .product-container {
      width: 100% !important;
    }

    .product-body .grid {
      width: auto !important;        /* override w-full to allow natural width */
      margin-left: auto;             /* center horizontally */
      margin-right: auto;            /* center horizontally */
      justify-content: center;       /* distribute columns in center */
      gap: 30px !important;          /* increased spacing on small mobile */
      padding-top:2rem;
    }
    /* Category-specific mobile styles */
    img[src$="category_1.png"] {
      content: url('/images/product/category_1_mobile.png');
    }

    img[src$="category_2.png"] {
        content: url('/images/product/category_2_mobile.png');
    }

    img[src$="category_3.png"] {
        content: url('/images/product/category_3_mobile.png');
    }

    img[src$="category_4.png"] {
        content: url('/images/product/category_4_mobile.png');
    }

    img[src$="category_5.png"] {
        content: url('/images/product/category_5_mobile.png');
    }

    img[src$="category_6.png"] {
        content: url('/images/product/category_6_mobile.png');
    }

    img[src$="arrow_down.png"] {
      display: none !important;
    }

    #header-section {
      display: none !important;
    }

    #header-section-mobile {
      display: flex !important;
    }
  }
  /* Center entire product-body on mobile to keep content horizontally aligned */
  @media (max-width: 768px) {
    .product-body {
      margin-left: auto !important;
      margin-right: auto !important;
    }
  }
  /* Center inner flex container and its content inside product-body */
  .product-body .flex.flex-col {
    margin-left: auto !important;
    margin-right: auto !important;
    align-items: start !important; /* ensure children (image/description/grid) are centered */
  }
