/*
Theme Name: Glossy Fashion
Theme URI: https://ayen.agency/
Author: Ayen Creative Agency
Author URI: https://ayen.agency/
Description: Premium black-and-white fashion e-commerce theme with WooCommerce support. Features dark/light mode, RTL multilingual support (EN/Dari/Pashto), custom cursor, animated loading screen, coming soon page, AI chatbot, and full responsive design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Commercial
Text Domain: glossy-fashion
Tags: e-commerce, woocommerce, fashion, luxury, dark-mode, rtl, multilingual, responsive
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

/* ============================================================
   THEME TOKENS — LIGHT MODE (DEFAULT)
   ============================================================ */
:root,
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface2: #ebebeb;
  --text: #000000;
  --muted: #666666;
  --line: #e0e0e0;
  --ph: #d5d5d5;
  --phline: #c8c8c8;
  --inv-bg: #000000;
  --inv-text: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.08);
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme="dark"] {
  --bg: #000000;
  --surface: #111111;
  --surface2: #1a1a1a;
  --text: #ffffff;
  --muted: #888888;
  --line: #2a2a2a;
  --ph: #1e1e1e;
  --phline: #282828;
  --inv-bg: #ffffff;
  --inv-text: #000000;
  --shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 34px rgba(0,0,0,.6);
}

/* ============================================================
   BODY & TYPOGRAPHY
   ============================================================ */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] {
  font-family: 'Estedad', sans-serif;
}

.gf-disp {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

[dir="rtl"] .gf-disp {
  font-family: 'Estedad', sans-serif;
}

.gf-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   LINKS & INTERACTIVE
   ============================================================ */
a {
  color: inherit;
  text-decoration: none;
}

.gf-link {
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
}

.gf-link:hover { opacity: .6; }
.gf-link:active { opacity: .4; transform: scale(.98); }

/* ============================================================
   BUTTONS
   ============================================================ */
button {
  cursor: pointer;
  font-family: inherit;
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}

button:hover { opacity: .88; }
button:active { transform: scale(.97); opacity: .75; }

/* Add to Cart button hover */
.gf-card button:hover {
  background: var(--inv-bg) !important;
  color: var(--inv-text) !important;
  transition: background .2s ease, color .2s ease;
}

/* ============================================================
   FORMS
   ============================================================ */
input, select, textarea {
  transition: border-color .18s ease, box-shadow .18s ease;
  outline: none;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--text) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 12%, transparent);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px !important;
  background-repeat: no-repeat;
  background-position: calc(100% - 13px) 50%;
  background-size: 11px 7px;
}

[data-theme="light"] select,
:root select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath fill='%23000000' d='M5.5 7L0 1.4 1.4 0 5.5 4.2 9.6 0 11 1.4z'/%3E%3C/svg%3E");
}

[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 7'%3E%3Cpath fill='%23ffffff' d='M5.5 7L0 1.4 1.4 0 5.5 4.2 9.6 0 11 1.4z'/%3E%3C/svg%3E");
}

[dir="rtl"] select {
  padding-right: 14px !important;
  padding-left: 38px !important;
  background-position: 13px 50% !important;
}

/* ============================================================
   LAYOUT — FRAME
   ============================================================ */
.gf-frame {
  background: var(--bg);
  color: var(--text);
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Theme toggle — both icon spans need flex for centering */
.gf-theme-icon-light,
.gf-theme-icon-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   RESPONSIVE GRIDS
   ============================================================ */
.gf-g6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.gf-g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.gf-g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.gf-g2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.gf-mainnav { display: flex; }
.gf-burger { display: none; }

.gf-mainnav span.gf-link { position: relative; }
.gf-mainnav span.gf-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  inset-inline-start: 0;
  width: 0;
  height: 1.5px;
  background: var(--text);
  transition: width .22s ease;
}
.gf-mainnav span.gf-link:hover::after { width: 100%; }

/* ============================================================
   ICON SYSTEM
   ============================================================ */
.gf-ico-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  position: relative;
  transition: opacity .18s ease, transform .15s ease;
}

.gf-ico-btn:hover { transform: scale(1.08); opacity: 1 !important; }
.gf-ico-btn:active { transform: scale(.94); }

.gf-ico-btn .gf-ico-out,
.gf-ico-btn .gf-ico-fill {
  flex: none;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.gf-ico-btn .gf-ico-fill { display: none; }
.gf-ico-btn:hover .gf-ico-out,
.gf-ico-btn[data-active="true"] .gf-ico-out { display: none; }
.gf-ico-btn:hover .gf-ico-fill,
.gf-ico-btn[data-active="true"] .gf-ico-fill { display: inline-flex; align-items: center; justify-content: center; }
.gf-ico-btn[data-active="true"] { opacity: 1 !important; }

/* ============================================================
   NOTIFICATION BADGE
   ============================================================ */
.gf-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -7px;
  background: var(--inv-bg);
  color: var(--inv-text);
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  border: 1.5px solid var(--bg);
  pointer-events: none;
  line-height: 1;
  padding: 0 3px;
}

