/*
Theme Name: OTONA INDEX
Theme URI: https://otonaindex.jp
Author: OTONA INDEX
Description: OTONA INDEX専用の軽量データベース型WordPressテーマ。
Version: 0.1.0
Text Domain: otona-index
*/

:root {
    --oi-bg: #f6f6f4;
    --oi-surface: #ffffff;
    --oi-surface-soft: #efefec;
    --oi-text: #202124;
    --oi-text-sub: #66686d;
    --oi-border: #deded9;
    --oi-accent: #765d63;
    --oi-accent-dark: #59454a;
    --oi-radius: 14px;
    --oi-shadow: 0 8px 24px rgba(20, 20, 20, 0.05);
    --oi-max-width: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--oi-bg);
    color: var(--oi-text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans JP",
        "Hiragino Kaku Gothic ProN",
        "Yu Gothic",
        sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--oi-accent-dark);
}

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

.oi-container {
    width: min(calc(100% - 32px), var(--oi-max-width));
    margin-inline: auto;
}

/* Header */

.oi-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--oi-border);
    backdrop-filter: blur(12px);
}

.oi-header__inner {
    padding: 14px 0 10px;
}

.oi-brand {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
}

.oi-brand__name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.oi-brand__tagline {
    color: var(--oi-text-sub);
    font-size: 11px;
}

.oi-nav {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.oi-nav::-webkit-scrollbar {
    display: none;
}

.oi-nav a {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid var(--oi-border);
    border-radius: 999px;
    background: var(--oi-surface);
    color: #44464a;
    font-size: 13px;
    font-weight: 600;
}

/* Main */

.oi-main {
    min-height: 60vh;
}

.oi-hero {
    padding: 52px 0 44px;
    background:
        linear-gradient(
            180deg,
            var(--oi-surface) 0%,
            var(--oi-bg) 100%
        );
}

.oi-eyebrow {
    margin: 0 0 10px;
    color: var(--oi-accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.oi-hero h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(32px, 8vw, 58px);
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.oi-hero__lead {
    max-width: 650px;
    margin: 20px 0 0;
    color: var(--oi-text-sub);
    font-size: 15px;
}

.oi-section {
    padding: 24px 0;
}

.oi-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.oi-section__heading h2,
.oi-about-data h2 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -0.02em;
}

.oi-section__heading > a {
    color: var(--oi-accent);
    font-size: 13px;
    font-weight: 700;
}

/* Quick links */

.oi-quick-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.oi-quick-links > a {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 100px;
    padding: 18px;
    background: var(--oi-surface);
    border: 1px solid var(--oi-border);
    border-radius: var(--oi-radius);
    box-shadow: var(--oi-shadow);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}

.oi-quick-links > a:hover {
    transform: translateY(-2px);
    border-color: #c5b7ba;
}

.oi-quick-links strong {
    font-size: 17px;
}

.oi-quick-links span {
    color: var(--oi-text-sub);
    font-size: 13px;
}

/* Data placeholders */

.oi-placeholder {
    padding: 28px 20px;
    background: var(--oi-surface);
    border: 1px dashed #c9c9c4;
    border-radius: var(--oi-radius);
    color: var(--oi-text-sub);
    font-size: 14px;
    text-align: center;
}

/* About */

.oi-about-data {
    margin-top: 16px;
    padding: 40px 0 52px;
    background: var(--oi-surface-soft);
    border-top: 1px solid var(--oi-border);
}

.oi-about-data p {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--oi-text-sub);
    font-size: 14px;
}

/* Footer */

.oi-footer {
    padding: 36px 0;
    background: #252629;
    color: #f5f5f2;
}

.oi-footer__inner {
    display: grid;
    gap: 22px;
}

.oi-footer strong {
    font-size: 17px;
    letter-spacing: 0.05em;
}

.oi-footer p {
    margin: 4px 0 0;
}

.oi-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.oi-footer__nav a {
    color: #e4e4df;
    font-size: 13px;
}

.oi-footer__note {
    max-width: 680px;
    color: #bdbfbe;
    font-size: 12px;
}

.oi-footer__copyright {
    color: #939594;
    font-size: 11px;
}

/* Desktop */

@media (min-width: 760px) {
    .oi-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
        padding: 16px 0;
    }

    .oi-nav {
        margin-top: 0;
        overflow: visible;
    }

    .oi-nav a {
        padding: 6px 9px;
        border: 0;
        background: transparent;
    }

    .oi-hero {
        padding: 78px 0 68px;
    }

    .oi-hero__lead {
        font-size: 17px;
    }

    .oi-section {
        padding: 36px 0;
    }

    .oi-quick-links {
        grid-template-columns: repeat(3, 1fr);
    }

    .oi-quick-links > a {
        min-height: 130px;
        padding: 22px;
    }

    .oi-section__heading h2,
    .oi-about-data h2 {
        font-size: 25px;
    }
}

