/*
 * Responsive Stylesheet for Organic Fabrics Website
 * Created: October 30, 2025
 */

/* =========== CSS Variables =========== */
:root {
    /* Colors - Обновленная цветовая схема */
    --color-primary: #4A6FA5; /* Синий */
    --color-secondary: #F2F5F9; /* Светло-голубой */
    --color-accent: #E3B04B; /* Золотистый */
    --color-highlight: #D85A52; /* Коралловый */
    --color-text: #2D3142; /* Темно-синий */
    --color-light-text: #6B7280;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-error: #e74c3c;
    --color-success: #2ecc71;

    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Nunito Sans', sans-serif;

    /* Font Sizes - Using rem for better accessibility */
    --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 */
    --text-6xl: 4rem;     /* 64px */

    /* Spacing */
    --space-xs: 0.25rem;  /* 4px */
    --space-sm: 0.5rem;   /* 8px */
    --space-md: 1rem;     /* 16px */
    --space-lg: 2rem;     /* 32px */
    --space-xl: 3rem;     /* 48px */
    --space-xxl: 5rem;    /* 80px */

    /* Borders & Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --border-thin: 1px solid var(--color-accent);
    --border-medium: 2px solid var(--color-accent);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;

    /* Container Widths */
    --container-sm: 540px;
    --container-md: 720px;
    --container-lg: 960px;
    --container-xl: 1140px;
    --container-xxl: 1320px;

    /* Z-index layers */
    --z-below: -1;
    --z-normal: 1;
    --z-above: 10;
    --z-header: 100;
    --z-popup: 1000;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    font-family: var(--font-secondary);
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    margin-bottom: var(--space-md);
    line-height: 1.3;
    font-weight: 600;
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-md);
}

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

a:hover {
    color: var(--color-highlight);
}

a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

ul, ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-xs);
}

button, .button {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-secondary);
    font-size: var(--text-base);
    font-weight: 600;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

button:hover, .button:hover {
    background-color: var(--color-highlight);
}

button:focus, .button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

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

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

input, textarea, select {
    font-family: var(--font-secondary);
    font-size: var(--text-base);
}

/* =========== Layout & Container Classes =========== */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
    margin: 0 auto;
}

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

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

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

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

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

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

/* Flexbox Utilities */
.flex {
    display: flex;
}

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

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-nowrap {
    flex-wrap: nowrap;
}