/* ============================================================
   CARDS
   ============================================================ */
.gf-card { transition: transform .22s ease; }
.gf-card:hover { transform: translateY(-2px); }

/* ============================================================
   PLACEHOLDER IMAGES
   ============================================================ */
.gf-ph {
  background-color: var(--ph);
  background-image:
    linear-gradient(135deg, var(--phline) 1px, transparent 1px),
    linear-gradient(225deg, var(--phline) 1px, transparent 1px);
  background-size: 11px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gf-ph span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
  background: var(--bg);
  padding: 3px 7px;
  border: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
body, body * { cursor: none !important; }

#gf-c-dot {
  position: fixed;
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 999px;
  pointer-events: none;
  z-index: 999999;
  top: -100px;
  left: -100px;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  will-change: left, top;
}

#gf-c-ring {
  position: fixed;
  width: 26px;
  height: 26px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  pointer-events: none;
  z-index: 999998;
  top: -100px;
  left: -100px;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: opacity .18s ease;
  will-change: left, top;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes gfpop {
  0% { transform: scale(.9) translateY(8px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes gfblink {
  0%, 80%, 100% { opacity: .3; }
  40% { opacity: 1; }
}
@keyframes gfslide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes gfmarq {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes gf-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes gfPageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gfTilt {
  0% { transform: rotate(0); }
  15% { transform: rotate(-16deg) scale(1.1); }
  40% { transform: rotate(13deg); }
  65% { transform: rotate(-6deg); }
  82% { transform: rotate(3deg); }
  100% { transform: rotate(0); }
}
@keyframes gfHeartBeat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.4); }
  65% { transform: scale(.85); }
}
@keyframes gfSpring {
  0%, 100% { transform: scale(1) translateY(0); }
  35% { transform: scale(.94) translateY(1px); }
  70% { transform: scale(1.03) translateY(-1px); }
}
@keyframes gfCsOrbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes gfCsOrbitR { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes gfCsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes gfCsPulse {
  0%, 100% { opacity: .18; transform: scale(1); }
  50% { opacity: .34; transform: scale(1.06); }
}
@keyframes gfCsGlitch {
  0%, 92%, 100% { transform: none; clip-path: none; text-shadow: none; }
  93% { transform: translate(-3px, 1px); clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); text-shadow: 3px 0 #fff; }
  95% { transform: translate(3px, -1px); clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%); text-shadow: -3px 0 #fff; }
  97% { transform: translate(-2px, 2px); clip-path: polygon(0 0, 100% 0, 100% 15%, 0 15%); text-shadow: 2px 0 #fff; }
  99% { transform: none; clip-path: none; }
}
@keyframes gfCsStar {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes gfLdLine {
  from { width: 0; opacity: 0; }
  20% { opacity: 1; }
  to { width: 72vw; opacity: 1; }
}
@keyframes gfLdBrand {
  from { opacity: 0; letter-spacing: .5em; }
  to { opacity: 1; letter-spacing: .4em; }
}
@keyframes gfLdOut {
  0%, 72% { opacity: 1; pointer-events: all; }
  100% { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.gf-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 999990;
  background: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: gfLdOut 2.6s cubic-bezier(.4, 0, .2, 1) .1s forwards;
}

.gf-ld-brand {
  font-family: 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .4em;
  color: #f7f6f3;
  animation: gfLdBrand .9s cubic-bezier(.2, .8, .3, 1) .1s both;
}

.gf-ld-line {
  height: 1px;
  background: #ffffff;
  animation: gfLdLine 1.6s cubic-bezier(.76, 0, .24, 1) .2s both;
}

/* ============================================================
   COMING SOON PAGE
   ============================================================ */
.gf-cs-wrap {
  position: relative;
  min-height: 100vh;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.gf-cs-star {
  position: absolute;
  border-radius: 999px;
  background: #fff;
  animation: gfCsStar var(--dur, 2s) var(--del, 0s) ease-in-out infinite;
}

.gf-cs-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.gf-cs-title {
  animation: gfCsGlitch 8s ease infinite, gfCsFloat 6s ease-in-out infinite;
  color: #fff;
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  text-align: center;
  position: relative;
  z-index: 2;
}

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
main.gf-page-in { animation: gfPageIn .38s cubic-bezier(.2, .8, .3, 1) both; }

/* ============================================================
   FAB / CHATBOT
   ============================================================ */
.gf-fab-tilting { animation: gfTilt .6s cubic-bezier(.36, .07, .19, .97) !important; transform-origin: center; }
.gf-heart-pop { animation: gfHeartBeat .42s ease; }
.gf-pop { animation: gfpop .28s cubic-bezier(.2, .8, .3, 1); }

/* ============================================================
   PRICE RANGE SLIDER
   ============================================================ */
.gf-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: transparent;
  outline: none;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
}

.gf-range::-webkit-slider-runnable-track { height: 2px; background: transparent; }
.gf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--text);
  cursor: pointer;
  pointer-events: all;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--text);
  margin-top: -6px;
}

.gf-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--text);
  cursor: pointer;
  pointer-events: all;
  border: none;
}

