/* JanSport COD — Two-Column Product Layout */
:root {
    --bg: #fff;
    --text: #222;
    --text-light: #666;
    --text-lighter: #999;
    --border: #e8e8e8;
    --accent: #e74c3c;
    --star: #f5a623;
    --green: #2e7d32;
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: "Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic",Meiryo,sans-serif;
    background: #f5f5f5;
    color: var(--text);
    line-height: 1.7;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header {
    background: #1a1a2e;
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0; z-index: 100;
}
.header .container { display: flex; align-items: center; gap: 8px; }
.header-brand { color: #fff; text-decoration: none; font-size: 18px; font-weight: 800; letter-spacing: 2px; }
.header-divider { color: #555; }
.header-sub { font-size: 12px; color: #aaa; }

/* ===== TWO-COLUMN PRODUCT LAYOUT ===== */
.product-main { background: #fff; padding: 0 0 40px; }
.product-layout {
    display: flex;
    gap: 40px;
    padding-top: 20px;
}

/* LEFT COLUMN */
.product-gallery { flex: 0 0 520px; max-width: 520px; }

.main-image-wrap {
    background: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}
.main-image {
    width: 100%;
    max-width: 800px;
    display: block;
    object-fit: contain;
    aspect-ratio: 1/1;
}

/* Color thumbnails below main image */
.color-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.color-thumb-item {
    width: 72px;
    height: 72px;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
    background: #f8f8f8;
}
.color-thumb-item:hover { border-color: #bbb; }
.color-thumb-item.active { border-color: #1a1a2e; }
.color-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* RIGHT COLUMN */
.product-info {
    flex: 1;
    min-width: 300px;
    padding-top: 10px;
}
.product-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #1a1a2e;
}
.product-subtitle {
    font-size: 12px;
    color: #999;
    margin: 2px 0 10px;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}
.stars { color: var(--star); letter-spacing: 2px; }
.rating-num { font-weight: 700; }
.rating-count { color: #999; font-size: 12px; }

.product-price-block { margin-bottom: 4px; }
.price-current { font-size: 32px; font-weight: 800; color: #1a1a2e; }
.price-tax { font-size: 14px; color: #888; margin-left: 4px; }
.price-points {
    font-size: 11px;
    color: #999;
    background: #fdf2e9;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 2px;
    margin-bottom: 14px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

/* Variants */
.variant-section { margin-bottom: 12px; }
.variant-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #444; }
.variant-list { display: flex; flex-direction: column; gap: 6px; }

.variant-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.15s;
}
.variant-card:hover { border-color: #999; }
.variant-card.active {
    border-color: #1a1a2e;
    background: #f5f6f8;
}
.variant-card .v-name { font-size: 14px; font-weight: 600; }
.variant-card .v-discount {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}
.variant-card .v-price { text-align: right; }
.variant-card .v-total { font-size: 18px; font-weight: 800; }
.variant-card .v-unit { font-size: 11px; color: #999; }

/* Color rows (inside right column, below variants) */
.color-section { margin-top: 12px; }
.color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.color-row-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    width: 40px;
    text-align: right;
}
.color-row-options { display: flex; gap: 6px; flex-wrap: wrap; }
.color-option {
    width: 44px; height: 44px;
    border: 2px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s;
    background: #f0f0f0;
}
.color-option:hover { border-color: #aaa; }
.color-option.selected { border-color: #1a1a2e; }
.color-option .color-thumb {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.color-option .check-mark {
    position: absolute;
    top: 2px; right: 2px;
    width: 14px; height: 14px;
    background: #e74c3c;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}
.color-option.selected .check-mark { display: flex; }
.color-option .check-mark::after {
    content: '✓';
    color: #fff;
    font-size: 9px;
    font-weight: 700;
}

/* Price Summary */
.price-summary {
    margin: 14px 0;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #eee;
}
.ps-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
    color: #666;
}
.ps-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
    border-top: 1px solid #ddd;
    padding-top: 8px;
    margin-top: 4px;
}
.ps-note {
    font-size: 11px;
    color: #2e7d32;
    text-align: right;
    margin-top: 4px;
}

/* Stock */
.product-stock {
    font-size: 13px;
    color: var(--green);
    font-weight: 600;
    margin-bottom: 12px;
}
.stock-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 4px;
}

/* Buy Button */
.btn-buy {
    display: block;
    width: 100%;
    padding: 16px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    transition: background 0.2s;
}
.btn-buy:hover:not(:disabled) { background: #c0392b; }
.btn-buy:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #888;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.trust-badge {
    font-size: 11px;
    color: #666;
    background: #f8f8f8;
    border: 1px solid #eee;
    padding: 4px 10px;
    border-radius: 2px;
}

/* ===== SECTIONS ===== */
.section { padding: 48px 0; background: #fff; }
.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #1a1a2e;
}

/* Product Desc */
.desc-section { background: #fafafa; }
.desc-body { max-width: 720px; margin: 0 auto; }
.desc-body p {
    font-size: 14px;
    color: #444;
    line-height: 2.1;
    margin-bottom: 14px;
}

/* Gallery */
.detail-gallery { background: #fff; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.gallery-item {
    border-radius: 4px;
    overflow: hidden;
    background: #eee;
    position: relative;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    padding: 5px 8px;
    text-align: center;
}

/* Specs */
.spec-section { background: #fafafa; }
.spec-table {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-collapse: collapse;
}
.spec-table th, .spec-table td {
    border-bottom: 1px solid #eee;
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
}
.spec-table th {
    width: 30%;
    background: #fff;
    font-weight: 600;
    color: #666;
}

/* Reviews */
.reviews { background: #fff; }
.review-cards { display: flex; flex-direction: column; gap: 10px; max-width: 720px; margin: 0 auto; }
.review-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 16px 18px;
}
.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.reviewer-icon { font-size: 24px; }
.reviewer-name { font-size: 13px; font-weight: 600; }
.review-date { font-size: 10px; color: #bbb; }
.review-stars { color: var(--star); font-size: 12px; margin-left: auto; }
.review-text { font-size: 13.5px; color: #444; line-height: 1.7; }

/* FAQ */
.faq-section { background: #fafafa; }
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.faq-item { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
.faq-q { padding: 12px 14px; font-size: 13px; font-weight: 700; }
.faq-a { padding: 0 14px 12px; font-size: 12.5px; color: #555; line-height: 1.7; }

/* Form */
.form-section { background: #fff; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.form-group label .required { color: #e74c3c; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #1a1a2e;
}
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }
.form-group textarea { resize: vertical; min-height: 70px; }
.form-footer-note { text-align:center; font-size:11px; color:#bbb; margin-top:10px; }
.form-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    padding: 10px;
    border-radius: 4px;
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 14px;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.btn-submit:hover { background: #c0392b; }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }

.cod-badge {
    display: inline-block;
    background: #fffdf5;
    border: 1px solid #f5e6b8;
    color: #7d6608;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

/* Success */
.success-page { text-align:center; padding:60px 16px; }
.success-icon {
    width:64px; height:64px;
    background: #27ae60;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:32px;
    color:#fff;
    margin-bottom:14px;
}
.success-page h2 { font-size:20px; margin-bottom:6px; }
.success-page .order-no {
    font-size:17px; color:#e74c3c; font-weight:700;
    background:#fff5f5;
    display:inline-block;
    padding:4px 14px;
    border-radius:4px;
    margin:6px 0;
}
.success-page p { color:#666; font-size:13px; }
.after-submit-notes {
    margin-top:16px;
    background:#f8f8f8;
    border:1px solid #eee;
    border-radius:6px;
    padding:12px 14px;
    display:inline-block;
    text-align:left;
}
.after-submit-notes p { font-size:13px; margin:4px 0; }

/* Footer */
.footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 36px 20px 24px;
    font-size: 11px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}
.footer-col p { line-height: 1.8; color: #aaa; font-size: 11px; }
.footer-bottom { text-align: center; }
.footer-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.footer .legal-link {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}
.footer .legal-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}
.footer-copy { color: #666; font-size: 10px; }

/* Legal */
.legal-page { max-width: 800px; margin: 0 auto; padding: 40px 16px; }
.legal-page h1 { font-size: 20px; text-align: center; margin-bottom: 8px; }
.legal-intro {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 28px;
    line-height: 1.8;
}
.legal-table { width: 100%; border-collapse: collapse; }
.legal-table th, .legal-table td {
    border: 1px solid #ddd;
    padding: 12px 14px;
    font-size: 13px;
    text-align: left;
    vertical-align: top;
    line-height: 1.9;
}
.legal-table th { background:#f5f5f5; width:24%; font-weight:600; color:#555; white-space: nowrap; }
.legal-table td strong { color: #1a1a2e; }
.legal-notice {
    margin-top: 24px;
    padding: 14px 16px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}
.legal-notice p { font-size: 12px; color: #888; line-height: 1.8; margin-bottom: 4px; }
.legal-back { text-align: center; margin-top: 30px; }
.legal-back a { color: #e74c3c; font-weight: 600; font-size: 14px; }

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #27ae60;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    font-size: 13px;
}
.toast.show { opacity: 1; }
.toast.error { background: #e74c3c; }

/* Social Proof Popup */
.social-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 9990;
    font-size: 12px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 340px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}
.social-popup.show {
    opacity: 1;
    transform: translateY(0);
}
.social-popup-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.social-popup-text {
    line-height: 1.5;
}
@media (max-width: 480px) {
    .social-popup { left: 8px; right: 8px; max-width: none; bottom: 12px; }
}

/* Modal */
.img-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.85);
    text-align: center;
}
.img-modal-close {
    position: absolute;
    top: 16px; right: 24px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
}
.img-modal-content {
    max-width: 90vw;
    max-height: 85vh;
    margin-top: 4vh;
    border-radius: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .product-layout {
        flex-direction: column;
        gap: 20px;
    }
    .product-gallery { flex: none; max-width: 100%; }
    .main-image { max-width: 100%; }
    .color-thumb-item { width: 56px; height: 56px; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .product-title { font-size: 20px; }
    .price-current { font-size: 26px; }
    .color-thumb-item { width: 48px; height: 48px; }
    .form-row { flex-direction: column; gap: 0; }
}
