/* ================================================ */
/* TET THEME 2026 - XUÂN GIÁP NGỌ                   */
/* HTX Mai Sao Lạng Sơn                             */
/* ================================================ */

:root {
  /* Tet Colors - Traditional & Elegant */
  --tet-red: #D32F2F;        /* Traditional Red */
  --tet-gold: #FFD700;       /* Bright Gold */
  --tet-gold-dark: #C89B3C;  /* Existing Brand Gold */
  --tet-mai-yellow: #FFEB3B; /* Apricot Blossom Yellow */
  --tet-dao-pink: #FF80AB;   /* Peach Blossom Pink */
  --tet-leaf-green: #4CAF50; /* Fresh Spring Leaf */
  --tet-white: #FFFFFF;
  --tet-bg-soft: #FFF9F0;    /* Warm Cream Background */
}

/* Tet Theme Toggle Visibility */
.tet-theme-only {
  display: none;
}

body.theme-tet .tet-theme-only {
  display: block;
}

.non-tet-only {
  display: block;
}

body.theme-tet .non-tet-only {
  display: none;
}

/* ================================================ */
/* TET BANNER                                       */
/* ================================================ */

.tet-banner {
  background: linear-gradient(90deg, var(--tet-red) 0%, #B71C1C 100%);
  color: var(--tet-white);
  text-align: center;
  padding: 8px var(--space-s);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  z-index: 1001;
  letter-spacing: 1px;
  --tet-banner-height: 38px;
}

.tet-banner__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
}

.tet-banner__icon {
  font-size: 18px;
}

/* ================================================ */
/* FLOATING BLOSSOMS (Micro-animations)             */
/* ================================================ */

