/* ================================================================
   template-detail.css — テンプレート詳細ページ
   ================================================================ */

/* ── Breadcrumb ─────────────────────────────────────────── */
.td-breadcrumb {
    padding: 20px 0 0;
    font-size: 13px;
    color: var(--color-text-muted);
}
.td-breadcrumb a {
    color: var(--color-main);
}
.td-breadcrumb a:hover { text-decoration: underline; }
.td-breadcrumb span { margin: 0 6px; }

/* ── Hero ───────────────────────────────────────────────── */
.td-hero {
    padding: 40px 0 80px;
    background: var(--color-base);
}

.td-hero-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: start;
}

/* ── Browser Mockup ─────────────────────────────────────── */
.td-mockup {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
}

.td-mockup-bar {
    background: #e8e8e8;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.td-mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.td-mockup-dot:nth-child(1) { background: #ff5f57; }
.td-mockup-dot:nth-child(2) { background: #ffbd2e; }
.td-mockup-dot:nth-child(3) { background: #28c940; }

.td-mockup-url {
    flex: 1;
    background: #fff;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #888;
    text-align: center;
    margin: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-mockup-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
}

/* ── Info Panel ─────────────────────────────────────────── */
.td-info {
    padding-top: 10px;
}

.td-badge {
    display: inline-block;
    background: var(--color-main);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.td-name {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
    color: var(--color-text-main);
}

.td-tagline {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}

.td-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.td-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    border: 1px solid var(--color-main);
    color: var(--color-main);
    background: rgba(50, 155, 167, 0.06);
}

.td-price-block {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    margin-bottom: 24px;
}
.td-price-label {
    font-size: 12px;
    color: var(--color-text-muted);
    display: block;
    margin-bottom: 6px;
}
.td-price {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -.01em;
}
.td-price-unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.td-ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.td-btn-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-main);
    color: #fff;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .04em;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 20px rgba(50, 155, 167, 0.3);
    text-decoration: none;
}
.td-btn-buy:hover {
    background: var(--color-main-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(50, 155, 167, 0.4);
}

.td-btn-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--color-text-main);
    padding: 15px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
    border: 1.5px solid #ddd;
    transition: var(--transition-smooth);
    text-decoration: none;
}
.td-btn-demo:hover {
    border-color: var(--color-main);
    color: var(--color-main);
}
.td-btn-demo svg,
.td-btn-buy svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

/* ── Operation Modes ────────────────────────────────────── */
.td-operation-modes {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.td-modes-lead {
    text-align: center;
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.9;
    max-width: 640px;
    margin: 0 auto 48px;
}
.td-modes-lead strong {
    color: var(--color-text-main);
    font-weight: 700;
}

.td-modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.td-mode-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px;
    border: 1.5px solid #eee;
    transition: var(--transition-smooth);
}
.td-mode-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}
.td-mode-card--accent {
    border-color: var(--color-main);
    background: linear-gradient(160deg, rgba(50,155,167,0.04) 0%, #fff 60%);
}

.td-mode-icon {
    font-size: 40px;
    margin-bottom: 14px;
    display: block;
}

.td-mode-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 12px;
    background: rgba(50, 155, 167, 0.1);
    color: var(--color-main);
}
.td-mode-card:not(.td-mode-card--accent) .td-mode-badge {
    background: #f0f0f0;
    color: var(--color-text-muted);
}

.td-mode-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-main);
}

.td-mode-lead {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-main);
    margin-bottom: 14px;
    line-height: 1.6;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f0f0;
}
.td-mode-card:not(.td-mode-card--accent) .td-mode-lead {
    color: var(--color-text-main);
}

.td-mode-desc {
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.85;
    margin-bottom: 20px;
}
.td-mode-desc code {
    background: #f4f4f4;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    color: #555;
}

.td-mode-suitable {
    list-style: none;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.td-mode-suitable li {
    font-size: 13px;
    color: var(--color-text-muted);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}
.td-mode-suitable li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-main);
    font-weight: 700;
    font-size: 12px;
}

