/* =========================================
   GLOBAL STYLES - Clean & Professional
   ========================================= */

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text-secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-text-main);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.text-muted {
    color: var(--color-text-muted);
}

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

/* --- Buttons (Refined & Minimal) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--color-accent);
    color: var(--color-text-inverse);
}

.btn-accent:hover {
    background-color: var(--color-accent-hover);
}

.btn-outline {
    background-color: transparent;
    border: 1.5px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background-color: var(--color-surface);
}

.btn-ghost {
    background: transparent;
    color: var(--color-accent);
    padding: 0.5rem 0;
}

.btn-ghost:hover {
    text-decoration: underline;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
}

/* --- Link Styles --- */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--color-accent);
    font-weight: 500;
    font-size: 0.9375rem;
}

.link-arrow:hover {
    gap: 0.625rem;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- Section Layouts --- */
.section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Grid System --- */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.four-col {
    grid-template-columns: repeat(4, 1fr);
}

.product-grid {
    display: grid;
    gap: var(--spacing-md);
}

/* --- Flex Utilities --- */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* --- Cards (Clean) --- */
.card {
    background: var(--color-background);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-bordered {
    border: 1px solid var(--color-border-light);
}

/* --- Dividers --- */
.divider {
    height: 1px;
    background: var(--color-divider);
    margin: var(--spacing-lg) 0;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.badge-sale {
    background: #FF3B30;
    color: white;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .four-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

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

    .three-col,
    .two-col {
        grid-template-columns: 1fr;
    }
}