/* ================================================
   HIMALAYAN MART - MAIN STYLESHEET
   Typography, Variables, Base Styles
   ================================================ */

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-secondary: #10b981;
    --color-secondary-dark: #059669;
    --color-accent: #f59e0b;
    --color-danger: #ef4444;

    /* Text Colors */
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-text-muted: #9ca3af;

    /* Background Colors */
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
    --color-bg-gray: #f3f4f6;

    /* Border Colors */
    --color-border: #e5e7eb;
    --color-border-dark: #d1d5db;

    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    /* 12px */
    --text-sm: 0.875rem;
    /* 14px */
    --text-base: 1rem;
    /* 16px */
    --text-lg: 1.125rem;
    /* 18px */
    --text-xl: 1.25rem;
    /* 20px */
    --text-2xl: 1.5rem;
    /* 24px */
    --text-3xl: 1.875rem;
    /* 30px */
    --text-4xl: 2.25rem;
    /* 36px */
    --text-5xl: 3rem;
    /* 48px */

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================================================
   RESET & BASE STYLES
   ================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
    background-color: var(--color-bg);
}

/* ================================================
   TYPOGRAPHY - HEADINGS
   ================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
}

h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

/* ================================================
   TYPOGRAPHY - PARAGRAPHS & TEXT
   ================================================ */

p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-text-light);
    margin-top: 0;
    margin-bottom: 1rem;
}

p.lead {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    color: var(--color-text);
}

p.small {
    font-size: var(--text-sm);
}

strong,
b {
    font-weight: var(--font-semibold);
    color: var(--color-text);
}

em,
i {
    font-style: italic;
}

/* ================================================
   TYPOGRAPHY - LINKS
   ================================================ */

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ================================================
   TYPOGRAPHY - LISTS
   ================================================ */

ul,
ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    color: var(--color-text-light);
}

ul li,
ol li {
    margin-bottom: 0.5rem;
    line-height: var(--leading-relaxed);
}

ul ul,
ol ol,
ul ol,
ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ================================================
   TYPOGRAPHY - BLOCKQUOTES
   ================================================ */

blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg-light);
    font-style: italic;
    color: var(--color-text);
}

blockquote p:last-child {
    margin-bottom: 0;
}

blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    font-style: normal;
}

/* ================================================
   TYPOGRAPHY - CODE
   ================================================ */

code,
kbd,
pre,
samp {
    font-family: 'Fira Code', 'Consolas', monospace;
}

code {
    background: var(--color-bg-gray);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    color: var(--color-danger);
}

pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ================================================
   TYPOGRAPHY - TABLES
   ================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th,
td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

th {
    font-weight: var(--font-semibold);
    color: var(--color-text);
    background: var(--color-bg-light);
}

/* ================================================
   LAYOUT
   ================================================ */

.hm-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    min-height: 50vh;
}

/* ================================================
   FORMS - BASE
   ================================================ */

input,
textarea,
select,
button {
    font-family: inherit;
    font-size: var(--text-base);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

::placeholder {
    color: var(--color-text-muted);
}

/* ================================================
   BUTTONS
   ================================================ */

button,
.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-bg-gray);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-border);
}

/* ================================================
   UTILITIES
   ================================================ */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--color-primary);
}

.text-secondary {
    color: var(--color-secondary);
}

.text-muted {
    color: var(--color-text-muted);
}

.font-normal {
    font-weight: var(--font-normal);
}

.font-medium {
    font-weight: var(--font-medium);
}

.font-semibold {
    font-weight: var(--font-semibold);
}

.font-bold {
    font-weight: var(--font-bold);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* ================================================
   RESPONSIVE TYPOGRAPHY
   ================================================ */

@media (max-width: 991px) {
    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 767px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    body {
        font-size: 15px;
    }
}

/* ================================================
   WOOCOMMERCE - MY ACCOUNT
   ================================================ */

.woocommerce-account .entry-header .entry-title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.woocommerce-account .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2xl);
    margin-top: var(--spacing-xl);
}

.woocommerce-MyAccount-navigation {
    flex: 0 0 280px;
}

.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    background: var(--color-bg);
    padding: var(--spacing-xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Navigation List */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin-bottom: var(--spacing-sm);
}

/* Navigation Links - Box Style */
.woocommerce-MyAccount-navigation a {
    display: block;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-weight: var(--font-medium);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.woocommerce-MyAccount-navigation a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

/* Active State */
.woocommerce-MyAccount-navigation .is-active a {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 991px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .woocommerce-MyAccount-navigation {
        flex: auto;
        width: 100%;
    }

    .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .woocommerce-MyAccount-navigation li {
        flex: 1 1 auto;
        margin-bottom: 0;
    }

    .woocommerce-MyAccount-navigation a {
        text-align: center;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* ================================================
   SINGLE PRODUCT STYLES
   ================================================ */

.hm-product-title,
.hm-product-excerpt {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

@media (max-width: 767px) {

    .hm-product-title,
    .hm-product-excerpt {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}