/* ==========================================================================
   GLED LIGHTING - W3C COMPLIANT CUSTOM STYLES
   Inspired by furniturestore2.matbao.website & hoangphatlighting.vn
   ========================================================================== */

:root {
  --primary-color: #0b3954;
  --secondary-color: #ffb128;
  --accent-green: #689f38;
  --accent-green-dark: #558b2f;
  --accent-green-light: #7cb342;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* SVN-Gilroy Vietnamese Font Family Declarations */
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-Light.otf?v=svn3') format('opentype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-Regular.otf?v=svn3') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-Italic.otf?v=svn3') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-Medium.otf?v=svn3') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-SemiBold.otf?v=svn3') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-Bold.otf?v=svn3') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-XBold.otf?v=svn3') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SVN-Gilroy';
  src: url('../fonts/gilroy/SVN-Gilroy-XBold.otf?v=svn3') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Base resets & typography */
body,
button,
input,
select,
textarea {
  font-family: 'SVN-Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body {
  color: var(--text-main);
  background-color: #ffffff;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'SVN-Gilroy', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 700;
  line-height: 1.32 !important;
  letter-spacing: 0.01em !important;
}

@media (min-width: 1280px) {
  .container {
    max-width: 1380px !important;
  }
}

/* Header & Sticky jump */
.header-sticky {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.header-sticky.is-stuck {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
}

/* Hotspot Pulsing Animation */
.hotspot-pulse {
  position: relative;
}
.hotspot-pulse::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: rgba(255, 177, 40, 0.7);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}
@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.4);
    opacity: 0;
  }
}

/* Category Grid Card Styles (Matching User's Attached Image) */
.category-card {
  transition: all 0.2s ease;
  background-color: #ffffff;
  position: relative;
}
.category-card:hover {
  z-index: 10;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.12);
  background-color: #f8fafc;
}
.category-card:hover .cat-title {
  color: var(--primary-color);
  font-weight: 700;
}
.category-card.is-active {
  background-color: #f7fee7;
  box-shadow: inset 0 0 0 2px #8cc63f;
}

/* Product Card Hover */
.product-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}
.product-card .action-buttons {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
}
.product-card:hover .action-buttons {
  opacity: 1;
  transform: translateY(0);
}

/* Signature Green Section Header (Matching photo "SẢN PHẨM NỔI BẬT") */
.section-header-green {
  background: linear-gradient(135deg, var(--accent-green-dark) 0%, var(--accent-green) 50%, var(--accent-green-light) 100%);
  color: #ffffff;
}

/* Mega menu dropdowns */
.mega-menu-content {
  box-shadow: 0 25px 50px -12px rgba(11, 57, 84, 0.2);
}

/* Drawer transitions */
.drawer-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.offcanvas-drawer {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.offcanvas-drawer.open {
  transform: translateX(0);
}

/* Left drawer for mobile menu */
.offcanvas-drawer-left {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.offcanvas-drawer-left.open {
  transform: translateX(0);
}

/* Modal animation */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-overlay.open .modal-box {
  transform: scale(1);
}

/* Toast alert notification */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-msg {
  animation: slideInUp 0.3s ease, fadeOut 0.5s ease 2.5s forwards;
}
@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Shine effect on badges */
.badge-shine {
  position: relative;
  overflow: hidden;
}
.badge-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(30deg);
  animation: shine 4s infinite;
}
@keyframes shine {
  0% { transform: translate(-100%, -100%) rotate(30deg); }
  20% { transform: translate(100%, 100%) rotate(30deg); }
  100% { transform: translate(100%, 100%) rotate(30deg); }
}

/* Infinite Right-to-Left Brand Logo Marquee */
@keyframes brandMarqueeRtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.brand-marquee-track {
  display: flex;
  width: max-content;
  animation: brandMarqueeRtl 26s linear infinite;
}

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

/* Smooth Fade-In-Up Scroll Reveal Animation */
.reveal-up {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@keyframes fadeUpCard {
  0% {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.animate-fade-up {
  animation: fadeUpCard 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Product Detail Scraped HTML Content Styling */
.product-short-content {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #334155;
}
.product-short-content * {
  font-size: inherit !important;
  line-height: inherit !important;
}
.product-short-content p {
  margin-bottom: 0.45rem;
}
.product-short-content ul,
.product-short-content ol {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.4rem 0;
}
.product-short-content li,
.product-rich-content li {
  margin-bottom: 0.4rem;
}
.product-short-content li > p,
.product-rich-content li > p {
  display: inline;
  margin: 0;
}
.product-short-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
}
.product-short-content li img,
.product-rich-content li img {
  display: inline-block !important;
  vertical-align: middle;
  margin: 0 0.35rem 0 0 !important;
  box-shadow: none !important;
}

.product-rich-content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: #334155;
  overflow-wrap: break-word;
}
.product-rich-content h1,
.product-rich-content h2,
.product-rich-content h3,
.product-rich-content h4 {
  color: #0f172a;
  font-weight: 800;
  margin-top: 1.25rem;
  margin-bottom: 0.65rem;
}
.product-rich-content h2 {
  font-size: 1.25rem !important;
}
.product-rich-content h3 {
  font-size: 1.1rem !important;
}
.product-rich-content p {
  margin-bottom: 0.85rem;
}
.product-rich-content ul,
.product-rich-content ol {
  list-style: disc;
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.product-rich-content figure {
  width: auto !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.product-rich-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.75rem;
  margin: 1rem auto;
  display: block;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.product-rich-content table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  border-style: solid !important;
  border-color: #e2e8f0 !important;
  margin: 1rem 0;
  font-size: 0.875rem;
}
.product-rich-content td,
.product-rich-content th {
  border: 1px solid #e2e8f0 !important;
  padding: 0.65rem 0.85rem !important;
  vertical-align: top;
}
.product-rich-content tr:nth-child(even) {
  background-color: #f8fafc;
}
.product-rich-content a {
  color: #0b3954;
  font-weight: 700;
  text-decoration: underline;
}