.flex-1 {
    flex: 1;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

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

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

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

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

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

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

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

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

.self-start {
    align-self: flex-start;
}

.self-end {
    align-self: flex-end;
}

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

.self-stretch {
    align-self: stretch;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* Grid Utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.grid-cols-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-cols-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

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

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

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-xs { margin: var(--space-xs); }
.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }
.m-auto { margin: auto; }

.mx-0 { margin-left: 0; margin-right: 0; }
.mx-xs { margin-left: var(--space-xs); margin-right: var(--space-xs); }
.mx-sm { margin-left: var(--space-sm); margin-right: var(--space-sm); }
.mx-md { margin-left: var(--space-md); margin-right: var(--space-md); }
.mx-lg { margin-left: var(--space-lg); margin-right: var(--space-lg); }
.mx-xl { margin-left: var(--space-xl); margin-right: var(--space-xl); }
.mx-auto { margin-left: auto; margin-right: auto; }

.my-0 { margin-top: 0; margin-bottom: 0; }
.my-xs { margin-top: var(--space-xs); margin-bottom: var(--space-xs); }
.my-sm { margin-top: var(--space-sm); margin-bottom: var(--space-sm); }
.my-md { margin-top: var(--space-md); margin-bottom: var(--space-md); }
.my-lg { margin-top: var(--space-lg); margin-bottom: var(--space-lg); }
.my-xl { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }
.my-auto { margin-top: auto; margin-bottom: auto; }

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-auto { margin-top: auto; }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-auto { margin-bottom: auto; }

.ml-0 { margin-left: 0; }
.ml-xs { margin-left: var(--space-xs); }
.ml-sm { margin-left: var(--space-sm); }
.ml-md { margin-left: var(--space-md); }
.ml-lg { margin-left: var(--space-lg); }
.ml-xl { margin-left: var(--space-xl); }
.ml-auto { margin-left: auto; }

.mr-0 { margin-right: 0; }
.mr-xs { margin-right: var(--space-xs); }
.mr-sm { margin-right: var(--space-sm); }
.mr-md { margin-right: var(--space-md); }
.mr-lg { margin-right: var(--space-lg); }
.mr-xl { margin-right: var(--space-xl); }
.mr-auto { margin-right: auto; }

.p-0 { padding: 0; }
.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.px-0 { padding-left: 0; padding-right: 0; }
.px-xs { padding-left: var(--space-xs); padding-right: var(--space-xs); }
.px-sm { padding-left: var(--space-sm); padding-right: var(--space-sm); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-xl { padding-left: var(--space-xl); padding-right: var(--space-xl); }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-xs { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }
.py-sm { padding-top: var(--space-sm); padding-bottom: var(--space-sm); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

.pt-0 { padding-top: 0; }
.pt-xs { padding-top: var(--space-xs); }
.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }

.pb-0 { padding-bottom: 0; }
.pb-xs { padding-bottom: var(--space-xs); }
.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }

.pl-0 { padding-left: 0; }
.pl-xs { padding-left: var(--space-xs); }
.pl-sm { padding-left: var(--space-sm); }
.pl-md { padding-left: var(--space-md); }
.pl-lg { padding-left: var(--space-lg); }
.pl-xl { padding-left: var(--space-xl); }

.pr-0 { padding-right: 0; }
.pr-xs { padding-right: var(--space-xs); }
.pr-sm { padding-right: var(--space-sm); }
.pr-md { padding-right: var(--space-md); }
.pr-lg { padding-right: var(--space-lg); }
.pr-xl { padding-right: var(--space-xl); }

/* Display Utilities */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.hidden { display: none; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.z-below { z-index: var(--z-below); }
.z-normal { z-index: var(--z-normal); }
.z-above { z-index: var(--z-above); }
.z-header { z-index: var(--z-header); }
.z-popup { z-index: var(--z-popup); }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-highlight { color: var(--color-highlight); }
.text-light { color: var(--color-light-text); }
.text-white { color: var(--color-white); }
.text-black { color: var(--color-black); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }

.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.font-primary { font-family: var(--font-primary); }
.font-secondary { font-family: var(--font-secondary); }

.leading-tight { line-height: 1.2; }
.leading-normal { line-height: 1.5; }
.leading-loose { line-height: 1.8; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

.italic { font-style: italic; }
.not-italic { font-style: normal; }

.whitespace-normal { white-space: normal; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre { white-space: pre; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-pre-wrap { white-space: pre-wrap; }

.line-clamp-1, .line-clamp-2, .line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

/* Background & Border Utilities */
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-highlight { background-color: var(--color-highlight); }
.bg-white { background-color: var(--color-white); }
.bg-black { background-color: var(--color-black); }
.bg-error { background-color: var(--color-error); }
.bg-success { background-color: var(--color-success); }

.border { border: 1px solid; }
.border-thin { border: var(--border-thin); }
.border-medium { border: var(--border-medium); }
.border-none { border: none; }

.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow Utilities */
.shadow-none { box-shadow: none; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Object Fit Utilities */
.object-contain { object-fit: contain; }
.object-cover { object-fit: cover; }
.object-fill { object-fit: fill; }
.object-scale-down { object-fit: scale-down; }
.object-none { object-fit: none; }

/* Width & Height Utilities */
.w-auto { width: auto; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }
.w-min { width: min-content; }
.w-max { width: max-content; }
.w-fit { width: fit-content; }
.w-0 { width: 0; }


.h-auto { height: auto; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-min { height: min-content; }
.h-max { height: max-content; }
.h-fit { height: fit-content; }
.h-0 { height: 0; }


/* Visibility & Opacity */
.visible { visibility: visible; }
.invisible { visibility: hidden; }
.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-hidden { overflow-y: hidden; }

/* =========== Header Styles =========== */
.site-header {
    background-color: var(--color-secondary);
    padding: var(--space-md) 0;
    position: relative;
    box-shadow: var(--shadow-sm);
    z-index: var(--z-header);
}

.site-brand {
    font-family: var(--font-primary);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    transition: color var(--transition-fast);
}

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

.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0 var(--space-md);
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width var(--transition-fast);
}

.nav-link:hover::after,
.current-page .nav-link::after {
    width: 100%;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: var(--z-above);
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    border-radius: 10px;
    background-color: var(--color-primary);
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* =========== Hero Section =========== */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    /*background-color: var(--color-secondary);*/
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/5.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: var(--z-below);
}

.bg {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/5.webp');
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: var(--z-below);
}

.hero-content {
    position: relative;
    z-index: var(--z-normal);
    max-width: 600px;
}

.hero-title {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-lg);
    color: var(--color-text);
}

.hero-description {
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
}

/* =========== Features Section =========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    background-color: var(--color-secondary);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: var(--text-5xl);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
}

/* =========== Product Cards =========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.product-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.product-info {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
}

.product-description {
    margin-bottom: var(--space-sm);
    color: var(--color-light-text);
    flex: 1;
}

.product-price {
    font-weight: bold;
    font-size: var(--text-lg);
    color: var(--color-highlight);
    margin-bottom: var(--space-sm);
}

/* =========== Gallery Section =========== */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.filter-button {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-button:hover,
.filter-button.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    height: 300px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transition: opacity var(--transition-medium);
    display: flex;
    align-items: flex-end;
    padding: var(--space-md);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: var(--color-white);
    font-size: var(--text-xl);
    margin: 0;
}

/* =========== Material Compare Section =========== */
.materials-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-lg);
    overflow-x: auto;
    display: block;
}

.materials-table th,
.materials-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--color-accent);
}

.materials-table th {
    background-color: var(--color-secondary);
    font-weight: 600;
}

.materials-table tr:last-child td {
    border-bottom: none;
}

.materials-table tr:hover {
    background-color: rgba(74, 111, 165, 0.1);
}

.material-rating {
    display: flex;
}

.rating-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-accent);
    margin-right: 3px;
}

