/* ==========================================================================
   Nội Thất MOHO - Custom Stylesheet (Replicating https://moho.com.vn/)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --moho-primary: #ef683a;
  --moho-primary-dark: #d55327;
  --moho-text: #333333;
  --moho-text-muted: #666666;
  --moho-border: #ededed;
  --moho-bg-light: #f9f9f9;
  --moho-red: #e70505;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--moho-text);
  background-color: #ffffff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ================= Sticky Header & Navigation ================= */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ================= Desktop Navigation (Exact moho.com.vn) ================= */
.menuList-main {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menuList-main > li {
  position: relative;
  list-style: none;
  margin: 0;
}

.menuList-main > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 24px 14px;
  font-weight: 600;
  font-size: 14px;
  color: #333333;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.menuList-main > li > a:hover,
.menuList-main > li.active > a {
  color: var(--moho-primary);
}

.menuList-main > li > a i {
  font-size: 10px;
  opacity: 0.7;
  transition: transform 0.25s ease;
}

.menuList-main > li:hover > a i.fa-chevron-down {
  transform: rotate(180deg);
  color: var(--moho-primary);
}

/* Submenu Level 1 */
.menuList-main li.has-submenu .menuList-submain {
  background: #ffffff;
  min-width: 220px;
  position: absolute;
  z-index: 100;
  top: 100%;
  left: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-top: 2px solid var(--moho-primary);
  border-radius: 0 0 4px 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px 0;
  list-style: none;
  margin: 0;
}

.menuList-main li.has-submenu:hover > .menuList-submain {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.menuList-submain li {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menuList-submain li:not(:first-child) {
  border-top: 1px solid #f2f2f2;
}

.menuList-submain li a {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: #444444;
  white-space: nowrap;
  background: #ffffff;
  transition: all 0.2s ease;
}

.menuList-submain li a:hover {
  background: #fdf5f2;
  color: var(--moho-primary);
  padding-left: 22px;
}

.menuList-submain li a i {
  font-size: 9px;
  color: #999999;
  transition: transform 0.2s ease;
}

.menuList-submain li:hover > a i {
  color: var(--moho-primary);
  transform: translateX(3px);
}

/* Submenu Level 2 (Flies out to the right) */
.menuList-submain li.has-submenu .menuList-submain.level-2 {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 220px;
  max-height: 450px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-top: none;
  border-left: 2px solid var(--moho-primary);
  border-radius: 0 4px 4px 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  background: #ffffff;
  transition: all 0.2s ease;
  padding: 4px 0;
}

.menuList-submain li.has-submenu:hover > .menuList-submain.level-2 {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.menuList-submain.level-2::-webkit-scrollbar {
  width: 4px;
}

.menuList-submain.level-2::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

/* ================= Hero Slider ================= */
.hero-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f0f0f0;
}

.hero-slide {
  display: none;
  width: 100%;
  position: relative;
  transition: opacity 0.6s ease-in-out;
}

.hero-slide.active {
  display: block;
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333333;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.slider-nav-btn:hover {
  background: var(--moho-primary);
  color: #ffffff;
}

.slider-nav-btn.prev {
  left: 20px;
}

.slider-nav-btn.next {
  right: 20px;
}

.slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.25s ease;
}

.slider-dot.active {
  background: var(--moho-primary);
  width: 28px;
  border-radius: 6px;
}

/* ================= Section Headers ================= */
.section-title-wrap {
  text-align: center;
  position: relative;
  margin-bottom: 32px;
}

.section-main-title {
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  color: #222222;
  letter-spacing: 0.5px;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

.section-main-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--moho-primary);
  border-radius: 2px;
}

/* ================= Product Card ================= */
.product-card {
  position: relative;
  background: #ffffff;
  border-radius: 4px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #f2f2f2;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  border-color: #ebebeb;
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  overflow: hidden;
  background-color: #fafafa;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.product-img-wrapper .img-primary {
  opacity: 1;
}

.product-img-wrapper .img-secondary {
  opacity: 0;
}

.product-card:hover .product-img-wrapper .img-primary {
  opacity: 0;
}

.product-card:hover .product-img-wrapper .img-secondary {
  opacity: 1;
  transform: scale(1.04);
}

/* Product Badges */
.badge-sale {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--moho-red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  z-index: 5;
}

.badge-gift {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--moho-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 2px;
  z-index: 5;
}

/* Product Quick Actions */
.product-actions {
  position: absolute;
  bottom: -45px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 6;
  padding: 0 10px 10px;
}

.product-card:hover .product-actions {
  bottom: 0;
}

.action-btn {
  background: #ffffff;
  color: #333333;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-btn:hover {
  background: var(--moho-primary);
  color: #ffffff;
}

.action-btn.btn-buy-now {
  width: auto;
  border-radius: 20px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--moho-primary);
  color: #ffffff;
}

.action-btn.btn-buy-now:hover {
  background: var(--moho-primary-dark);
}

.product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 36px;
  transition: color 0.2s ease;
}