.td-mode-cost {
    background: var(--color-bg-light);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.td-mode-cost-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: .05em;
    white-space: nowrap;
}
.td-mode-cost-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
}

/* モードカード内 価格・カートボタン */
.td-mode-price-block {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}
.td-mode-price {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1;
    margin-bottom: 14px;
}
.td-mode-price-unit {
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 4px;
}

.td-mode-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1.5px solid #ddd;
    color: var(--color-text-main);
    background: transparent;
}
.td-mode-cart-btn:hover {
    border-color: var(--color-text-main);
    background: var(--color-text-main);
    color: #fff;
}
.td-mode-cart-btn--accent {
    background: var(--color-main);
    border-color: var(--color-main);
    color: #fff;
    box-shadow: 0 6px 16px rgba(50, 155, 167, 0.3);
}
.td-mode-cart-btn--accent:hover {
    background: var(--color-main-hover);
    border-color: var(--color-main-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(50, 155, 167, 0.4);
}

@media (max-width: 768px) {
    .td-modes-grid {
        grid-template-columns: 1fr;
    }
    .td-mode-card { padding: 28px 24px; }
}

/* ── Server / Hosting Plans ─────────────────────────────── */
.td-hosting {
    padding: 80px 0;
    background: var(--color-base);
}

.td-hosting-lead {
    text-align: center;
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.9;
    max-width: 620px;
    margin: 0 auto 48px;
}

.td-hosting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    max-width: 860px;
    margin: 0 auto;
    align-items: start;
}

.td-hosting-card {
    border-radius: 20px;
    padding: 36px 32px;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    transition: var(--transition-smooth);
    position: relative;
}
.td-hosting-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}
.td-hosting-card--featured {
    border-color: var(--color-main);
    background: linear-gradient(160deg, rgba(50,155,167,0.05) 0%, #fff 60%);
}

.td-hosting-rec {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-main);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    padding: 4px 16px;
    border-radius: 50px;
    white-space: nowrap;
}

.td-hosting-plan {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--color-main);
    margin-bottom: 10px;
}

.td-hosting-price {
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1;
    margin-bottom: 8px;
}
.td-hosting-price span {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 2px;
}

.td-hosting-subtitle {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.5;
}

.td-hosting-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
}
.td-hosting-features li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: baseline;
}
.td-hosting-feat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: .05em;
    text-transform: uppercase;
}
.td-hosting-feat-val {
    font-size: 13.5px;
    color: var(--color-text-main);
    line-height: 1.5;
}
.td-hosting-feat-val code {
    font-size: 12px;
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--color-main);
}

.td-hosting-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1.5px solid #ddd;
    color: var(--color-text-main);
    text-align: center;
}
.td-hosting-btn:hover {
    border-color: var(--color-text-main);
    background: var(--color-text-main);
    color: #fff;
}
.td-hosting-btn--featured {
    background: var(--color-main);
    border-color: var(--color-main);
    color: #fff;
    box-shadow: 0 6px 16px rgba(50, 155, 167, 0.3);
}
.td-hosting-btn--featured:hover {
    background: var(--color-main-hover);
    border-color: var(--color-main-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(50, 155, 167, 0.4);
}

@media (max-width: 640px) {
    .td-hosting-grid { grid-template-columns: 1fr; }
    .td-hosting-card { padding: 28px 24px; }
    .td-hosting-features li {
        grid-template-columns: 70px 1fr;
    }
}

/* ── Features ───────────────────────────────────────────── */
.td-features {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.td-section-label {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-main);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
    text-align: center;
}
.td-section-title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--color-text-main);
}

.td-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.td-feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}
.td-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.td-feature-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}
.td-feature-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text-main);
}
.td-feature-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* ── Includes ───────────────────────────────────────────── */
.td-includes {
    padding: 80px 0;
    background: var(--color-base);
}