.rating-dot.filled {
    background-color: var(--color-primary);
}

/* =========== Benefits Section =========== */
.benefit-card {
    display: flex;
    margin-bottom: var(--space-lg);
}

.benefit-icon {
    font-size: var(--text-4xl);
    color: var(--color-primary);
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.benefit-content {
    flex: 1;
}

.benefit-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-xs);
}

/* =========== Contact Form =========== */
.contact-section {
    background-color: var(--color-secondary);
    padding: var(--space-xl) 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-md);
    font-family: var(--font-secondary);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.3);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-md);
}

.form-checkbox input {
    margin-right: var(--space-sm);
    margin-top: 5px;
}

.submit-button {
    width: 100%;
    padding: var(--space-sm) var(--space-lg);
}

/* Form Validation */
.form-input.is-invalid,
.form-textarea.is-invalid {
    border-color: var(--color-error);
}

.error-message {
    color: var(--color-error);
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
}

/* =========== Map Section =========== */
.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* =========== Footer Styles =========== */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.footer-column h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
    color: var(--color-white);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    margin-bottom: var(--space-xs);
}

.footer-link a {
    color: var(--color-secondary);
    transition: color var(--transition-fast);
}

.footer-link a:hover {
    color: var(--color-white);
}

.footer-contact {
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: var(--space-sm);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: var(--text-sm);
}

/* =========== Privacy Policy Popup =========== */
.privacy-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md);
    z-index: var(--z-popup);
    transform: translateY(100%);
    transition: transform var(--transition-medium);
}

.privacy-popup.active {
    transform: translateY(0);
}

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

.privacy-text {
    flex: 1;
    margin-right: var(--space-md);
}

.privacy-buttons {
    display: flex;
    gap: var(--space-sm);
}

/* =========== Error Page =========== */
.error-page {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.error-code {
    font-size: var(--text-6xl);
    font-weight: 700;
    color: var(--color-highlight);
    margin-bottom: var(--space-md);
}

.error-text {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-lg);
}

/* =========== Thank You Page =========== */
.thank-you {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.thank-you-icon {
    font-size: var(--text-6xl);
    color: var(--color-success);
    margin-bottom: var(--space-lg);
}

.thank-you-title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-md);
}

