﻿/* ================================================
   O.N.Precision - Main Stylesheet
   Tổ chức theo Mobile First approach
   Hỗ trợ đa ngôn ngữ VN và JP
   ================================================ */

/* ========================
   CSS Custom Properties (Variables)
   ======================== */
:root {
    /* Colors - Màu sắc chính */
    --color-primary: #8b1a1a;
    /* Đỏ đậm truyền thống Nhật */
    --color-primary-light: #a82e2e;
    --color-primary-dark: #6b1515;
    --color-secondary: #2c3e50;
    /* Xanh đậm chuyên nghiệp */
    --color-accent: #d4af37;
    /* Vàng kim loại */

    /* Neutral Colors - Màu trung tính */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Typography - Font chữ */
    --font-primary: 'Noto Sans JP', 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Noto Sans JP', 'Noto Sans', serif;

    /* Font Sizes - Kích thước chữ */
    --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: 3.75rem;
    /* 60px */

    /* Spacing - Khoảng cách */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;
    --spacing-24: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-tooltip: 500;

    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;
}

/* ========================
   CSS Reset & Base Styles
   ======================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-gray-800);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Language-specific font adjustments 
   Điều chỉnh font theo ngôn ngữ */
html[lang="vi"] body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

address {
    font-style: normal;
}

/* ========================
   Utility Classes
   ======================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-8);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================
   Header Styles
   ======================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-fixed);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: var(--text-lg);
    color: var(--color-gray-900);
    z-index: var(--z-fixed);
}

.logo:hover {
    color: var(--color-primary);
}

/* Main Navigation */
.main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .main-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--spacing-8);
}

.nav-link {
    position: relative;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-700);
    padding: var(--spacing-2) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.lang-btn {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-gray-500);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.lang-btn:hover {
    color: var(--color-gray-800);
}

.lang-btn.active {
    color: var(--color-primary);
    background: rgba(139, 26, 26, 0.1);
}

.lang-divider {
    color: var(--color-gray-300);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    z-index: var(--z-fixed);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-gray-800);
    margin: 3px 0;
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Overlay */
@media (max-width: 1023px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--spacing-6);
    }

    .nav-link {
        font-size: var(--text-xl);
    }
}

/* ========================
   Hero Section
   ======================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
    text-align: center;
    color: var(--color-white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    padding: var(--spacing-4);
}

.hero-subtitle {
    font-size: var(--text-2xl);
    font-weight: 300;
    letter-spacing: 0.5em;
    margin-bottom: var(--spacing-4);
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: var(--text-3xl);
    }
}

.hero-title {
    font-size: var(--text-4xl);
    font-weight: 700;
    letter-spacing: 0.15em;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.6s;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-5xl);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: var(--text-6xl);
    }
}

/* Hero Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================
   News Section
   ======================== */
.news-section {
    background: var(--color-white);
    padding: var(--spacing-12) 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.news-wrapper {
    display: grid;
    gap: var(--spacing-6);
}

@media (min-width: 768px) {
    .news-wrapper {
        grid-template-columns: 180px 1fr;
        gap: var(--spacing-8);
        align-items: start;
    }
}

.news-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: var(--spacing-4);
    border-left: 4px solid var(--color-primary);
}

.news-title {
    font-size: var(--text-xl);
    font-weight: 700;
    font-style: italic;
    color: var(--color-primary);
    letter-spacing: 0.05em;
}

.news-subtitle {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    font-style: italic;
    margin-bottom: var(--spacing-4);
}

/* All News Button */
.news-all-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    padding: var(--spacing-2) var(--spacing-4);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-2);
    transition: all var(--transition-base);
}

.news-all-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.news-all-btn svg {
    transition: transform var(--transition-base);
}

.news-all-btn:hover svg {
    transform: translateX(4px);
}

.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-4);
    padding: var(--spacing-4) 0;
    border-bottom: 1px solid var(--color-gray-200);
}

.news-item:first-child {
    padding-top: 0;
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-date {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    font-feature-settings: 'tnum';
    min-width: 90px;
}

.news-category {
    font-size: var(--text-xs);
    color: var(--color-white);
    background: var(--color-primary);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius-sm);
}

.news-link {
    font-size: var(--text-base);
    color: var(--color-gray-700);
    flex: 1;
    line-height: 1.5;
}

.news-link:hover {
    color: var(--color-primary);
}

