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

/* ============================================================
   Smartmart レンタルページ — サイドバーフィルター付きレイアウト
   prefix: rt-
   ============================================================ */

/* --- Section / Container --- */
.rt-section {
    padding: 24px 0 80px;
    min-height: 60vh;
}

.rt-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Page Header --- */
.rt-header {
    text-align: center;
    margin-bottom: 40px;
}

.rt-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.rt-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- Features Row --- */
.rt-features-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.rt-feature-item {
    text-align: center;
    padding: 20px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.rt-feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 20px;
}

.rt-feature-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rt-feature-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* --- Sidebar + Grid Layout --- */
.rt-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    margin-bottom: 48px;
}

/* --- Sidebar --- */
.rt-sidebar {
    position: sticky;
    top: 140px;
    align-self: start;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.rt-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.rt-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-sidebar-title i {
    color: var(--primary-color);
}

.rt-filter-reset {
    font-size: 12px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.rt-filter-reset:hover {
    color: var(--primary-color);
}

/* --- Filter Groups --- */
.rt-filter-group {
    margin-bottom: 20px;
}

.rt-filter-group:last-child {
    margin-bottom: 0;
}

.rt-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rt-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* --- Pill Buttons --- */
.rt-pill {
    padding: 5px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.rt-pill:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.rt-pill.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.rt-pill-sm {
    padding: 3px 10px;
    font-size: 11px;
}

/* --- Price Range --- */
.rt-price-range {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.rt-price-input {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-width: 0;
    box-sizing: border-box;
}

.rt-price-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.rt-price-input::placeholder {
    color: var(--text-light);
}

.rt-price-sep {
    font-size: 12px;
    color: var(--text-light);
    flex-shrink: 0;
}

.rt-price-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* --- Main Content --- */
.rt-main {
    min-width: 0;
}

/* --- Toolbar --- */
.rt-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.rt-result-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.rt-result-count span {
    font-weight: 700;
    color: var(--text-primary);
}

.rt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rt-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.rt-sort-select {
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-primary);
    cursor: pointer;
}

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

/* --- Active Filters --- */
.rt-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.rt-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
}

.rt-active-tag:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.rt-active-tag i {
    font-size: 10px;
    color: var(--text-light);
}

.rt-active-tag:hover i {
    color: #ef4444;
}

/* --- Product Grid --- */
.rt-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* --- Product Card --- */
.rt-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}

.rt-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-color, #ddd);
}

.rt-card-image {
    background: var(--bg-tertiary);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rt-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.rt-card-body {
    padding: 12px 14px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.rt-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 2px;
}

.rt-card-brand {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.rt-card-condition {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 8px;
    align-self: flex-start;
}

.rt-condition-new { background: #e3f2fd; color: #1565c0; }
.rt-condition-excellent { background: #e8f5e9; color: #2e7d32; }
.rt-condition-good { background: #fff3e0; color: #ef6c00; }
.rt-condition-fair { background: #f3f4f6; color: #6b7280; }

.rt-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.rt-card-price-label {
    font-size: 10px;
    color: var(--text-light);
}

.rt-card-price-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

.rt-card-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 8px;
    transition: gap 0.2s;
}

.rt-card:hover .rt-card-cta {
    gap: 8px;
}

/* --- Empty State --- */
.rt-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.rt-empty-icon {
    font-size: 40px;
    color: var(--text-light);
    opacity: 0.3;
    margin-bottom: 16px;
}

.rt-empty-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* --- Featured Banner --- */
.rt-featured-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 24px;
}

.rt-featured-icon {
    font-size: 32px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.rt-featured-body {
    flex: 1;
}

.rt-featured-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.rt-featured-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- CTA Banner --- */
.rt-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
}

.rt-cta-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.rt-cta-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
}

.rt-cta-actions {
    flex-shrink: 0;
}

/* --- Buttons --- */
.rt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.rt-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.rt-btn-primary:hover {
    opacity: 0.9;
}

.rt-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-size: 13px;
}

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

.rt-btn-white {
    background: #fff;
    color: var(--primary-color);
}

.rt-btn-white:hover {
    background: var(--bg-secondary);
    color: var(--primary-dark);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .rt-section {
        padding: 16px 0 60px;
    }

    .rt-title {
        font-size: 24px;
    }

    .rt-features-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* サイドバーをオーバーレイに */
    .rt-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rt-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        border-radius: 0;
        max-height: 100vh;
        border: none;
        padding: 20px;
    }

    .rt-sidebar.open {
        display: block;
    }

    .rt-sidebar-toggle {
        display: flex;
    }

    .rt-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .rt-card-image {
        height: 120px;
    }

    .rt-card-body {
        padding: 10px 12px 14px;
    }

    .rt-card-name {
        font-size: 12px;
    }

    .rt-card-price-value {
        font-size: 15px;
    }

    .rt-featured-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .rt-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 20px;
    }

    .rt-cta-actions {
        width: 100%;
    }

    .rt-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .rt-features-row {
        grid-template-columns: 1fr;
    }

    .rt-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .rt-card-image {
        height: 100px;
    }
}