/* =========== Plain Pages Styles =========== */
.plain-page {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.plain-page h1 {
    margin-bottom: var(--space-lg);
}

.plain-page h2 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

.plain-page p {
    margin-bottom: var(--space-md);
}

.plain-page ul, .plain-page ol {
    margin-bottom: var(--space-lg);
}

/* =========== Accessibility =========== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px;
    z-index: var(--z-popup);
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles */
:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users, keep for keyboard navigation */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* =========== Animations =========== */
.animate-fade {
    animation: fade 0.5s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-in-out;
}

.animate-slide-down {
    animation: slideDown 0.5s ease-in-out;
}

.animate-slide-left {
    animation: slideLeft 0.5s ease-in-out;
}

.animate-slide-right {
    animation: slideRight 0.5s ease-in-out;
}

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

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

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

/* =========== Print Styles =========== */
@media print {
    body {
        background: white;
        font-size: 12pt;
        color: black;
    }

    .site-header,
    .site-footer,
    .privacy-popup,
    .hamburger-menu {
        display: none;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 2cm;
    }
}

/* =========== Responsive Media Queries =========== */
/* Mobile menu styles - applied at all screen sizes below 768px */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
        z-index: 1000;
    }

    .nav-list {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
        z-index: var(--z-header);
        padding: var(--space-xl);
    }

    .nav-list.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-item {
        margin: var(--space-md) 0;
    }

    .nav-link {
        font-size: var(--text-xl);
    }

    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* Prevent scrolling when mobile menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Large screens (desktops, 1200px and up) */
@media (min-width: 1200px) {
    :root {
        --space-md: 1.25rem;
        --space-lg: 2.5rem;
        --space-xl: 4rem;
        --space-xxl: 6rem;
    }

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

    .hero-title {
        font-size: 3.5rem;
    }
}

/* Medium screens (tablets, 992px to 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: var(--container-lg);
    }

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

/* Small screens (tablets, 768px to 991px) */
@media (max-width: 991px) {
    :root {
        --text-5xl: 2.75rem;
        --text-4xl: 2.25rem;
    }

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

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

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

    .hero {
        height: 70vh;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-description {
        font-size: var(--text-lg);
    }

    .feature-icon {
        font-size: 3rem;
    }

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

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

/* Extra small screens (phones, 576px to 767px) */
@media (max-width: 767px) {
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --text-2xl: 1.5rem;
        --space-lg: 1.5rem;
        --space-xl: 2.5rem;
    }

    .container {
        max-width: 100%;
    }

    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

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

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .benefit-card {
        flex-direction: column;
        text-align: center;
    }

    .benefit-icon {
        margin-right: 0;
        margin-bottom: var(--space-sm);
    }

    .section {
        padding: var(--space-md) 0;
    }

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

    .feature-card {
        padding: var(--space-md);
    }

    .privacy-content {
        flex-direction: column;
    }

    .privacy-text {
        margin-right: 0;
        margin-bottom: var(--space-md);
        text-align: center;
    }

    .privacy-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* Very small screens (small phones, 375px and down) */
@media (max-width: 375px) {
    :root {
        --text-base: 0.9375rem;
        --text-lg: 1.0625rem;
        --text-xl: 1.125rem;
        --text-2xl: 1.3125rem;
        --text-3xl: 1.5rem;
        --text-4xl: 1.75rem;
        --text-5xl: 2.25rem;
    }

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

    .hero {
        min-height: 350px;
    }

    .hero-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-md);
    }

    .hero-description {
        font-size: var(--text-base);
    }

    .button {
        padding: var(--space-xs) var(--space-sm);
        font-size: var(--text-sm);
    }

    .feature-card,
    .product-card {
        padding: var(--space-sm);
    }

    .gallery-item {
        height: 200px;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .nav-link::after {
        display: none;
    }

    .feature-card,
    .product-card,
    .gallery-item {
        /* Remove hover effects for touch devices */
        transform: none !important;
    }

    .gallery-overlay {
        /* Always show overlay for touch devices */
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    }
}

/* High contrast mode improvements */
@media (prefers-contrast) {
    :root {
        --color-primary: #0056b3;
        --color-secondary: #ffffff;
        --color-accent: #994d00;
        --color-highlight: #cc0000;
        --color-text: #000000;
        --color-light-text: #333333;
    }

    .feature-card,
    .product-card,
    .gallery-item {
        border: 2px solid var(--color-text);
    }

    a {
        text-decoration: underline;
    }

    .nav-link::after {
        height: 3px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .feature-card:hover,
    .product-card:hover,
    .gallery-image:hover {
        transform: none !important;
    }
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}