/* ========================
   Section Common Styles
   ======================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-12);
}

.section-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-gray-800);
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-2);
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--text-3xl);
    }
}

.section-subtitle {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.section-footer {
    text-align: center;
    margin-top: var(--spacing-10);
}

/* ========================
   Works Section
   ======================== */
.works-section {
    background: var(--color-gray-50);
    padding: var(--spacing-16) 0;
}

.works-content {
    display: grid;
    gap: var(--spacing-10);
}

@media (min-width: 1024px) {
    .works-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-16);
        align-items: center;
    }
}

/* Video Card */
.works-video-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    transition: transform var(--transition-base);
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-bg {
    transition: fill var(--transition-fast);
}

.video-thumbnail:hover .play-bg {
    fill: var(--color-primary);
    fill-opacity: 0.9;
}

/* Video Container for HTML5 Video */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--color-gray-900);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.factory-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.factory-video:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Video controls styling */
.factory-video::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.factory-video::-webkit-media-controls-play-button {
    filter: brightness(1.2);
}

.video-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-4);
    background: var(--color-gray-100);
}

.video-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-700);
    line-height: 1.5;
}

.youtube-logo {
    height: 20px;
    width: auto;
}

.video-description {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    padding: var(--spacing-4);
}

/* Works Description */
.works-description {
    padding: var(--spacing-4);
}

@media (min-width: 1024px) {
    .works-description {
        padding: 0;
    }
}

.works-heading {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-gray-800);
    margin-bottom: var(--spacing-6);
    line-height: 1.6;
}

@media (min-width: 768px) {
    .works-heading {
        font-size: var(--text-2xl);
    }
}

.works-text {
    font-size: var(--text-base);
    color: var(--color-gray-600);
    line-height: 1.8;
    margin-bottom: var(--spacing-8);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.btn-outline {
    color: var(--color-gray-700);
    border: 1px solid var(--color-gray-400);
    background: transparent;
}

.btn-outline:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: rgba(139, 26, 26, 0.05);
}

.btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ========================
   Products Section
   ======================== */
.products-section {
    background: var(--color-white);
    padding: var(--spacing-16) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-4);
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-6);
    }
}

/* Product Card */
.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-link {
    display: block;
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-gray-100);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.product-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(139, 26, 26, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover .product-hover-overlay {
    opacity: 1;
}

.zoom-icon {
    width: 48px;
    height: 48px;
    color: var(--color-white);
}

.product-info {
    padding: var(--spacing-3);
    text-align: center;
}

@media (min-width: 768px) {
    .product-info {
        padding: var(--spacing-4);
    }
}

.product-category {
    display: block;
    font-size: var(--text-xs);
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: var(--spacing-1);
}

.product-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-gray-700);
    line-height: 1.5;
}

@media (min-width: 768px) {
    .product-name {
        font-size: var(--text-base);
    }
}

/* ========================
   Precision Section
   ======================== */
.precision-section {
    position: relative;
    padding: var(--spacing-20) 0;
    color: var(--color-white);
    overflow: hidden;
}

.precision-background {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.precision-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.precision-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(0, 30, 60, 0.85) 0%,
            rgba(0, 10, 30, 0.75) 100%);
}

.precision-content {
    position: relative;
    max-width: 800px;
}

.precision-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-6);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .precision-title {
        font-size: var(--text-3xl);
    }
}

.precision-description {
    font-size: var(--text-base);
    line-height: 1.8;
    margin-bottom: var(--spacing-10);
    opacity: 0.9;
}

.precision-block {
    margin-bottom: var(--spacing-8);
    padding-left: var(--spacing-4);
    border-left: 3px solid var(--color-accent);
}

.precision-block:last-child {
    margin-bottom: 0;
}

.precision-block-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-3);
    color: var(--color-accent);
}

.precision-block-content {
    font-size: var(--text-sm);
    line-height: 1.8;
    opacity: 0.85;
}

@media (min-width: 768px) {
    .precision-block-content {
        font-size: var(--text-base);
    }
}

/* ========================
   CTA Section (Company & Recruit)
   ======================== */
.cta-section {
    background: var(--color-gray-900);
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .cta-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* CTA Card */
.cta-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: var(--spacing-10);
    overflow: hidden;
}

@media (min-width: 768px) {
    .cta-card {
        min-height: 400px;
    }
}

.cta-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.cta-card:hover .cta-background img {
    transform: scale(1.08);
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    transition: background var(--transition-base);
}