.tet-blossoms {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.petal {
  position: absolute;
  background-color: var(--tet-mai-yellow);
  border-radius: 150% 0 150% 0;
  opacity: 0.7;
  will-change: transform, opacity;
  animation: petal-fall linear infinite;
}

.petal--pink {
  background-color: var(--tet-dao-pink);
}

@keyframes petal-fall {
  0% {
    transform: translateY(-10vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(105vh) translateX(100px) rotate(720deg);
    opacity: 0;
  }
}

/* Different petal sizes and speeds */
.petal:nth-child(1) { left: 10%; width: 12px; height: 12px; animation-duration: 10s; animation-delay: 0s; }
.petal:nth-child(2) { left: 25%; width: 8px; height: 8px; animation-duration: 12s; animation-delay: 2s; }
.petal:nth-child(3) { left: 40%; width: 10px; height: 10px; animation-duration: 9s; animation-delay: 4s; }
.petal:nth-child(4) { left: 55%; width: 14px; height: 14px; animation-duration: 11s; animation-delay: 1s; }
.petal:nth-child(5) { left: 70%; width: 9px; height: 9px; animation-duration: 13s; animation-delay: 3s; }
.petal:nth-child(6) { left: 85%; width: 11px; height: 11px; animation-duration: 10s; animation-delay: 5s; }
.petal:nth-child(7) { left: 15%; width: 13px; height: 13px; animation-duration: 14s; animation-delay: 0.5s; }
.petal:nth-child(8) { left: 95%; width: 10px; height: 10px; animation-duration: 12s; animation-delay: 2.5s; }

/* ================================================ */
/* SEASONAL ACCENTS                                 */
/* ================================================ */

body.theme-tet {
  background-color: var(--tet-bg-soft);
}

/* Header Decoration */
body.theme-tet .header {
  border-bottom: 2px solid var(--tet-gold-dark);
}

/* ================================================ */
/* LOGO TET DECORATION - Hoa Đào & Hoa Mai          */
/* ================================================ */

body.theme-tet .header__logo {
  position: relative;
  overflow: visible;
}

body.theme-tet .header__wrapper {
  overflow: visible;
}

/* Left side - Peach Blossom Branch (Hoa Đào) */
body.theme-tet .header__logo::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 60px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 60" fill="none"><path d="M35 55 Q30 40 25 30 Q22 20 20 5" stroke="%238B4513" stroke-width="1.5" fill="none" opacity="0.7"/><path d="M28 20 Q32 18 30 14 Q28 10 24 12 Q20 14 22 18 Q24 22 28 20" fill="%23FF80AB" opacity="0.85"/><circle cx="26" cy="16" r="1.5" fill="%23FFD700" opacity="0.9"/><path d="M22 32 Q26 30 24 26 Q22 22 18 24 Q14 26 16 30 Q18 34 22 32" fill="%23FF80AB" opacity="0.75"/><circle cx="20" cy="28" r="1.2" fill="%23FFD700" opacity="0.9"/><path d="M18 45 Q22 43 20 39 Q18 35 14 37 Q10 39 12 43 Q14 47 18 45" fill="%23FF80AB" opacity="0.65"/><circle cx="16" cy="41" r="1" fill="%23FFD700" opacity="0.9"/><circle cx="30" cy="12" r="2" fill="%23FFB6C1" opacity="0.5"/><circle cx="14" cy="50" r="1.5" fill="%23FFB6C1" opacity="0.4"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: logo-decoration-fade-in 0.5s ease-out 0.3s forwards;
}

/* Right side - Apricot Blossom Branch (Hoa Mai) */
body.theme-tet .header__logo::after {
  content: "";
  position: absolute;
  right: -35px;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  width: 40px;
  height: 60px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 60" fill="none"><path d="M35 55 Q30 40 25 30 Q22 20 20 5" stroke="%238B4513" stroke-width="1.5" fill="none" opacity="0.7"/><path d="M28 18 Q33 16 31 11 Q29 6 24 8 Q19 10 21 15 Q23 20 28 18" fill="%23FFEB3B" opacity="0.9"/><circle cx="26" cy="13" r="1.8" fill="%23C89B3C" opacity="0.9"/><path d="M23 30 Q28 28 26 23 Q24 18 19 20 Q14 22 16 27 Q18 32 23 30" fill="%23FFEB3B" opacity="0.8"/><circle cx="21" cy="25" r="1.5" fill="%23C89B3C" opacity="0.9"/><path d="M19 44 Q24 42 22 37 Q20 32 15 34 Q10 36 12 41 Q14 46 19 44" fill="%23FFEB3B" opacity="0.7"/><circle cx="17" cy="39" r="1.2" fill="%23C89B3C" opacity="0.9"/><circle cx="32" cy="8" r="2.5" fill="%23FFF59D" opacity="0.5"/><circle cx="12" cy="48" r="2" fill="%23FFF59D" opacity="0.4"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: logo-decoration-fade-in 0.5s ease-out 0.5s forwards;
}

@keyframes logo-decoration-fade-in {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Adjust animation for right side (scaleX) */
body.theme-tet .header__logo::after {
  animation: logo-decoration-fade-in-right 0.5s ease-out 0.5s forwards;
}

@keyframes logo-decoration-fade-in-right {
  from {
    opacity: 0;
    transform: translateY(-50%) scaleX(-1) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scaleX(-1) scale(1);
  }
}

/* Tablet adjustments */
@media (max-width: 992px) {
  body.theme-tet .header__logo::before {
    left: -25px;
    width: 30px;
    height: 45px;
  }

  body.theme-tet .header__logo::after {
    right: -25px;
    width: 30px;
    height: 45px;
  }
}

/* Mobile - Show only left decoration, smaller */
@media (max-width: 768px) {
  body.theme-tet .header__logo::before {
    left: -20px;
    width: 24px;
    height: 36px;
  }

  body.theme-tet .header__logo::after {
    display: none;
  }
}

/* Hero Section Horse Motif */
body.theme-tet .hero-slider::after {
  content: "";
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 150px;
  height: 150px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none" stroke="%23C89B3C" stroke-width="1" opacity="0.3"><path d="M20,80 Q40,40 80,20 M25,75 Q45,35 85,15 M20,80 L30,85 L25,75 Z M80,20 L75,30 L85,25 Z"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 5;
}

/* Calligraphy accents for titles */
body.theme-tet .section-title {
  position: relative;
}

body.theme-tet .section-title::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 30px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 40" fill="none" stroke="%23D32F2F" stroke-width="2" opacity="0.4"><path d="M10,20 Q30,10 50,20 T90,20" /></svg>');
  background-repeat: no-repeat;
  background-size: contain;
}

/* Tet Badge for Product Cards */
body.theme-tet .product-card-v2__badge--tet {
  background: var(--tet-red);
  color: var(--tet-white);
  border: 1px solid var(--tet-gold);
}

/* Buttons Tet Style */
body.theme-tet .btn--primary {
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.2);
}

body.theme-tet .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.3);
}

/* Traditional Cloud/Wave motifs in Footer */
body.theme-tet .footer {
  position: relative;
  background: linear-gradient(180deg, #1A1A1A 0%, #000000 100%);
}

body.theme-tet .footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background-image: radial-gradient(circle at 10px 6px, var(--tet-gold-dark) 6px, transparent 0);
  background-size: 20px 12px;
  opacity: 0.5;
}

/* ================================================ */
/* THEME TOGGLE BUTTON                              */
/* ================================================ */

.theme-toggle {
  position: fixed;
  bottom: 120px;
  right: 30px;
  z-index: 1000;
  background: var(--tet-white);
  color: var(--tet-red);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 2px solid var(--tet-red);
  transition: all 0.3s ease;
  font-size: 24px;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--tet-red);
  color: var(--tet-white);
}

body.theme-tet .theme-toggle {
  background: var(--tet-red);
  color: var(--tet-gold);
  border-color: var(--tet-gold);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .theme-toggle {
    bottom: 110px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  body.theme-tet .hero-slider::after {
    width: 100px;
    height: 100px;
    bottom: 10px;
    right: 10px;
  }
}

/* ================================================ */
/* MOBILE MENU FIX - Account for Tet Banner Height  */
/* ================================================ */

body.theme-tet .header__nav.active {
  top: calc(var(--header-height, 64px) + 38px);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .petal {
    animation: none;
    display: none;
  }
}

