/* common.css - LuxeDrapeStudio Theme */

/* 1. Font-face: Montserrat */
/* Ensure fonts/Montserrat-Regular.ttf, Montserrat-Italic.ttf, Montserrat-Bold.ttf exist with license file in fonts/ */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-style: normal;
    font-optical-sizing: auto;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Italic.ttf') format('truetype');
    font-style: italic;
    font-optical-sizing: auto;
}

/* 2. Root variables (Mobile-first) */
:root {
    /* Color Palette */
    --color-primary: #333333;
    /* Dark gray for headings/text */
    --color-accent: #8B5E3C;
    /* Warm accent reminiscent of elegant fabric tones */
    --color-bg-light: #FAFAF8;
    /* Very light neutral background */
    --color-bg-dark: #1F1F1F;
    /* Dark background for dark-mode or footer */
    --color-text: #444444;
    /* Primary body text color */
    --color-text-secondary: #666666;
    /* Secondary text color */
    --color-heading: #222222;
    /* Heading color */
    --color-border: #E0E0E0;
    /* Light border color */

    /* Typography */
    --font-family-base: 'Montserrat', sans-serif;
    --font-size-base: 1rem;
    /* 16px */
    --line-height-base: 1.5;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 48px;

    /* Breakpoints */
    --breakpoint-mobile: 480px;
    --breakpoint-tablet: 769px;
    --breakpoint-desktop: 1024px;
    --breakpoint-large: 1440px;

    /* Layout */
    --container-max-width: 1200px;
    --header-height: 60px;
    --footer-height: 80px;

    /* Transitions */
    --transition-time: 0.3s;
}

/* 3. Global reset & base styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 100%;
    /* 16px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

/* Media query for dark-mode preference */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--color-bg-dark);
        color: var(--color-text-secondary);
    }
}

/* 4. Image and media */
img,
picture,
video,
svg {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 5. Links and buttons base */
a {
    color: inherit;
    text-decoration: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family-base);
}

input,
textarea,
select,
button {
    font-family: var(--font-family-base);
}

/* 6. Container and layout utilities */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.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);
}

.section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

/* 7. Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-bg-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

header.dark-mode {
    background-color: var(--color-bg-dark);
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Example nav container */
.navbar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
}

.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-time) ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu toggle classes (CSS-only approach can use checkbox hack or JS-driven) */
.menu-toggle {
    display: none;
    /* Show via media query on mobile */
}

/* 8. Footer */
.footer {
    background-color: var(--color-bg-dark);
    color: var(--color-bg-light);
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.footer a {
    color: var(--color-bg-light);
}

.footer .footer-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.footer .footer-logo {
    margin-bottom: var(--space-md);
}

/* 9. Typography */
h1,
.h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    text-transform: none;
}

h2,
.h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: var(--space-md);
}

h3,
.h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: var(--space-sm);
}

p {
    font-size: 1rem;
    margin-bottom: var(--space-md);
    color: var(--color-text-secondary);
}

.text-center {
    text-align: center;
}

/* 10. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color var(--transition-time) ease, transform var(--transition-time) ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-bg-light);
    border: 2px solid var(--color-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-bg-light);
    color: var(--color-accent);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--color-accent);
    color: var(--color-bg-light);
    transform: translateY(-2px);
}

/* 11. Link underline animation */
.link-underline {
    position: relative;
    color: var(--color-accent);
}

.link-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-time) ease;
}

.link-underline:hover::after,
.link-underline:focus::after {
    width: 100%;
}

/* 12. Forms */
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    transition: border-color var(--transition-time) ease, box-shadow var(--transition-time) ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 94, 60, 0.2);
}

/* Checkbox privacy */
input[type="checkbox"] {
    margin-right: var(--space-sm);
}

/* Submit buttons in forms */
.form-btn {
    margin-top: var(--space-md);
}

/* 13. Utility classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.mt-50 {
    margin-top: 50px !important;
}

.mb-50 {
    margin-bottom: 50px !important;
}

.p-20 {
    padding: 20px !important;
}

.transition-all {
    transition: all var(--transition-time) ease !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* 14. Image hover */
.img-hover-scale {
    transition: transform var(--transition-time) ease;
}

.img-hover-scale:hover,
.img-hover-scale:focus {
    transform: scale(1.05);
}

/* 15. Sections with overlays */
.section-overlay {
    position: relative;
}

.section-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* 16. Fullscreen hero utility */
.section-fullscreen {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: var(--space-md);
    color: var(--color-bg-light);
    text-align: center;
}

/* 17. Swiper integration */
/* Ensure swiper-bundle.min.css is imported in HTML or via @import here if desired: */
/* @import url('swiper-bundle.min.css'); */

.swiper-container {
    width: 100%;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Example overrides for navigation buttons and pagination bullets */
.swiper-button-next,
.swiper-button-prev {
    color: var(--color-accent);
    transition: color var(--transition-time) ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover,
.swiper-button-next:focus,
.swiper-button-prev:focus {
    color: var(--color-primary);
}

.swiper-pagination-bullet {
    background-color: var(--color-accent);
    opacity: 0.7;
    transition: opacity var(--transition-time) ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* 18. Animations keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Utility to apply animation when class added */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.6s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease forwards;
}

/* 19. Responsive breakpoints (mobile-first) */
/* Base is mobile (up to 479px) */

/* Tablets and larger */
@media (min-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    /* Example: show menu-toggle on mobile */
    .menu-toggle {
        display: block;
    }
}

/* Tablet and up (>=768px) */
@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .flex-space-between {
        flex-direction: row;
    }
}

/* Desktop and up (>=1024px) */
@media (min-width: 1024px) {
    .container {
        max-width: var(--container-max-width);
    }

    header {
        /* possibly adjust padding */
    }
}

/* Large desktop (>=1440px) */
@media (min-width: 1440px) {
    /* Increase spacing if desired */
}

/* 20. Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    header {
        background-color: var(--color-bg-dark);
        box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    }

    .footer {
        background-color: var(--color-bg-dark);
        color: var(--color-bg-light);
    }

    input,
    textarea,
    select {
        background-color: #2A2A2A;
        color: #EEE;
        border-color: #444;
    }

    .btn-primary {
        background-color: var(--color-accent);
        color: var(--color-bg-light);
    }

    .btn-primary:hover,
    .btn-primary:focus {
        background-color: var(--color-bg-light);
        color: var(--color-accent);
    }
}

/* 21. Additional utilities */
/* Sticky element */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Divider utilities */
.divider {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent);
    margin: var(--space-md) auto;
}

/* Text helpers */
.text-accent {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-text-secondary);
}

/* Example block-specific placeholders (customize per block in separate CSS) */
/* .hero-section { ... } */
/* .features-section { ... } */
/* .product-slider { ... } */
/* .testimonials-section { ... } */
/* .process-section { ... } */
/* .cta-section { ... } */
/* .gallery-section { ... } */
/* .contact-section { ... } */

/* End of common.css */