/* ============================================
   COMMON STYLES - PREMIUM D2C FASHION BRAND
   ============================================ */

@import url("/assets/comfyteeApp/css/brand-logo.css");

/* Disable text selection */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow text selection for input fields and textareas */
input,
textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* CSS Variables - Premium Color Palette */
:root {
  /* Dark Luxury Palette */
  --color-black: #0a0a0a;
  --color-charcoal: #1a1a1a;
  --color-dark-gray: #2a2a2a;
  --color-mid-gray: #3a3a3a;
  --color-light-gray: #4a4a4a;

  /* Accent Colors */
  --color-accent-primary: #00ff88;
  --color-accent-secondary: #ff6b9d;
  --color-accent-tertiary: #6b9fff;

  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #b0b0b0;
  --color-text-tertiary: #707070;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  --gradient-accent: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(107, 159, 255, 0.1) 100%);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  --spacing-xxl: 8rem;

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--color-black);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* Links */
a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-primary);
}

/* Buttons - Base Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--color-text-primary);
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-accent-primary);
  transition: left var(--transition-base);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  color: var(--color-black);
  transform: translateY(-2px);
}

.btn-primary {
  border: 1px solid var(--color-accent-primary);
  color: var(--color-accent-primary);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
}

/* Form Inputs - Base Styles */
.input-group {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: var(--spacing-xs);
  transition: color var(--transition-fast);
}

.input-field {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
  outline: none;
}

.input-field:focus {
  border-color: var(--color-accent-primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.input-field::placeholder {
  color: var(--color-text-tertiary);
  opacity: 0.5;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xxl) 0;
}

.text-center {
  text-align: center;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}
.mb-md {
  margin-bottom: var(--spacing-md);
}
.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}
.mt-md {
  margin-top: var(--spacing-md);
}
.mt-lg {
  margin-top: var(--spacing-lg);
}

/* Glassmorphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.6s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-black);
}

::-webkit-scrollbar-thumb {
  background: var(--color-mid-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-light-gray);
}

/* Selection */
::selection {
  background: var(--color-accent-primary);
  color: var(--color-black);
}

/* ============================================
   TOAST MESSAGE (custom alerts)
   ============================================ */
.toast-container {
  position: fixed;
  top: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 var(--spacing-sm);
}

.toast-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  min-width: 360px;
  max-width: min(92vw, 560px);
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--color-text-primary);
  background: var(--color-charcoal);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  border-radius: 0;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-20px);
  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
}

.toast-msg[data-visible] {
  opacity: 1;
  transform: translateY(0);
}

.toast-msg[hidden] {
  display: none !important;
}

.toast-msg.toast-success {
  border-left: 4px solid var(--color-accent-primary);
}

.toast-msg.toast-success .toast-icon::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2300ff88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") no-repeat center;
}

.toast-msg.toast-error {
  border-left: 4px solid var(--color-accent-secondary);
}

.toast-msg.toast-error .toast-icon::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ff6b9d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E") no-repeat center;
}

.toast-msg.toast-info {
  border-left: 4px solid var(--color-accent-tertiary);
}

.toast-msg.toast-info .toast-icon::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b9fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center;
}

.toast-text {
  flex: 1;
  -webkit-user-select: text;
  user-select: text;
}

.toast-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: 0;
  transition:
    color var(--transition-fast),
    background var(--transition-fast);
}

.toast-close:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ----- Shared product rating stars (home, products grid, cart) — filled from DB via data-rating + ComiteeRating.hydrate ----- */
.comfytee-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0.25rem 0 0.45rem;
  line-height: 1;
}

.comfytee-star-wrap {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.comfytee-star {
  display: block;
  width: 18px;
  height: 18px;
}

.comfytee-star--full {
  color: var(--color-accent-primary);
}

.comfytee-star--empty {
  color: rgba(255, 255, 255, 0.22);
}

.comfytee-star-wrap--half {
  position: relative;
  width: 18px;
  height: 18px;
}

.comfytee-star-wrap--half .comfytee-star--layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
}

.comfytee-star-wrap--half .comfytee-star--clip {
  clip-path: inset(0 50% 0 0);
}