.product-title:hover {
  color: var(--moho-primary);
}

.product-price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.price-current {
  font-size: 15px;
  font-weight: 700;
  color: var(--moho-primary);
}

.price-old {
  font-size: 12px;
  color: #888888;
  text-decoration: line-through;
}

/* ================= View More Button ================= */
.btn-view-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--moho-primary);
  border: 1.5px solid var(--moho-primary);
  padding: 10px 28px;
  border-radius: 24px;
  background: transparent;
  transition: all 0.25s ease;
}

.btn-view-more:hover {
  background: var(--moho-primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 104, 58, 0.3);
}

/* ================= Policy / Service Banner ================= */
.policy-banner {
  background: #fbfbfb;
  border-top: 1px solid #eeeeee;
  border-bottom: 1px solid #eeeeee;
  padding: 32px 0;
}

.policy-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  transition: transform 0.25s ease;
}

.policy-item:hover {
  transform: translateY(-3px);
}

.policy-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: contain;
}

.policy-text-title {
  font-size: 14px;
  font-weight: 700;
  color: #222222;
  margin-bottom: 2px;
}

.policy-text-desc {
  font-size: 13px;
  color: #777777;
}

/* ================= Reviews Carousel ================= */
.review-card {
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.review-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: #ddd;
}

.review-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f5f5f5;
}

.review-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.review-stars {
  color: #f59e0b;
  font-size: 12px;
  margin-bottom: 8px;
}

.review-author {
  font-weight: 700;
  font-size: 14px;
  color: #222222;
  margin-bottom: 6px;
}

