@import url('/css/variables.css');

/* ============================================================
   レンタル商品詳細・申込ページ共通
   prefix: rnt- (detail/product), rna- (application)
   ============================================================ */

/* ============================================================
   共通ユーティリティ
   ============================================================ */

.rnt-page {
    padding: 24px 0 80px;
}

.rnt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Breadcrumb --- */
.rnt-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 14px;
    margin-bottom: 24px;
    list-style: none;
    padding: 0;
}

.rnt-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.rnt-breadcrumb a:hover {
    text-decoration: underline;
}

.rnt-breadcrumb-sep {
    color: #999;
}

.rnt-breadcrumb-active {
    color: #666;
}

/* ============================================================
   rnt- : 商品詳細 (detail.php / product.php)
   ============================================================ */

/* --- Product Layout --- */
.rnt-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

/* --- Product Image --- */
.rnt-img-wrap {
    background: var(--bg-secondary);
    border-radius: 12px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
}

.rnt-emoji-img {
    font-size: 120px;
    line-height: 1;
}

.rnt-main-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    max-height: 400px;
}

.rnt-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.rnt-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s;
}

.rnt-thumb:hover {
    border-color: var(--primary-color);
}

/* --- Product Info --- */
.rnt-product-info {}

.rnt-product-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.rnt-product-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

/* --- Stock Badge --- */
.rnt-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.rnt-stock-in {
    background: #f0fdf4;
    color: #166534;
}

.rnt-stock-out {
    background: #fef2f2;
    color: #991b1b;
}

/* --- Condition Badge --- */
.rnt-condition-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.rnt-cond-available { background: #e8f5e9; color: #2e7d32; }
.rnt-cond-low { background: #fff3e0; color: #ef6c00; }
.rnt-cond-out { background: #ffebee; color: #c62828; }

/* --- Rental Price Card --- */
.rnt-price-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rnt-price-card-header {
    padding: 14px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.rnt-price-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.rnt-price-card-body {
    padding: 16px 20px;
}

/* --- Period Selection (radio buttons) --- */
.rnt-period-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rnt-period-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rnt-period-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.rnt-period-label:hover {
    border-color: var(--primary-color);
}

.rnt-period-radio:checked + .rnt-period-label {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

.rnt-period-price {
    font-weight: 700;
}

/* --- Deposit Alert --- */
.rnt-deposit-alert {
    background: #fffbeb;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #92400e;
}

.rnt-deposit-alert i {
    margin-right: 6px;
}

/* --- Rental Form Card --- */
.rnt-form-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rnt-date-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.rnt-date-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rnt-date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6,104,225,0.1);
}

/* --- CTA Buttons --- */
.rnt-btn-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rnt-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.rnt-btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.rnt-btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.rnt-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.rnt-btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.rnt-btn-disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

/* --- Features Section --- */
.rnt-features-section {
    margin-bottom: 48px;
}

.rnt-features-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.rnt-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.rnt-feature-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rnt-feature-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.rnt-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rnt-check-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.rnt-check-list i {
    color: var(--success-color);
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Specs Table --- */
.rnt-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rnt-specs-table th {
    padding: 10px 12px;
    background: var(--bg-secondary);
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    width: 40%;
}

.rnt-specs-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

/* --- Price List --- */
.rnt-price-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rnt-price-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.rnt-price-list-row:last-child {
    border-bottom: none;
}

.rnt-price-value-blue {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary-color);
}

/* --- Period Select --- */
.rnt-period-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    cursor: pointer;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.rnt-period-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- Feature Box --- */
.rnt-feature-box {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.rnt-feature-box-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.rnt-feature-box ul {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.rnt-feature-box li {
    margin-bottom: 4px;
}

/* --- Related Products --- */
.rnt-related-section {
    margin-top: 48px;
}

.rnt-related-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.rnt-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rnt-related-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.rnt-related-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.rnt-related-img-placeholder {
    height: 160px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 2rem;
}

.rnt-related-body {
    padding: 12px 16px;
}

.rnt-related-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.rnt-related-price {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.rnt-related-price strong {
    color: var(--primary-color);
}

.rnt-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.rnt-btn-sm:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ============================================================
   rna- : レンタル申込ページ (application/index.php)
   ============================================================ */

.rna-hero {
    background: linear-gradient(135deg, var(--kaitori-gradient-start), #764ba2);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.rna-hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.rna-hero-subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.rna-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.rna-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

/* --- Form Section --- */
.rna-form-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rna-form-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.rna-form-note {
    background: #f0f7ff;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #666;
}

.rna-form-note i {
    margin-right: 6px;
    color: var(--info-color);
}

.rna-section-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 28px 0 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.rna-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rna-form-group {
    margin-bottom: 20px;
}

.rna-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.rna-required {
    color: var(--error-color);
}

.rna-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rna-form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(6,104,225,0.1);
}

.rna-form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* --- Agree checkbox --- */
.rna-agree-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.rna-agree-row input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.rna-agree-row a {
    color: var(--primary-color);
    text-decoration: none;
}

.rna-agree-row a:hover {
    text-decoration: underline;
}

.rna-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.rna-btn-submit:hover {
    background: var(--primary-dark);
}

/* --- Order Summary --- */
.rna-summary {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 28px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.rna-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.rna-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.rna-summary-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rna-summary-label {
    font-size: 13px;
    color: #666;
    flex-shrink: 0;
}

.rna-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.rna-summary-total {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid var(--text-primary);
}

.rna-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.rna-total-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .rnt-product-layout {
        grid-template-columns: 1fr;
    }

    .rnt-features-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .rna-layout {
        grid-template-columns: 1fr;
    }

    .rna-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .rnt-period-grid {
        grid-template-columns: 1fr;
    }

    .rnt-features-grid {
        grid-template-columns: 1fr;
    }

    .rnt-related-grid {
        grid-template-columns: 1fr 1fr;
    }

    .rna-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .rnt-related-grid {
        grid-template-columns: 1fr;
    }
}
