/* --- Base Settings --- */
:root {
    --bg-color: #ffffff;
    --text-main: #222222;
    --accent-color: #000000;
    --border-color: #eeeeee;
    --gray-bg: #f9f9f9;
    --font-main: 'Montserrat', 'Noto Sans JP', sans-serif;
    --section-padding: 120px 0; /* Wider spacing for luxury feel */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1400px; /* Wider container for premium feel */
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: var(--section-padding);
}

.section__title {
    font-size: 1.5rem; /* Minimalist title size */
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.4rem;
    margin-bottom: 80px;
    text-transform: uppercase;
}

/* --- Header --- */
.header {
    height: 70px; /* Compact */
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
}

.header__inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.3rem;
}

.nav__list {
    display: flex;
    gap: 50px;
}

.nav__list a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15rem;
}

.nav__list a:hover,
.nav__list a.active {
    color: #888;
    position: relative;
}

.nav__list a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #888;
}

.header__icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header__icons .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    width: 40px;
    height: 40px;
}

.header__icons .icon-btn i {
    width: 20px;
    height: 20px;
}

.header__icons .icon-btn:hover {
    opacity: 0.6;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: none; /* Controlled by media query */
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: 0.3s;
}

.mobile-toggle:hover {
    opacity: 0.6;
}

.mobile-toggle i {
    width: 24px;
    height: 24px;
}

/* --- Mobile Nav Overlay --- */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-nav.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav__list {
    text-align: center;
}

.mobile-nav__list li {
    margin-bottom: 30px;
}

.mobile-nav__list a {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    color: var(--text-main);
    transition: 0.3s;
}

.mobile-nav__list a:hover {
    color: #888;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 90vh;
    width: 100%;
    overflow: hidden;
}

.hero__image {
    width: 100%;
    height: 100%;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    width: 100%;
    z-index: 2;
}

.hero__subtitle {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.6rem;
    margin-bottom: 24px;
    animation: fadeInUp 1.2s ease forwards;
}

.hero__title {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 48px;
    letter-spacing: 0.2rem;
    animation: fadeInUp 1.2s ease 0.3s forwards;
    opacity: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15); /* Subtler overlay */
    z-index: 1;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 18px 56px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2rem;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn--primary {
    background-color: #ffffff;
    color: #000000;
    animation: fadeInUp 1.2s ease 0.6s forwards;
    opacity: 0;
}

.btn--primary:hover {
    background-color: #000000;
    color: #ffffff;
}

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

/* --- Product Cards --- */
.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product {
    border: 1px solid #eeeeee;
    padding: 16px;
    transition: 0.3s;
    background: #ffffff;
}

.product:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.product__image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    margin-bottom: 20px;
}

.product__image img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transition: 0.6s;
}

.product__info {
    text-align: left;
}

.product__name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.05rem;
}

.product__price {
    font-size: 0.85rem;
    color: #222;
    font-weight: 400;
}

/* --- Category --- */
.category__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.category__item {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
}

.category__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category__item:hover img {
    transform: scale(1.08);
}

.category__label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0.6rem;
    z-index: 2;
    text-transform: uppercase;
}

.category__item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    transition: 0.5s;
}

.category__item:hover::after {
    background: rgba(0, 0, 0, 0.3);
}

/* --- About Brand --- */
.about {
    background-color: var(--gray-bg);
}

.about__inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about__text {
    font-size: 1rem;
    line-height: 2.2;
    color: #333;
    font-weight: 400;
}

/* --- Footer --- */
.footer {
    padding: 100px 0 60px;
    border-top: 1px solid var(--border-color);
}

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

.footer__logo {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3rem;
    margin-bottom: 12px;
}

.footer__copy {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.05rem;
}

.footer__links ul {
    display: flex;
    gap: 40px;
}

.footer__links a {
    font-size: 0.8rem;
    font-weight: 500;
    color: #222;
    letter-spacing: 0.1rem;
}

.footer__links a:hover {
    color: #888;
}

/* --- Filter Buttons --- */
.filter-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.15rem;
    cursor: pointer;
    padding: 5px 0;
    transition: 0.3s;
    color: #999;
}

.filter-btn:hover {
    color: #222;
}

.filter-btn.active {
    color: #222;
    border-bottom: 1px solid #222;
}

/* --- Filter Buttons --- */
.filter-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    letter-spacing: 0.15rem;
    cursor: pointer;
    padding: 5px 0;
    transition: 0.3s;
    color: #999;
}

.filter-btn:hover {
    color: #222;
}

.filter-btn.active {
    color: #222;
    border-bottom: 1px solid #222;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    .hero__title {
        font-size: 3rem;
    }
}

/* --- View Switcher --- */
.section__header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 80px;
}

.section__header .section__title {
    margin-bottom: 0;
}

.view-switcher {
    position: absolute;
    right: 0;
    display: flex;
    gap: 15px;
}

.view-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #ccc;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn i {
    width: 20px;
    height: 20px;
    stroke-width: 1.2px; /* Ultra-thin lines */
}

.view-btn.active {
    color: var(--text-main);
    background-color: var(--gray-bg);
}

.view-btn:hover {
    color: var(--text-main);
}

/* --- Hybrid Grid / View Switcher Logic --- */
.products {
    transition: opacity 0.3s ease;
}

.products.switching {
    opacity: 0;
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .header {
        height: 60px;
    }

    .nav__list {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .hero__subtitle {
        letter-spacing: 0.4rem;
    }

    /* Grid Mode (Default - All 2 columns) */
    .products--grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px; /* Aesthetic gutter for luxury feel */
    }

    /* List Mode (1 Column) */
    .products--list {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    /* Product Name Truncation for 2-column */
    .products--grid .product__name {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2; /* Added for standard compatibility */
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 2.8em; /* Force consistent height */
    }

    .category__grid {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 60px;
    }

    .footer__links ul {
        flex-direction: column;
        gap: 20px;
    }
}
