/* Global Font Styles - Sora + System Stack */

/* Base HTML Elements with Sora + System Stack */

@font-face {
    font-family: 'Lahzeh';
    src: url('../assets/font/woff2/Lahzeh-Regular.woff2') format('woff2'),
         url('../assets/font/woff/Lahzeh-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lahzeh';
    src: url('../assets/font/woff2/Lahzeh-Medium.woff2') format('woff2'),
         url('../assets/font/woff/Lahzeh-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lahzeh';
    src: url('../assets/font/woff2/Lahzeh-SemiBold.woff2') format('woff2'),
         url('../assets/font/woff/Lahzeh-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Lahzeh';
    src: url('../assets/font/woff2/Lahzeh-Bold.woff2') format('woff2'),
         url('../assets/font/woff/Lahzeh-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


:root[dir="rtl"],
html[dir="rtl"],
body[dir="rtl"] {
    --font-sans: 'Lahzeh', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family: 'Lahzeh', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
    font-family: 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: 'liga' 1, 'kern' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Typography Elements */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

h1 {
    font-weight: 800;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

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

h3 {
    font-weight: 600;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

h4 {
    font-weight: 600;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
}

h5 {
    font-weight: 500;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
}

h6 {
    font-weight: 500;
    font-size: clamp(0.875rem, 1.25vw, 1rem);
}

/* Paragraph and Text Elements */
p {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Links */
a {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Lists */
ul, ol {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    line-height: 1.6;
}

/* Minimal Quantity Stepper - Global Style for Site & Dashboard */
.quantity-stepper {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 1;
}

.quantity-stepper button,
.qty-btn {
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 0;
  margin: 0;
}

.quantity-stepper button:hover,
.qty-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

.quantity-stepper button:active,
.qty-btn:active {
  color: rgba(255, 255, 255, 1);
}

.quantity-stepper button svg,
.qty-btn svg {
  width: 10px;
  height: 10px;
  stroke-width: 2.5;
}

li {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    line-height: 1.6;
}

/* Form Elements */
input, textarea, select {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    font-size: 0.875rem;
}

button {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Table Elements */
table {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
}

th {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 600;
}

td {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
}

/* Navigation Elements */
nav {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 500;
}

/* Blockquote */
blockquote {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
}

/* Code Elements */
code, pre {
    font-family: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;
    font-weight: 400;
}

/* Small Text */
small {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    font-size: 0.8em;
}

/* Strong and Bold */
strong, b {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 700;
}

/* Emphasis and Italic */
em, i {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 400;
    font-style: italic;
}

/* Mark/Highlight */
mark {
    font-family: var(--font-family, 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 500;
    background-color: rgba(255, 255, 0, 0.3);
    padding: 0.1em 0.2em;
    border-radius: 0.2em;
}

/* Utility Classes for Font Weights */
.font-thin { font-weight: 100; }
.font-extralight { font-weight: 200; }
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-black { font-weight: 900; }

/* Utility Classes for Font Stretch */
.font-condensed { font-stretch: condensed; }
.font-expanded { font-stretch: expanded; }
.font-semi-expanded { font-stretch: semi-expanded; }
.font-extra-expanded { font-stretch: extra-expanded; }

/* RTL Support */
[dir="rtl"] {
    font-family: Inter, 'Segoe UI', Arial, sans-serif;
}

/* Persian/Arabic Text Optimization */
.persian-text {
    font-family: Inter, 'Segoe UI', Arial, sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.english-text {
    font-family: 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    direction: ltr;
    text-align: left;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Mixed Content Support */
.mixed-content {
    font-family: 'Sora', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    unicode-bidi: plaintext;
}

/* Responsive Typography */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    h2 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }
    
    h3 {
        font-size: clamp(1.125rem, 4vw, 1.5rem);
    }
    
    p {
        font-size: 0.9rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    h1 {
        font-size: clamp(1.25rem, 8vw, 1.75rem);
    }
    
    h2 {
        font-size: clamp(1.125rem, 7vw, 1.5rem);
    }
    
    h3 {
        font-size: clamp(1rem, 6vw, 1.25rem);
    }
    
    p {
        font-size: 0.85rem;
        line-height: 1.8;
    }
}