.review-comment {
  font-size: 13px;
  color: #555555;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= Press / Media Cards ================= */
.press-card {
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 6px;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.press-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.press-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.press-badge {
  display: inline-block;
  background: #fdf2ee;
  color: var(--moho-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.press-title {
  font-size: 14px;
  font-weight: 700;
  color: #222222;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.press-title:hover {
  color: var(--moho-primary);
}

.press-desc {
  font-size: 12px;
  color: #666666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= Partner Logos Continuous Marquee ================= */
.logos-track-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 16px 0;
}

.logos-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: scrollLogos 30s linear infinite;
}

.logos-track:hover {
  animation-play-state: paused;
}

@keyframes scrollLogos {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.partner-logo-item {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.25s ease;
}

.partner-logo-item:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.partner-logo-item img {
  max-height: 42px;
  max-width: 120px;
  object-fit: contain;
}

/* ================= Footer Styling ================= */
.main-footer {
  background: #f8f8f8;
  border-top: 1px solid #e7e7e7;
  color: #444444;
  font-size: 13px;
  line-height: 1.6;
}

.footer-col-title {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  color: #222222;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--moho-primary);
}

.footer-link {
  color: #555555;
  display: block;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.footer-link:hover {
  color: var(--moho-primary);
  padding-left: 4px;
}

/* ================= Floating Action Buttons (FAB) ================= */
.fab-container {
  position: fixed;
  right: 20px;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 90;
}

.fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.fab-hotline {
  background: #e70505;
}

.fab-zalo {
  background: #0068ff;
}

.fab-messenger {
  background: #0084ff;
}

.fab-top {
  background: var(--moho-primary);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
}

.fab-top.show {
  opacity: 1;
  visibility: visible;
}

/* ================= Drawers & Modals ================= */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #ffffff;
  z-index: 100;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.cart-drawer.active {
  transform: translateX(0);
}

/* Mobile Menu Drawer */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 340px;
  height: 100%;
  background: #ffffff;
  z-index: 100;
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu-drawer.active {
  transform: translateX(0);
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding: 24px 0 32px;
}

.search-modal.active {
  transform: translateY(0);
}


/* ==========================================================================
   Comprehensive Responsive Optimization (Mobile, Tablet, Touch screens)
   ========================================================================== */

/* Universal Mobile Optimizations */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Touch devices (Mobile & Tablet): Make card actions accessible */
@media (hover: none), (max-width: 767px) {
  .product-actions {
    position: static;
    bottom: auto;
    opacity: 1;
    padding: 6px 8px 10px;
    justify-content: stretch;
  }

  .product-actions .action-btn:not(.btn-buy-now) {
    display: none;
  }

  .product-actions .action-btn.btn-buy-now {
    width: 100%;
    font-size: 11px;
    padding: 6px 10px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
  }
  
  .product-card:hover .product-img-wrapper .img-secondary {
    opacity: 0; /* Keep primary image stable on touch scroll */
  }
}

/* Mobile Screen (< 768px) */
@media (max-width: 767px) {
  .section-main-title {
    font-size: 18px !important;
    letter-spacing: 0.2px;
    padding-bottom: 6px;
  }

  .section-main-title::after {
    width: 40px;
    height: 2px;
  }

  .section-title-wrap {
    margin-bottom: 20px;
  }

  /* Product Card on Mobile */
  .product-info {
    padding: 10px 8px;
  }

  .product-title {
    font-size: 12px;
    line-height: 1.35;
    height: 32px;
    margin-bottom: 4px;
  }

  .price-current {
    font-size: 13px;
  }

  .price-old {
    font-size: 10px;
  }

  .badge-sale {
    top: 6px;
    right: 6px;
    font-size: 9px;
    padding: 2px 5px;
  }

  .badge-gift {
    top: 6px;
    left: 6px;
    font-size: 8.5px;
    padding: 2px 4px;
  }

  /* Slider Controls */
  .slider-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .slider-nav-btn.prev {
    left: 8px;
  }

  .slider-nav-btn.next {
    right: 8px;
  }

  .slider-dots {
    bottom: 8px;
    gap: 5px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
  }

  .slider-dot.active {
    width: 18px;
    border-radius: 4px;
  }

  /* Policy Banner */
  .policy-banner {
    padding: 18px 0;
  }

  .policy-item {
    gap: 10px;
    padding: 8px 4px;
  }

  .policy-icon {
    width: 36px;
    height: 36px;
  }

  .policy-text-title {
    font-size: 12px;
  }

  .policy-text-desc {
    font-size: 11px;
  }

  /* Floating Action Buttons (FAB) on Mobile */
  .fab-container {
    right: 12px;
    bottom: 16px;
    gap: 8px;
  }

  .fab-btn {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  /* Reviews & Press */
  .review-card-img {
    height: 170px;
  }

  .review-card-body {
    padding: 12px;
  }

  .review-author {
    font-size: 13px;
  }

  .review-comment {
    font-size: 12px;
  }

  .btn-view-more {
    font-size: 12px;
    padding: 8px 22px;
  }

  /* Drawers */
  .cart-drawer,
  .mobile-menu-drawer {
    max-width: 86vw;
  }
}

/* Tablet Screen (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .section-main-title {
    font-size: 22px;
  }

  .product-title {
    font-size: 12.5px;
  }

  .price-current {
    font-size: 14px;
  }

  .cart-drawer {
    max-width: 380px;
  }
}