.td-includes-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.td-includes-text h2 {
    font-size: clamp(22px, 3vw, 30px);
    margin-bottom: 16px;
}
.td-includes-text p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
}

.td-includes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.td-includes-list li {
    font-size: 13.5px;
    color: var(--color-text-muted);
    padding: 10px 14px;
    background: var(--color-bg-light);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.td-includes-list li::before {
    content: '✓';
    color: var(--color-main);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Tech Specs ─────────────────────────────────────────── */
.td-specs {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.td-specs-table {
    max-width: 720px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: #fff;
}

.td-specs-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid #f0f0f0;
}
.td-specs-row:last-child { border-bottom: none; }

.td-specs-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
    padding: 16px 24px;
    background: rgba(50, 155, 167, 0.04);
    border-right: 1px solid #f0f0f0;
}
.td-specs-value {
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 16px 24px;
    line-height: 1.6;
}

/* ── Bottom CTA ─────────────────────────────────────────── */
.td-cta-bottom {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a6e78 0%, var(--color-main) 100%);
    text-align: center;
}

.td-cta-bottom .td-cta-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}
.td-cta-bottom p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    margin-bottom: 40px;
    line-height: 1.8;
}

.td-cta-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.td-cta-btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--color-main);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition-smooth);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.td-cta-btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.td-cta-btn-demo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    padding: 15px 32px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: var(--transition-smooth);
    text-decoration: none;
}
.td-cta-btn-demo:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.td-cta-btn-demo svg,
.td-cta-btn-buy svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ── Add-ons / Options ──────────────────────────────────── */
.td-addons {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.td-addons-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
}

.td-addon-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 20px;
    background: #fff;
    border-radius: 14px;
    padding: 22px 28px;
    border: 1.5px solid #eee;
    transition: var(--transition-smooth);
}
.td-addon-card:hover {
    border-color: var(--color-main);
    box-shadow: 0 8px 24px rgba(50, 155, 167, 0.1);
}

.td-addon-icon {
    font-size: 28px;
    text-align: center;
}

.td-addon-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--color-text-main);
}
.td-addon-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.td-addon-price {
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
}
.td-addon-price-label {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    letter-spacing: .05em;
    margin-bottom: 4px;
}
.td-addon-price-val {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-main);
}
.td-addon-price-val span {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .td-addon-card {
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
    }
    .td-addon-price {
        grid-column: 1 / -1;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .td-addon-price-label { margin-bottom: 0; }
}

/* ── Loading / Error ────────────────────────────────────── */
.td-loading,
.td-error {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    color: var(--color-text-muted);
}
.td-loading-dot {
    width: 12px;
    height: 12px;
    background: var(--color-main);
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    animation: td-bounce 1.2s ease-in-out infinite;
}
.td-loading-dot:nth-child(2) { animation-delay: .2s; }
.td-loading-dot:nth-child(3) { animation-delay: .4s; }

@keyframes td-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40%           { transform: translateY(-12px); opacity: 1; }
}

.td-error h2 {
    font-size: 24px;
    margin: 20px 0 10px;
    color: var(--color-text-main);
}
.td-error a {
    color: var(--color-main);
    text-decoration: underline;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
    .td-hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .td-mockup { position: static; }
    .td-info { padding-top: 0; }

    .td-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .td-includes-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .td-hero { padding: 24px 0 60px; }
    .td-features { padding: 60px 0; }
    .td-includes { padding: 60px 0; }
    .td-specs { padding: 60px 0; }
    .td-cta-bottom { padding: 70px 0; }

    .td-features-grid {
        grid-template-columns: 1fr;
    }
    .td-specs-row {
        grid-template-columns: 1fr;
    }
    .td-specs-label {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 12px 20px;
    }
    .td-specs-value { padding: 12px 20px; }

    .td-ctas { gap: 10px; }
    .td-cta-btns { flex-direction: column; align-items: center; }
    .td-cta-btn-buy,
    .td-cta-btn-demo { width: 100%; max-width: 320px; justify-content: center; }
}