/* Product cards */

.oi-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.oi-product-card {
    overflow: hidden;
    background: var(--oi-surface);
    border: 1px solid var(--oi-border);
    border-radius: var(--oi-radius);
    box-shadow: var(--oi-shadow);
}

.oi-product-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ececea;
}

.oi-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oi-product-card__image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #a0a19e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.oi-product-card__body {
    padding: 16px;
}

.oi-product-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
    color: var(--oi-text-sub);
    font-size: 11px;
}

.oi-product-card__title {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
}

.oi-product-card__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.oi-product-card__price strong {
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.oi-product-card__old-price {
    color: var(--oi-text-sub);
    font-size: 12px;
    text-decoration: line-through;
}

.oi-product-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 12px;
    color: var(--oi-text-sub);
    font-size: 12px;
}

.oi-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 9px;
    background: var(--oi-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.oi-button:hover {
    background: var(--oi-accent-dark);
    color: #fff;
}

.oi-button--disabled {
    background: #d7d7d3;
    color: #737572;
    cursor: default;
}

@media (min-width: 600px) {
    .oi-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .oi-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Product detail */

.oi-detail {
    max-width: 820px;
}

.oi-detail__title {
    margin: 0;
    font-size: clamp(28px, 7vw, 44px);
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.oi-detail__updated {
    margin-top: 10px;
    color: var(--oi-text-sub);
    font-size: 12px;
}

.oi-detail__content {
    margin-top: 28px;
    padding: 24px;
    background: var(--oi-surface);
    border: 1px solid var(--oi-border);
    border-radius: var(--oi-radius);
    box-shadow: var(--oi-shadow);
}

.oi-detail__content > *:first-child {
    margin-top: 0;
}

.oi-detail__content > *:last-child {
    margin-bottom: 0;
}

.oi-detail__content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.oi-detail__content th,
.oi-detail__content td {
    padding: 12px;
    border-bottom: 1px solid var(--oi-border);
    text-align: left;
    vertical-align: top;
}

.oi-detail__content th {
    width: 32%;
    background: var(--oi-surface-soft);
    font-weight: 700;
}

.oi-detail__notice {
    margin-top: 24px;
    padding: 20px;
    background: var(--oi-surface-soft);
    border: 1px solid var(--oi-border);
    border-radius: var(--oi-radius);
}

.oi-detail__notice strong {
    font-size: 14px;
}

.oi-detail__notice p {
    margin: 8px 0 0;
    color: var(--oi-text-sub);
    font-size: 12px;
}

@media (max-width: 599px) {
    .oi-detail__content {
        padding: 18px;
    }

    .oi-detail__content table,
    .oi-detail__content tbody,
    .oi-detail__content tr,
    .oi-detail__content th,
    .oi-detail__content td {
        display: block;
        width: 100%;
    }

    .oi-detail__content th {
        border-bottom: 0;
        padding-bottom: 6px;
    }

    .oi-detail__content td {
        padding-top: 6px;
    }
}

@media (max-width: 599px) {
    .oi-detail__title {
        font-size: 26px;
        line-height: 1.32;
        letter-spacing: -0.025em;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 599px) {
    .oi-product-card__image {
        aspect-ratio: 4 / 3;
        padding: 16px;
    }

    .oi-product-card__image img {
        object-fit: contain;
    }

    .oi-product-card__image-placeholder {
        margin: -16px;
        width: calc(100% + 32px);
        height: calc(100% + 32px);
    }
}

/* Age gate */

.oi-age-gate[hidden] {
    display: none;
}

.oi-age-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(20, 21, 23, 0.72);
    backdrop-filter: blur(8px);
}

.oi-age-gate__panel {
    width: min(100%, 480px);
    padding: 28px;
    background: var(--oi-surface);
    border: 1px solid var(--oi-border);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.oi-age-gate__panel h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.35;
    letter-spacing: -0.025em;
}

.oi-age-gate__panel > p:not(.oi-eyebrow) {
    margin: 14px 0 0;
    color: var(--oi-text-sub);
    font-size: 14px;
}

.oi-age-gate__actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.oi-age-gate__actions button {
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.oi-age-gate__enter {
    border: 1px solid var(--oi-accent);
    background: var(--oi-accent);
    color: #fff;
}

.oi-age-gate__enter:hover {
    background: var(--oi-accent-dark);
}

.oi-age-gate__exit {
    border: 1px solid var(--oi-border);
    background: var(--oi-surface);
    color: var(--oi-text-sub);
}

body.oi-age-gate-open {
    overflow: hidden;
}

@media (max-width: 599px) {
    .oi-age-gate {
        padding: 16px;
    }

    .oi-age-gate__panel {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .oi-age-gate__panel h2 {
        font-size: 24px;
    }
}
