/*
Theme Name: Q Fashion
Theme URI: https://qfashion.vn
Author: Q Fashion JSC
Description: Custom WordPress theme for Q Fashion — Thiet Ke & San Xuat Thoi Trang
Version: 1.0.0
License: Proprietary
Text Domain: qfashion
*/

/* ============================================
   Q FASHION — SHARED STYLES
   Aesthetic: Editorial luxury meets Vietnamese craft
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green: #099547;
  --green-dark: #007536;
  --green-deep: #004d23;
  --orange: #f47920;
  --orange-light: #ff9a4d;
  --black: #0a0a0a;
  --white: #ffffff;
  --cream: #faf8f5;
  --gray-100: #f5f3f0;
  --gray-200: #e8e5e0;
  --gray-300: #d4d0c8;
  --gray-500: #8a8680;
  --gray-700: #4a4744;
  --gray-900: #1a1918;

  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Questrial', 'Segoe UI', system-ui, sans-serif;

  --max-w: 1280px;
  --gap: 24px;
  --header-h: 72px;
}

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

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }

/* Utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   TOP BAR
   ============================================ */
.topbar {
  background: var(--black);
  color: var(--white);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.topbar__social {
  display: flex;
  gap: 16px;
  align-items: center;
}
.topbar__social a {
  opacity: 0.6;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
}
.topbar__social a:hover { opacity: 1; }
.topbar__social svg { width: 14px; height: 14px; fill: currentColor; }

.topbar__marquee {
  flex: 1;
  overflow: hidden;
  margin: 0 24px;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.topbar__marquee-inner {
  display: flex;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.topbar__marquee-inner span {
  padding: 0 48px;
  color: var(--orange);
  font-weight: 500;
}

.topbar__actions {
  display: flex;
  gap: 16px;
  align-items: center;
}
.topbar__actions a {
  opacity: 0.6;
  transition: opacity 0.3s;
}
.topbar__actions a:hover { opacity: 1; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-h);
  transition: box-shadow 0.3s, background 0.3s;
}
.header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__logo svg { height: 48px; width: auto; }
.header__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.header__logo-text strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green-dark);
}
.header__logo-text small {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 400;
}

.header__nav { display: flex; align-items: center; gap: 32px; }
.header__nav a {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-700);
  transition: color 0.3s;
  position: relative;
  padding: 4px 0;
}
.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--green);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.header__nav a:hover { color: var(--green); }
.header__nav a:hover::after { width: 100%; }
.header__nav a.active { color: var(--green); }
.header__nav a.active::after { width: 100%; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.header__action-btn {
  color: var(--gray-700); transition: color 0.3s; display: flex; align-items: center;
  position: relative; padding: 6px; border-radius: 8px; text-decoration: none;
}
.header__action-btn:hover { color: var(--green); background: rgba(9,149,71,.06); }
.header__action-btn--ai { color: var(--green); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; gap: 3px; }
.header__action-label { font-size: 0.65rem; letter-spacing: 0.06em; }
.header__action-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
.header__cart-count {
  position: absolute; top: 0; right: -2px; background: var(--orange); color: white;
  font-size: 0.6rem; width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.header__menu-toggle { color: var(--gray-700); display: none; padding: 6px; }
@media (max-width: 768px) { .header__menu-toggle { display: flex; } }
.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--orange);
  color: white;
  font-size: 0.6rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Mobile menu toggle */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}
.header__menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn--primary {
  background: var(--white);
  color: var(--green-dark);
}
.btn--primary:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244,121,32,0.3);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.4);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
}
.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn--white {
  background: var(--white);
  color: var(--green-dark);
}
.btn--white:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(244,121,32,0.3);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header__tag {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.section-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--black);
  line-height: 1.15;
}
.section-header__title em {
  font-style: italic;
  color: var(--green);
}

/* ============================================
   PRODUCT CARD (shared component)
   ============================================ */
.product-card {
  position: relative;
  cursor: pointer;
}
.product-card__image {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 3px;
  background: var(--gray-100);
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .product-card__image img { transform: scale(1.05); }

.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  z-index: 2;
}
.product-card__badge--sale {
  background: var(--orange);
  color: var(--white);
}
.product-card__badge--new {
  background: var(--green);
  color: var(--white);
}

.product-card__wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-card:hover .product-card__wishlist { opacity: 1; transform: translateY(0); }
.product-card__wishlist svg { width: 14px; height: 14px; stroke: var(--gray-700); fill: none; stroke-width: 2; }
.product-card__wishlist:hover svg { stroke: var(--orange); fill: var(--orange); }

.product-card__actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}
.product-card:hover .product-card__actions { transform: translateY(0); }
.product-card__quick-add {
  flex: 1;
  padding: 10px;
  background: rgba(0,0,0,0.85);
  color: var(--white);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  backdrop-filter: blur(4px);
}
.product-card__design-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: var(--green);
  color: var(--white) !important;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.3s;
}
.product-card__design-btn:hover { background: var(--orange); }
.product-card__design-btn svg { flex-shrink: 0; }

.product-card__info { padding: 12px 0 0; }
.product-card__category {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 4px;
}
.product-card__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--black);
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color 0.3s;
}
.product-card:hover .product-card__name { color: var(--green); }
.product-card__price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.product-card__price .original {
  color: var(--gray-500);
  text-decoration: line-through;
  font-size: 0.78rem;
}
.product-card__price .current {
  color: var(--black);
  font-weight: 500;
}
.product-card__price .sale {
  color: var(--orange);
  font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.footer__brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 20px;
}
.footer__brand-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer__brand-logo svg { height: 40px; width: auto; }
.footer__brand-logo span {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
}
.footer__social {
  display: flex;
  gap: 12px;
}
.footer__social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.footer__social a:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.footer__social svg { width: 14px; height: 14px; fill: currentColor; }

.footer__col h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.footer__col ul li { margin-bottom: 10px; }
.footer__col ul a {
  font-size: 0.82rem;
  transition: color 0.3s;
}
.footer__col ul a:hover { color: var(--orange); }

.footer__col .footer__contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 0.82rem;
}
.footer__contact-item svg { width: 16px; height: 16px; stroke: var(--green); fill: none; stroke-width: 1.5; flex-shrink: 0; margin-top: 2px; }

.footer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.footer__tags a {
  padding: 5px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s;
}
.footer__tags a:hover { background: var(--green); border-color: var(--green); color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 48px;
  padding: 20px 0;
}
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gap);
  font-size: 0.72rem;
}
.footer__payments {
  display: flex;
  gap: 8px;
  align-items: center;
}
.footer__payments span {
  padding: 4px 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ============================================
   PAGE HERO (reusable for inner pages)
   ============================================ */
.page-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 60%, var(--orange) 100%);
  padding: 100px 0 60px;
  text-align: center;
  color: var(--white);
}
.page-hero__tag {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-light);
  margin-bottom: 8px;
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.15;
}
.page-hero__title em { font-style: italic; }
.page-hero__breadcrumb {
  margin-top: 16px;
  font-size: 0.75rem;
  opacity: 0.7;
}
.page-hero__breadcrumb a { color: var(--white); text-decoration: underline; }

/* ============================================
   PRODUCT GRID (shared across home + collection)
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header__tag {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.section-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--black);
  line-height: 1.15;
}
.section-header__title em {
  font-style: italic;
  color: var(--green);
}

/* ============================================
   RESPONSIVE — Shared Elements
   ============================================ */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .header__nav { display: none; }
  .header__nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .header__menu-toggle { display: flex; }

  .topbar__social { display: none; }
  .topbar__actions { display: none; }

  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
}