.cta-card:hover .cta-overlay {
    background: rgba(139, 26, 26, 0.7);
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
}

.cta-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: var(--spacing-2);
}

@media (min-width: 768px) {
    .cta-title {
        font-size: var(--text-3xl);
    }
}

.cta-subtitle {
    font-size: var(--text-sm);
    opacity: 0.8;
    margin-bottom: var(--spacing-4);
}

.cta-description {
    font-size: var(--text-sm);
    line-height: 1.7;
    opacity: 0.9;
    max-width: 300px;
    margin: 0 auto var(--spacing-6);
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.1em;
    border-bottom: 1px solid currentColor;
    padding-bottom: var(--spacing-1);
    transition: all var(--transition-base);
}

.cta-arrow {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.cta-card:hover .cta-arrow {
    transform: translateX(4px);
}

/* ========================
   Footer
   ======================== */
.footer {
    background: var(--color-gray-900);
    color: var(--color-gray-300);
    padding: var(--spacing-16) 0 var(--spacing-8);
}

.footer-content {
    display: grid;
    gap: var(--spacing-10);
    margin-bottom: var(--spacing-12);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Footer Company */
.footer-logo {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--spacing-4);
}

.footer-address {
    font-size: var(--text-sm);
    line-height: 2;
}

.footer-address a {
    color: var(--color-gray-300);
}

.footer-address a:hover {
    color: var(--color-white);
}

/* Footer Navigation */
.footer-nav-title,
.footer-social-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--spacing-4);
}

.footer-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.footer-nav-list a {
    font-size: var(--text-sm);
    color: var(--color-gray-400);
    transition: color var(--transition-fast);
}

.footer-nav-list a:hover {
    color: var(--color-white);
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--spacing-3);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-gray-800);
    color: var(--color-gray-400);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
    padding-top: var(--spacing-8);
    border-top: 1px solid var(--color-gray-800);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.copyright {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.footer-legal {
    display: flex;
    gap: var(--spacing-6);
}

.footer-legal a {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
}

.footer-legal a:hover {
    color: var(--color-white);
}

/* ========================
   Back to Top Button
   ======================== */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-6);
    right: var(--spacing-6);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: var(--z-sticky);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ========================
   Scroll Animations
   ======================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================
   Loading State
   ======================== */
.loading {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ========================
   Print Styles
   ======================== */
@media print {

    .header,
    .back-to-top,
    .lang-switcher {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .hero {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-background {
        display: none;
    }

    .hero-content {
        color: var(--color-gray-900);
        text-shadow: none;
    }
}

/* ========================
   Footer Visitor Stats Widget
   ======================== */
.footer-stats {
    margin-top: var(--spacing-4);
}

.footer-stats-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--spacing-3);
    opacity: 0.9;
}

.visitor-stats-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-3);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.visitor-stats-widget .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-1) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.visitor-stats-widget .stat-row:last-child {
    border-bottom: none;
}

.visitor-stats-widget .stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.85);
}

.visitor-stats-widget .stat-value {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-white);
    min-width: 50px;
    text-align: right;
}

/* Responsive: Display stats widget in footer grid */
@media (min-width: 768px) {
    .footer-content {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: var(--spacing-8);
    }

    .footer-stats {
        margin-top: 0;
    }
}

/* ========================
   Product Lightbox Popup
   ======================== */
.product-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.product-lightbox.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    background: var(--color-white);
    border-radius: 16px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: scaleIn 0.3s ease;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--color-primary);
    transform: rotate(90deg);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    color: white;
}

.lightbox-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    padding: 2rem;
    min-height: 300px;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-info {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, var(--color-gray-50), var(--color-white));
}

.lightbox-category {
    display: inline-block;
    font-size: var(--text-sm);
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 26, 26, 0.1);
    border-radius: 20px;
}

.lightbox-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.lightbox-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 26, 26, 0.3);
}

.lightbox-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 26, 26, 0.4);
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
}

.lightbox-btn svg {
    width: 20px;
    height: 20px;
}

/* Lightbox Responsive */
@media (min-width: 768px) {
    .lightbox-content {
        max-width: 700px;
    }

    .lightbox-image-container {
        padding: 3rem;
    }

    .lightbox-image-container img {
        max-height: 50vh;
    }

    .lightbox-title {
        font-size: var(--text-2xl);
    }
}

@media (min-width: 1024px) {
    .lightbox-content {
        max-width: 800px;
    }
}