:root {
    /* Color Palette */
    --bg-color: #F9F9F7;
    /* Off-white / Washi-paper */
    --text-color: #333333;
    /* Dark Charcoal */
    --accent-color: #D4AF37;
    /* Rice Husk Gold */
    --secondary-accent: #2c4f3e;
    /* Deep Moss Green */

    /* Typography */
    --font-mincho: "Shippori Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
    --font-sans: "Noto Sans JP", "YuGothic", "Hiragino Kaku Gothic ProN", sans-serif;

    /* Spacing */
    --section-padding: 120px 20px;
    --max-width: 1200px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 2.0;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.05em;
}

html {
    scroll-behavior: smooth;
}

/* Fade In Animation */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-mincho);
    font-weight: 500;
    margin: 0;
}

/* Hero Logo Styles */
/* Hero Logo Styles */
.hero-logo-img {
    max-height: 70vh;
    /* Reduced from 60vh for better fit */
    width: auto;
    /* mix-blend-mode removed */
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.6));
    pointer-events: none;
    /* Allows clicks to pass through if needed */
}

/* Main Title specific font override (Deprecated but kept for reference) */
h1.text-vertical {
    font-family: "Ma Shan Zheng", "Shippori Mincho", serif !important;
    font-weight: 400 !important;
    /* Ma Shan Zheng is bold by nature */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.text-vertical {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.2em;
}

.text-gold {
    color: var(--accent-color);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 1px;
    background: var(--text-color);
    margin: 20px auto 0;
}

/* Hero Slideshow Styles (Fade) */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    animation: slideShow 24s infinite;
    /* 4 slides * 6s */
    filter: brightness(0.8);
}

.hero-slide:nth-child(1) {
    background-image: url('slide_4.png');
    /* Landscape */
    animation-delay: 0s;
}

.hero-slide:nth-child(2) {
    background-image: url('cube_rice_final.png');
    /* Cube Rice */
    animation-delay: 6s;
}

.hero-slide:nth-child(3) {
    background-image: url('slide_2.png');
    /* Cooked Rice */
    animation-delay: 12s;
}

.hero-slide:nth-child(4) {
    background-image: url('natural_rice_ears.png');
    /* Rice Ear */
    animation-delay: 18s;
}

@keyframes slideShow {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }

    4% {
        opacity: 1;
        transform: scale(1.05);
    }

    25% {
        opacity: 1;
        transform: scale(1);
    }

    29% {
        opacity: 0;
        transform: scale(1.05);
    }

    100% {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* Hero Content Wrapper (Desktop Base) */
.hero-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Ensure it sits above background */
}

/* Hero Badge (Desktop Base) */
.hero-badge {
    position: absolute;
    bottom: 40px;
    left: 40px;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
}

/* Button UI */
.cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    min-width: 200px;
    line-height: 1.4;
    text-decoration: none;
}

.btn span {
    display: block;
    margin-top: 4px;
    font-size: 0.7em;
    opacity: 0.8;
}

.btn-dark {
    background: #333;
    color: #fff;
    border: 1px solid #333;
}

.btn-dark:hover {
    background: #555;
    border-color: #555;
    opacity: 1;
}

.btn-gold {
    background: var(--accent-color);
    color: #fff;
    border: 1px solid var(--accent-color);
    font-weight: 500;
}