/* ============================================================
   RTL FIXES
   ============================================================ */
[dir="rtl"] .gf-mono { unicode-bidi: plaintext; }

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

/* ============================================================
   RESPONSIVE — TABLET (768px–1024px)
   ============================================================ */
@media (max-width: 1024px) {
  header > div { padding: 14px 20px !important; }
  .gf-g6 { grid-template-columns: repeat(3, 1fr); }
  .gf-g4 { grid-template-columns: repeat(3, 1fr); }
  .gf-g3 { grid-template-columns: repeat(2, 1fr); }
  .gf-hero-col { padding: 48px 30px !important; }
  .gf-car-card { flex: 0 0 220px !important; }
  .gf-footer-bar { flex-wrap: wrap !important; }
  section { padding-inline: 30px !important; }
  footer { padding-inline: 30px !important; }
  .gf-cart-row { gap: 20px !important; }
  .gf-aside { width: 260px !important; }
  .gf-sec-pad { padding-left: 30px !important; padding-right: 30px !important; }
  .gf-stack-t { flex-direction: column !important; }
  .gf-h1 { font-size: 52px !important; }
  .gf-help-cats { grid-template-columns: repeat(3, 1fr) !important; }
  .gf-blog-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */
@media (max-width: 767px) {
  .gf-mainnav { display: none; }
  .gf-burger { display: flex !important; }
  .gf-hide-m { display: none !important; }
  .gf-header-logo { display: none !important; }
  .gf-h1 { font-size: 38px !important; line-height: 1.05 !important; }
  .gf-hero-col { padding: 44px 24px !important; }
  .gf-full-m { width: 100% !important; }
  .gf-stack-m { flex-direction: column !important; }

  section, .gf-sec-pad {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }

  section { overflow: hidden !important; max-width: 100% !important; box-sizing: border-box !important; }
  .gf-aside { width: 100% !important; flex: none !important; min-width: 0 !important; }
  .gf-car-card { flex: 0 0 calc(100vw - 60px) !important; width: calc(100vw - 60px) !important; min-width: 0; }
  .gf-car-card .gf-ph { aspect-ratio: 3/4 !important; }
  .gf-car-wrap { overflow: hidden !important; }
  .gf-g6 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gf-g4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .gf-g3 { grid-template-columns: 1fr 1fr !important; }
  .gf-g2 { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .gf-frame { overflow-x: hidden !important; }
  .gf-card { min-width: 0; box-sizing: border-box; }

  .gf-policy-body { padding: 24px 18px !important; }
  .gf-policy-body h1 { font-size: 28px !important; }
  .gf-help-cats { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .gf-faq-wrap { padding: 24px 18px !important; }
  .gf-faq-wrap h1 { font-size: 28px !important; }
  .gf-cookie-wrap { padding: 24px 18px !important; }
  .gf-ship-rates { padding: 24px 18px !important; }
  .gf-about-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .gf-about-hero { padding: 40px 18px !important; }
  .gf-contact-wrap { flex-direction: column !important; padding: 24px 18px !important; }
  .gf-blog-grid { grid-template-columns: 1fr !important; }
  .gf-acc-wrap { flex-direction: column !important; padding: 24px 18px !important; }
  .gf-acc-sidebar { width: 100% !important; flex: none !important; }
  .gf-track-wrap { padding: 24px 18px !important; }
  .gf-404-wrap { padding: 60px 24px !important; }
  .gf-404-wrap h1 { font-size: 80px !important; }
  .gf-testi-page { padding: 24px 18px !important; }
  .gf-checkout-aside { width: 100% !important; }
  .gf-ship-calc { flex-direction: column !important; gap: 12px !important; }
  .gf-cs-wrap { padding: 40px 18px !important; box-sizing: border-box; }
  .gf-cs-title { font-size: clamp(42px, 15vw, 72px) !important; }
  .gf-cs-countdown { gap: 4px !important; }
}

/* ============================================================
   DRAWER
   ============================================================ */
#gf-drawer.open { display: flex !important; }
#gf-drawer-overlay.show { display: block !important; }

/* ============================================================
   TESTIMONIALS SLIDER
   ============================================================ */
.gf-testimonial-slide { display: none !important; }
.gf-testimonial-slide.gf-testi-active { display: block !important; }
.gf-testi-dot.active { width: 22px !important; opacity: 1 !important; }

/* ============================================================
   CURSOR — hide on touch / mobile
   ============================================================ */
@media (hover: none), (pointer: coarse) {
  #gf-c-dot, #gf-c-ring { display: none !important; }
  body, body * { cursor: auto !important; }
}

/* ============================================================
   WOOCOMMERCE BASE OVERRIDES
   ============================================================ */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
  border-top-color: var(--text);
  background: var(--surface);
  color: var(--text);
}
