/* ============================================================
   Global Styles — Base typography, layout, buttons, forms
   ============================================================ */

/* ---- Custom Headline Font (RoslaneDEMO) ---- */
@font-face {
    font-family: 'RoslaneDEMO';
    src: url('../fonts/RoslaneDEMO-Regular.otf') format('opentype'),
         url('../../fonts/RoslaneDEMO-Regular.otf') format('opentype'),
         url('/Elita%20Lifts/fonts/RoslaneDEMO-Regular.otf') format('opentype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text);
    background-color: var(--color-page);
    overflow-x: hidden;
}

/* ---- Typography ---- */

h1, h2, h3, h4, h5, h6,
.section-title,
.page-hero__title,
.product-card-title,
.product-sidebar-header,
.product-row-title {
    font-family: var(--font-heading), 'RoslaneDEMO', sans-serif !important;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: var(--ls-tight);
}

.display-heading {
    font-size: var(--fs-display);
    font-weight: var(--fw-extrabold);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

h1, .h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
h4, .h4 { font-size: var(--fs-h4); }

.text-body-lg {
    font-size: var(--fs-body-lg);
    line-height: var(--lh-relaxed);
}

.text-small {
    font-size: var(--fs-small);
}

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

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

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

.text-center { text-align: center; }
.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
}

/* Section labels — small uppercase text above headings */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--ls-label);
    color: var(--color-brand);
    margin-bottom: var(--space-lg);
}

.section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--color-brand);
}

.section-title {
    margin-bottom: var(--space-lg);
    line-height: var(--lh-heading);
}

.section-subtitle {
    font-size: var(--fs-body-lg);
    color: var(--color-text-muted);
    max-width: 640px;
    line-height: var(--lh-relaxed);
}

.section-header {
    margin-bottom: var(--space-3xl);
}

.section-header.centered {
    text-align: center;
}

.section-header.centered .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Layout ---- */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

.section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
    position: relative;
}