.btn-gold:hover {
    background: #c5a028;
    border-color: #c5a028;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Header Button */
.header-btn {
    font-size: 11px;
    letter-spacing: 0.1em;
    border: 1px solid #fff;
    padding: 8px 16px;
    color: #fff;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: #fff;
    color: #000;
    opacity: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    /* Hide Header on Mobile */
    header {
        display: none !important;
    }

    :root {
        --section-padding: 60px 20px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Hero */
    .hero-content-wrapper {
        flex-direction: row-reverse;
        align-items: flex-start;
        /* Align tops of title/subtitle */
        justify-content: center;
        /* Center horizontally */
        height: auto;
        /* Allow parent to center it vertically */
        gap: 20px;
        width: 100%;
        padding-bottom: 100px;
        /* Space for the badge */
    }

    .text-vertical {
        writing-mode: vertical-rl;
        text-orientation: upright;
        border-right: 1px solid rgba(255, 255, 255, 0.5);
        border-bottom: none;
        padding-right: 20px;
        padding-bottom: 0;
        text-align: left;
        width: auto;
        height: auto;
    }

    h1.text-vertical {
        font-size: 2.4rem !important;
        /* Adjusted for balance */
        border-right: none;
        padding-right: 0;
        line-height: 1.2;
        margin-left: 0;
    }

    /* Subtitle on mobile */
    .hero-content-wrapper>div.text-vertical {
        font-size: 0.85rem !important;
        line-height: 1.8 !important;
        text-orientation: mixed;
        /* Rotate English text 90deg for better flow */
        opacity: 0.9;
        border-right: 1px solid rgba(255, 255, 255, 0.5);
    }

    /* Floating Badge */
    .hero-badge {
        position: absolute;
        bottom: 30px;
        /* Pin to bottom */
        left: 50%;
        transform: translateX(-50%);
        /* Center horizontally */
        right: auto;
        margin-top: 0;
        width: 90%;
        /* Fit screen width */
        max-width: 340px;
        padding: 20px;
    }

    /* Evidence Grid: Force stacked layout on mobile */
    #evidence>div>div {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    /* Evidence Typography Fixes for Mobile */
    #evidence h3 {
        font-size: 1.3rem;
    }

    /* Target the big numbers and labels specifically */
    #evidence .text-center>div:first-child {
        /* The "322" */
        font-size: 3rem !important;
    }

    #evidence .text-center>div:nth-child(3) {
        /* The "NOT DETECTED" box */
        font-size: 1.2rem !important;
        padding: 10px 20px !important;
        white-space: nowrap;
        /* Prevent breaking */
    }

    /* Fix Cart Icon Centering if needed via CSS too, though inline handles most */
    #cart-floating-btn>div {
        width: 100%;
        height: 100%;
    }

    /* Business Flex */
    #business>div>div {
        flex-direction: column-reverse !important;
    }

    #business img {
        height: 250px !important;
        width: 100% !important;
    }

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

    .cta-buttons .btn {
        width: 100%;
        padding: 15px;
    }
}

/* -----------------------------------------------------------------
   Product Section Styles
----------------------------------------------------------------- */
#products {
    background-color: var(--bg-color);
    /* Maintain off-white flow */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    margin-bottom: 80px;
}

/* Card Design */
.product-card {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
}

.product-image-wrapper {
    width: 100%;
    height: 220px;
    margin-bottom: 25px;
    background: #F9F9F7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    mix-blend-mode: multiply;
    /* Helps blend white bgs if any */
}

.product-name {
    font-family: var(--font-mincho);
    font-size: 1.25rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.product-price {
    font-size: 1.5rem;
    font-family: var(--font-sans);
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.product-desc {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    /* Pushes content but doesn't force button to uniform bottom if heights differ */
}

/* Ensure button sticks to bottom and aligns across cards */
.product-card .btn {
    width: 100%;
    min-width: 0;
    margin-top: auto;
}

/* Certificate Link */
.certificate-link {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #fff;
    background-color: var(--secondary-accent);
    text-decoration: none;
    padding: 12px 24px;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    border-radius: 2px;
}

.certificate-link:hover {
    background-color: var(--accent-color);
    color: #fff;
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.order-form-container {
    max-width: 680px;
    margin: 0 auto;
    background: #ffffff;
    padding: 60px 40px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
}

.order-form-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 1px solid #ccc;
    background: #fcfcfc;
    border-radius: 0;
    /* Premium sharp edges */
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    background: #fff;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.radio-item:hover {
    background: #fafafa;
}

.radio-item input[type="radio"] {
    accent-color: var(--accent-color);
}

/* Responsive Taste & Safety Header */
.taste-header,
.safety-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.taste-header h3,
.safety-header h3 {
    font-size: 1.5rem;
}

.rank-badge {
    font-weight: bold;
    color: var(--accent-color);
    font-family: var(--font-mincho);
    font-size: 1.2rem;
}

/* Mobile Product Grid override to be appended to media query */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .order-form-container {
        padding: 40px 20px;
        width: 100%;
        box-sizing: border-box;
        /* Prevent overflow */
        border-left: none;
        border-right: none;
    }

    .hero-logo-img {
        max-height: 55vh;
        max-width: 80vw;
    }

    /* Responsive Taste & Safety Header Mobile */
    .taste-header,
    .safety-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .taste-header h3 span,
    .safety-header h3 span {
        display: block !important;
        margin-top: 5px;
        font-size: 0.9rem !important;
    }

    .rank-badge {
        font-size: 1.4rem;
        /* Slightly larger for emphasis on mobile since it's stacked */
        margin-top: 5px;
    }
}