* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-inverse: #ffffff;
}

/* Dark theme + language switcher (aligned with main site) */
.dark-theme {
    --color-bg: #0d0d0f;
    --color-text: #f3f4f6;
    --color-inverse: #111111;
}

.dark-theme body {
    background: var(--color-bg);
    color: var(--color-text);
}

.dark-theme .bg-white,
.dark-theme .bg-neutral-50 {
    background-color: #17171a !important;
}

.dark-theme .text-black {
    color: #f3f4f6 !important;
}

.dark-theme .text-gray-700,
.dark-theme .opacity-60,
.dark-theme .opacity-40 {
    color: rgba(243, 244, 246, 0.78) !important;
}

.dark-theme .border-black,
.dark-theme .border-black\/10,
.dark-theme .border-black\/20 {
    border-color: rgba(255, 255, 255, 0.28) !important;
}

.dark-theme .btn-outline {
    background: transparent;
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.6);
}

.dark-theme .btn-outline:hover {
    background: #f3f4f6;
    color: #101013;
    border-color: #f3f4f6;
}

.dark-theme .btn-primary,
.dark-theme .pricing-btn {
    background: #f3f4f6;
    color: #101013;
    border-color: #f3f4f6;
}

.dark-theme .btn-primary::before,
.dark-theme .pricing-btn::before {
    background: #101013;
}

.dark-theme .btn-primary:hover span,
.dark-theme .pricing-btn:hover span {
    color: #f3f4f6;
}

.dark-theme .btn-primary:hover,
.dark-theme .pricing-btn:hover {
    color: #f3f4f6;
}

.dark-theme .hero-catalog {
    background: #17171a !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-theme .filter-bar {
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

.dark-theme .btn-filter {
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.35);
}

.dark-theme .btn-filter.active,
.dark-theme .btn-filter:hover {
    background: #f3f4f6;
    color: #101013;
    border-color: #f3f4f6;
}