.section--dark {
    background-color: var(--color-surface-light, #EEEDE9);
    color: var(--color-text, #171A1C);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--color-text, #171A1C);
}

.section--dark .text-muted,
.section--dark .section-subtitle {
    color: var(--color-text-muted, #5C6870);
}

.section--light {
    background-color: var(--color-surface-light);
}

.section--accent {
    background-color: var(--color-surface-light, #EEEDE9);
    color: var(--color-text, #171A1C);
}

/* Grid system */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-12 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 32px);
}

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

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---- Buttons (Architectural & Controlled) ---- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 48px;
    padding: 12px 28px;
    font-family: var(--font-heading);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

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

.btn:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 3px;
}

.btn--primary {
    background: var(--color-brand);
    color: var(--color-white);
    border-color: var(--color-brand);
}

.btn--primary:hover {
    background: var(--color-brand-hover);
    border-color: var(--color-brand-hover);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: transparent;
    color: var(--color-text, #171A1C);
    border-color: rgba(0, 0, 0, 0.25);
}

.btn--secondary:hover {
    border-color: var(--color-text, #171A1C);
    background: rgba(0, 0, 0, 0.05);
}

.btn--dark {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.btn--dark:hover {
    background: var(--color-dark-surface);
    border-color: var(--color-dark-surface);
    box-shadow: var(--shadow-md);
}

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

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

.btn--sm {
    min-height: 40px;
    padding: 8px 18px;
    font-size: var(--fs-tiny);
}

.btn--lg {
    min-height: 54px;
    padding: 16px 36px;
    font-size: var(--fs-nav);
}

.btn--icon {
    min-height: 48px;
    width: 48px;
    padding: 0;
    border-radius: var(--radius-xs);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ---- Media Primitive ---- */
.media {
    overflow: hidden;
    border-radius: var(--radius-sm);
    position: relative;
}

.media img,
.media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.media:hover img,
.media:hover video {
    transform: scale(1.04);
}

/* ---- Forms ---- */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    margin-bottom: var(--space-xs);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px var(--color-brand-soft);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-muted);
}

.form-textarea {
    min-height: 140px;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23707070'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.form-error {
    font-size: var(--fs-tiny);
    color: var(--color-error);
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

/* Dark form variants */
.section--dark .form-input,
.section--dark .form-textarea,
.section--dark .form-select {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--color-border, #E2E1DC);
    color: var(--color-text, #171A1C);
}

.section--dark .form-input::placeholder,
.section--dark .form-textarea::placeholder {
    color: var(--color-text-muted, #5C6870);
}

.section--dark .form-label {
    color: var(--color-text-muted, #5C6870);
}

/* ---- Cards ---- */

.card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.card__body {
    padding: var(--space-xl);
}

.card__category {
    font-size: var(--fs-tiny);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.card__title {
    font-size: var(--fs-h4);
    margin-bottom: var(--space-sm);
}

.card__text {
    color: var(--color-muted);
    font-size: var(--fs-small);
    line-height: var(--lh-relaxed);
}

/* ---- Skip to Content ---- */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-secondary);
    color: var(--color-primary);
    font-weight: var(--fw-semibold);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: var(--z-max);
    transition: top var(--transition-fast);
}

.skip-to-content:focus {
    top: 0;
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 100px;
    right: var(--space-lg);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-sm);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform var(--transition-slower);
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast--success {
    background: var(--color-success);
    color: var(--color-white);
}

.toast--error {
    background: var(--color-error);
    color: var(--color-white);
}

.toast--info {
    background: var(--color-info);
    color: var(--color-white);
}

/* ---- Divider ---- */
.divider {
    width: 60px;
    height: 3px;
    background: var(--color-secondary);
    border: none;
    margin: var(--space-lg) 0;
}

.divider--center {
    margin-left: auto;
    margin-right: auto;
}

/* ---- Image Placeholder ---- */
.img-placeholder {
    background: linear-gradient(135deg, var(--color-surface-light) 0%, var(--color-border) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
}

/* ---- Lazy Load ---- */
.lazy-img {
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.lazy-img.loaded {
    opacity: 1;
}

/* ---- Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: var(--fs-tiny);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wide);
    border-radius: var(--radius-full);
    background: rgba(var(--color-secondary-rgb), 0.12);
    color: var(--color-secondary);
}

/* ---- Body scroll lock (for modals/menu) ---- */
body.menu-open,
body.modal-open {
    overflow: hidden;
}

/* ---- Selection color ---- */
::selection {
    background: rgba(var(--color-secondary-rgb), 0.25);
    color: var(--color-primary);
}

/* ---- Scrollbar styling (Webkit) ---- */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-muted);
    border-radius: var(--radius-full);
}

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

/* ============================================================
   Page Hero Banner & Breadcrumbs (Inner Pages Header Spacing)
   ============================================================ */

.page-hero {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, var(--color-surface-light, #EEEDE9) 0%, var(--color-page, #F5F4F0) 100%);
    border-bottom: 1px solid var(--color-border, #E2E1DC);
    padding-top: calc(var(--navbar-height) + clamp(24px, 3.5vw, 44px));
    padding-bottom: clamp(32px, 4vw, 56px);
    box-sizing: border-box;
}

.page-hero__content {
    max-width: 960px;
}

.page-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4.5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--color-text, #171A1C);
    margin-top: 0;
    margin-bottom: var(--space-3, 12px);
}

.page-hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.6;
    color: var(--color-text-muted, #5C6870);
    max-width: 760px;
    margin: 0;
}

/* Breadcrumbs Component */
.breadcrumbs {
    margin-bottom: var(--space-4, 16px);
}

.breadcrumbs .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.8125rem;
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted, #5C6870);
}

.breadcrumbs__link {
    color: var(--color-text-muted, #5C6870);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs__link:hover {
    color: var(--color-brand);
}

.breadcrumbs__current {
    color: var(--color-brand);
    font-weight: 600;
}

.breadcrumbs__separator {
    color: rgba(0, 0, 0, 0.25);
    user-select: none;
}

@media (max-width: 1023px) {
    .page-hero {
        padding-top: calc(70px + 24px);
        padding-bottom: 32px;
    }
}

@media (max-width: 767px) {
    .page-hero {
        padding-top: calc(70px + 18px);
        padding-bottom: 24px;
    }
    
    .page-hero__title {
        font-size: clamp(1.85rem, 7.5vw, 2.4rem);
    }
    
    .page-hero__subtitle {
        font-size: 0.9375rem;
    }
}

