/* =========================================
   TOKYO CONVENIENCE - STYLE.CSS (FINAL VER.)
   ========================================= */

/* RESET & VARIABLES */
:root {
    --bg-color: #F4F4F4;
    --text-color: #111111;
    --accent-color: #0044FF;
    --border-color: #CCCCCC;
    --font-base: 'Inter', 'Noto Sans JP', sans-serif;
    --header-height: 60px;
    --spacing: 20px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-base);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* HEADER */
.site-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: var(--header-height);
    background: var(--bg-color);
    border-bottom: 1px solid var(--text-color);
    z-index: 1000; /* メニューより上に */
    display: flex;
    align-items: center;
    padding: 0 var(--spacing);
}

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

.brand-logo {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 1001; /* ハンバーガーより上に */
    position: relative;
}

.blink { animation: blinker 1s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* デスクトップ用ナビゲーション */
.site-nav a {
    margin-left: var(--spacing);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}
.site-nav a:hover { color: #888; }

/* =========================================
   HAMBURGER MENU STYLES (スマホ用)
   ========================================= */

/* ハンバーガーボタン（最初は隠しておく） */
.hamburger-btn {
    display: none; /* PCでは非表示 */
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    z-index: 1001; /* メニューより手前に */
    background: none;
    border: none;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.hamburger-btn span:nth-child(1) { top: 8px; }
.hamburger-btn span:nth-child(2) { top: 14px; }
.hamburger-btn span:nth-child(3) { top: 20px; }

/* 開いた時のバツ印アニメーション */
.hamburger-btn.active span:nth-child(1) {
    top: 14px;
    transform: rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    top: 14px;
    transform: rotate(-45deg);
}

/* モバイルメニュー本体（全画面オーバーレイ） */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none; /* 閉じてる時はクリックさせない */
    transition: opacity 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-nav a {
    font-size: 24px; /* 押しやすいデカ文字 */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =========================================
   MAIN LAYOUT & GRID
   ========================================= */
.main-container {
    padding-top: var(--header-height);
    min-height: 100vh;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    max-width: 1600px;
    margin: 0 auto;
    background: #fff;
}

.hero-section {
    padding: 60px var(--spacing);
    border-bottom: 1px solid var(--text-color);
}
.hero-section h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.hero-section p { font-family: monospace; color: #666; }

/* GRID SYSTEM */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px; 
    background-color: var(--text-color);
    border-bottom: 1px solid var(--text-color);
}

.product-card {
    background-color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.2s;
}
.product-card:hover { background-color: #f9f9f9; }
.product-card:hover .product-title { color: #666; }

.card-link::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-bottom: 1px solid var(--border-color);
    background: #eee;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.product-image img {
    width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}

/* SOLD OUT */
.sold-out-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px; letter-spacing: 0.1em;
    z-index: 2; pointer-events: none;
}

.dummy-img { color: #ccc; font-family: monospace; font-size: 24px; }

.product-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }

.product-title {
    font-size: 14px; font-weight: 600; margin-bottom: 10px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.8em;
}

.product-meta {
    display: flex; justify-content: space-between; font-family: monospace; font-size: 11px; color: #666;
}
.price { font-weight: 700; color: var(--text-color); }

/* FOOTER */
.site-footer {
    padding: 40px var(--spacing);
    border-top: 1px solid var(--text-color);
    text-align: center; font-family: monospace; font-size: 11px;
}



























/* PAGINATION */
.pagination-container {
    padding: 40px 0; display: flex; justify-content: center; gap: 10px; font-family: monospace;
}
.page-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--text-color);
    color: var(--text-color); font-size: 14px; font-weight: 600; transition: all 0.2s;
}
.page-btn:hover { background: #333; border-color: #333; color: #fff; }
.page-btn.active { background: var(--text-color); color: #fff; pointer-events: none; }
.page-btn.nav-btn { width: auto; padding: 0 15px; }
.page-btn.disabled { opacity: 0.3; pointer-events: none; border-color: #ccc; color: #ccc; }











/* DETAIL PAGE STYLES */
.breadcrumb {
    padding: 20px var(--spacing); font-size: 12px; font-family: monospace; border-bottom: 1px solid var(--border-color);
}
.breadcrumb a:hover { color: #888; }

.detail-wrapper {
    display: grid; grid-template-columns: 6fr 4fr;
    border-bottom: 1px solid var(--text-color); min-height: 80vh;
}
.detail-visual {
    border-right: 1px solid var(--text-color); padding: 0; background-color: #eee;
    display: flex; align-items: center; justify-content: center;
}
.detail-image-frame {
    width: 100%; display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 40px;
}
.detail-image-frame img {
    width: 100%; height: auto; max-height: 600px; object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.detail-info {
    padding: 40px; background: #fff; display: flex; flex-direction: column; gap: 30px;
}
.detail-title { font-size: 24px; line-height: 1.2; font-weight: 700; margin-top: 0; }
.detail-price {
    font-size: 32px; font-weight: 700; font-family: monospace;
    display: flex; align-items: baseline; gap: 10px;
}
.tax { font-size: 12px; font-weight: 400; color: #666; }

.spec-table {
    border-top: 1px solid var(--border-color); font-family: monospace; font-size: 13px; margin: 0;
}
.spec-row {
    display: flex; border-bottom: 1px solid var(--border-color); padding: 10px 0;
}
.spec-row dt { width: 100px; color: #666; font-weight: 600; }
.spec-row dd { flex-grow: 1; color: var(--text-color); margin-left: 0; }

.detail-description {
    line-height: 1.8; color: #333; font-size: 14px;
    max-height: 200px; overflow-y: auto;
    background-color: #f9f9f9; padding: 15px; border: 1px solid #ddd; border-radius: 4px;
}
.detail-description::-webkit-scrollbar { width: 8px; }
.detail-description::-webkit-scrollbar-track { background: #f1f1f1; }
.detail-description::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.shopify-embed-area {
    margin-top: auto; 
    padding-top: 20px; 
    border-top: 2px solid var(--text-color);
    
    /* ▼ここから追加：中身を強制的に中央揃えにする最強の呪文 */
    display: flex;
    flex-direction: column; /* 縦並び（ボタンと文字） */
    align-items: center;    /* 左右中央揃え */
    justify-content: center;
    width: 100%;            /* 横幅いっぱい使う */
}

.dummy-buy-btn {
    width: 100%; padding: 15px; background: var(--accent-color); color: #fff;
    border: none; font-weight: 700; font-size: 16px; cursor: pointer; text-transform: uppercase;
}
.dummy-buy-btn:hover { opacity: 0.9; }
.secure-text { text-align: center; font-size: 11px; color: #999; margin-top: 10px; font-family: monospace; }
















/* =========================================
   MOBILE RESPONSIVE (スマホ対応)
   ========================================= */
@media (max-width: 800px) {
    /* デスクトップメニューを隠す */
    .site-nav { display: none; }

    /* ハンバーガーボタンを表示 */
    .hamburger-btn { display: block; }

    /* グリッドを2列に */
    .product-grid { grid-template-columns: repeat(2, 1fr); }

    /* 詳細ページのレイアウト */
    .detail-wrapper { grid-template-columns: 1fr; }
    .detail-visual {
        border-right: none; border-bottom: 1px solid var(--text-color);
        padding: 20px; min-height: 300px;
    }
    .detail-info { padding: 20px; }
    .detail-title { font-size: 20px; }
    .detail-price { font-size: 24px; }
}













/* =========================================
   FAVORITE (HEART) SYSTEM
   ========================================= */

/* ハートボタンの基本 */
.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc; /* 通常はグレー */
    font-size: 24px;
    transition: transform 0.2s, color 0.2s;
    line-height: 1;
    padding: 0;
}

/* 押した時のアニメーション */
.fav-btn:active { transform: scale(1.3); }

/* お気に入り登録済み（赤くなる） */
.fav-btn.active { color: #FF0044; }

/* カード上の配置（右上に浮く） */
.card-fav-pos {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* 詳細ページでの配置 */
.detail-fav-area {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 12px;
    color: #666;
}
.detail-fav-area .fav-btn { font-size: 32px; }