.dark-theme .template-card {
    background: #17171a;
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-theme .template-card:hover {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.dark-theme .border-y.border-black {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.dark-theme ::-webkit-scrollbar-track {
    background: #17171a;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: rgba(243, 244, 246, 0.35);
}

.dark-theme .empty-state {
    color: rgba(243, 244, 246, 0.78);
}

/* Fluid navbar typography only between 1090px and 1024px (same as main) */
@media (max-width: 1090px) and (min-width: 1024px) {
    .nav-container .text-xl,
    .nav-container .lg\:text-2xl {
        font-size: clamp(1.32rem, 1.15rem + 0.22vw, 1.4rem) !important;
    }

    .nav-container .text-sm {
        font-size: clamp(0.8rem, 0.72rem + 0.12vw, 0.85rem) !important;
    }

    .nav-actions .btn-primary {
        font-size: clamp(0.78rem, 0.72rem + 0.1vw, 0.82rem);
        padding: clamp(0.78rem, 0.7rem + 0.1vw, 0.84rem) clamp(1.25rem, 1.1rem + 0.2vw, 1.35rem);
    }

    .lang-switcher__item,
    .lang-switcher-select {
        font-size: clamp(0.76rem, 0.7rem + 0.1vw, 0.8rem);
    }
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.25s ease;
    cursor: pointer;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.lang-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
    transition: all 0.25s ease;
    text-decoration: none;
}

.lang-switcher__item:hover {
    background: rgba(255, 255, 255, 0.18);
}

.lang-switcher__item--active {
    background: #fff;
    color: #000;
}

.lang-switcher-select {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.5rem 2.1rem 0.5rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='white' d='M1.1 0.6 5 4.5 8.9 0.6 10 1.7 5 6 0 1.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 0.62rem 0.38rem;
    cursor: pointer;
}

.lang-switcher-select option {
    color: #000;
}

@media (max-width: 1220px) {
    .lang-switcher {
        padding: 0;
        border: 0;
        background: transparent;
    }

    .lang-switcher__item {
        display: none;
    }

    .lang-switcher-select {
        display: inline-flex;
        align-items: center;
    }
}

@media (max-width: 415px) {
    .lang-switcher-select {
        font-size: 0.68rem;
        padding: 0.42rem 1.75rem 0.42rem 0.68rem;
        background-position: right 0.65rem center;
        background-size: 0.52rem 0.32rem;
    }

    .theme-toggle {
        height: 2rem;
        width: 2rem;
    }

    .theme-toggle i {
        font-size: 0.75rem;
    }
}

@media (max-width: 355px) {
    .brand-title {
        display: none;
    }
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
}

.theme-toggle i {
    position: absolute;
    font-size: 1.15rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle .theme-icon-moon {
    opacity: 0;
    transform: scale(0.6);
}

.dark-theme .theme-toggle .theme-icon-sun {
    opacity: 0;
    transform: scale(0.6);
}

.dark-theme .theme-toggle .theme-icon-moon {
    opacity: 1;
    transform: scale(1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: none;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-serif {
    font-family: var(--font-secondary);
}

/* Grain Texture */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9990;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, border-width 0.3s;
}

.cursor-outline.hover {
    width: 80px;
    height: 80px;
    border-width: 2px;
    background: rgba(255,255,255,0.1);
}

.cursor-dot.hover {
    width: 12px;
    height: 12px;
}

/* Navigation - White Background */
.nav-absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 1.5rem;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu a {
    color: #fff;
    font-size: 2rem;
    font-family: var(--font-secondary);
    font-style: italic;
    text-decoration: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-menu.active a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.active a:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu.active a:nth-child(4) { transition-delay: 0.4s; }

.menu-toggle {
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #fff;
    transition: all 0.3s ease;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }

.menu-toggle.active span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background: #fff;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
    background: #fff;
}

/* Buttons */
.btn-primary {
    padding: 1rem 2rem;
    background: #000;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 2px solid #000;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
    z-index: 0;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-primary span {
    position: relative;
    z-index: 1;
    transition: color 0.3s;
}

.btn-primary:hover span {
    color: #000;
}

.btn-outline {
    padding: 1rem 2rem;
    background: transparent;
    color: #000;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 2px solid #000;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: #000;
    color: #fff;
}

.btn-filter {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #000;
    font-weight: 500;
    letter-spacing: 0.05em;
    border: 1px solid #000;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-filter.active,
.btn-filter:hover {
    background: #000;
    color: #fff;
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
}

/* Template Card */
.template-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.template-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
    border-color: #000;
}

.template-card.hidden {
    display: none;
}

.template-image-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.template-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(100%);
}

.template-card:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.template-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.template-card:hover .template-overlay {
    background: rgba(0,0,0,0.4);
}

.template-info {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    color: #fff;
}

.template-card:hover .template-info {
    opacity: 1;
    transform: translateY(0);
}

.template-meta {
    padding: 1.5rem;
}

.template-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.template-title {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.template-price {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Preview Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    position: relative;
    max-width: 72vw;
    max-height: 80vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-info {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-nav:hover {
    background: rgba(255,255,255,0.2);
}

.modal-prev { left: -70px; }
.modal-next { right: -70px; }

@media (max-width: 768px) {
    .modal-content {
        max-width: 86vw;
        max-height: 75vh;
    }
    .modal-image {
        max-height: 64vh;
    }
    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
    .modal-close { top: 10px; right: 10px; }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Filter Bar */
.filter-bar {
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.filter-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 640px) {
    .filter-container {
        gap: 0.5rem;
    }
    .btn-filter {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Marquee */
.marquee {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Mobile Cursor Disable */
@media (pointer: coarse) {
    body { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #fff;
}

::-webkit-scrollbar-thumb {
    background: #000;
}

/* Section Title */
.section-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    opacity: 0.5;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Hero Section - White Background */
.hero-catalog {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 120px 1rem 4rem;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.hero-catalog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0,0,0,0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(0,0,0,0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero-catalog .absolute-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.02;
    pointer-events: none;
}

.hero-catalog .absolute-text div {
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: bold;
    white-space: nowrap;
    letter-spacing: -0.05em;
}