/* =========================================
   全域變數
========================================= */
:root {
    --bg-body: #f4f7f6;
    --bg-panel: #ffffff;
    --primary: #2e7d32;
    --primary-hover: #1b5e20;
    --action-blue: #1976d2;
    --action-blue-hover: #115293;
    --text-main: #333333;
    --text-secondary: #555555;
    --border-color: #cccccc;
    --danger: #d32f2f;
    --success-bg: #e8f5e9;
    --success-border: #c8e6c9;
    --error-bg: #ffebee;
    --error-border: #ffcdd2;
}

/* =========================================
   基礎重置與防水平溢出
========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Helvetica Neue', Arial, '微軟正黑體', sans-serif;
    background: radial-gradient(circle at 30% 20%, #f4f7f6, #e2e8ea);
    color: var(--text-main);
    margin: 0;
    padding: 30px 15px;
    display: flex;
    justify-content: center;
    line-height: 1.5;
    min-height: 100vh;
}

/* =========================================
   主要排版與容器
========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    background-color: var(--bg-panel);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

/* 長型 Banner 橫幅樣式 */
.platform-banner {
    position: relative;
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #4caf50 100%);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.22);
}

.platform-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.banner-content {
    z-index: 2;
    color: #ffffff;
}

.banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
    backdrop-filter: blur(4px);
}

.banner-content h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.banner-content p {
    margin: 6px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

.banner-icon {
    font-size: 64px;
    z-index: 2;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.visitor-stats-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #64748b;
}

.visitor-stats-bar span {
    background: #e8f5e9;
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: bold;
    border: 1px solid #c8e6c9;
}

/* =========================================
   頂部操作區 (搜尋與新增)
========================================= */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 15px;
}

.search-group {
    display: flex;
    flex: 1;
    gap: 10px;
    align-items: center;
}

.search-group input {
    flex: 1;
    max-width: 420px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    width: 100%;
    font-family: inherit;
    background-color: #ffffff;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}

.clear-search-link {
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 4px;
}

.clear-search-link:hover {
    color: var(--danger);
    text-decoration: underline;
}

/* =========================================
   分類快速篩選膠囊列
========================================= */
.category-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background-color: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
    min-height: 38px;
}

.cat-pill:hover {
    background-color: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.cat-pill.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.25);
}

/* =========================================
   按鈕與提示訊息
========================================= */
button {
    padding: 12px 24px;
    background-color: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

button:hover {
    background-color: var(--primary-hover);
}

button:active {
    transform: scale(0.98);
}

.btn-add {
    background-color: var(--action-blue);
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(25, 118, 210, 0.2);
}

.btn-add:hover {
    background-color: var(--action-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(25, 118, 210, 0.28);
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: bold;
    text-align: center;
}

.alert.success {
    background-color: var(--success-bg);
    color: var(--primary);
    border: 1px solid var(--success-border);
}

.alert.error {
    background-color: var(--error-bg);
    color: var(--danger);
    border: 1px solid var(--error-border);
}

/* =========================================
   3D 冰箱貼立體卡片網格 (二手輔具專區)
========================================= */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    margin-top: 20px;
    perspective: 1200px;
}

.card-3d-wrapper {
    position: relative;
    display: block;
    color: inherit;
    transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    height: 100%;
    min-width: 0;
}

.card-3d-wrapper:hover {
    transform: translateZ(16px) rotateX(5deg) rotateY(-6deg);
    z-index: 15;
}

.card-3d-wrapper.menu-open {
    z-index: 30;
    transform: none;
}

.card-3d-shadow {
    position: absolute;
    inset: 6px;
    background: rgba(15, 23, 42, 0.22);
    border-radius: 18px;
    transform: translateZ(-14px) translateX(6px) translateY(10px);
    filter: blur(10px);
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.card-3d-wrapper:hover .card-3d-shadow {
    transform: translateZ(-26px) translateX(16px) translateY(20px);
    filter: blur(16px);
    background: rgba(46, 125, 50, 0.24);
}

.card-thickness {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    pointer-events: none;
}

.layer-1 { transform: translateZ(-2px); background: #eef2f6; }
.layer-2 { transform: translateZ(-4px); background: #e2e8f0; }
.layer-3 { transform: translateZ(-6px); background: #cbd5e1; }
.layer-4 { transform: translateZ(-8px); background: #94a3b8; }
.layer-5 { transform: translateZ(-10px); background: #334155; }

.equipment-card-front {
    position: relative;
    height: 100%;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 4px solid #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: visible;
    backface-visibility: hidden;
}

.equipment-card-front::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(
        115deg,
        rgba(255, 255, 255, 0) 35%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 65%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 3;
}

.card-3d-wrapper:hover .equipment-card-front::after {
    opacity: 1;
}

.card-link-area {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-radius: 14px;
    overflow: hidden;
}

.card-cover-box {
    width: 100%;
    height: 175px;
    background-color: #f1f5f9;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}

.card-cover-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-3d-wrapper:hover .card-cover-box img {
    transform: scale(1.04);
}

/* 黃色標籤呈現銷售別（二手 / 新品） */
.deal-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 2;
    letter-spacing: 0.5px;
}

.deal-condition {
    background-color: #facc15;
    color: #1e293b;
    border: 1px solid #eab308;
}

.deal-free { background-color: #16a34a; color: #ffffff; }
.deal-rent { background-color: #0284c7; color: #ffffff; }
.deal-sell { background-color: #ea580c; color: #ffffff; }
.deal-default { background-color: #475569; color: #ffffff; }

/* =========================================
   右上角 3 個點操作選單 (⋮)
========================================= */
.card-action-menu-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
}

.btn-three-dots {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-three-dots:hover {
    background: rgba(15, 23, 42, 0.92);
    transform: scale(1.08);
}

.card-dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    min-width: 145px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    z-index: 30;
    animation: fadeInMenu 0.16s ease-out;
}

.card-dropdown-menu.show {
    display: block;
}

@keyframes fadeInMenu {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item-btn {
    width: 100%;
    padding: 11px 14px;
    background: transparent;
    color: #1e293b;
    border: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.dropdown-item-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.dropdown-item-btn.delete-btn {
    color: #dc2626;
    border-top: 1px solid #f1f5f9;
}

.dropdown-item-btn.delete-btn:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.photo-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.72);
    color: #ffffff;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 12px;
    z-index: 2;
}

.card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

/* 物品 tag：黃色底、紅色字 */
.card-tag {
    display: inline-block;
    background-color: #fef08a;
    color: #dc2626;
    border: 1px solid #eab308;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-tag {
    display: inline-block;
    background-color: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.shipping-tag {
    display: inline-block;
    background-color: #e0f2fe;
    color: #0369a1;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-size: 16px;
    font-weight: 800;
    color: #d32f2f;
    margin-bottom: 10px;
}

.card-price.is-free {
    color: #16a34a;
}

.card-footer-info {
    font-size: 12px;
    color: #64748b;
    margin-top: auto;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
}

.footer-dates {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* =========================================
   🎁 許願池區塊網格卡片樣式
========================================= */
.wishlist-section {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-top: 5px solid #0284c7;
    border-radius: 16px;
    padding: 30px;
    margin-top: 60px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    position: relative;
}

.wishlist-section::before {
    content: "✨ 尋求協助與交換平台";
    position: absolute;
    top: -14px;
    left: 30px;
    background: #0284c7;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.wishlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 15px;
    margin-top: 5px;
}

.wishlist-header h3 {
    margin: 0;
    color: #0369a1;
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wishlist-form-box {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    margin-bottom: 24px;
}

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.wishlist-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wishlist-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.wishlist-card.is-hidden-item {
    opacity: 0.6;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
}

.wishlist-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    padding-right: 30px;
    line-height: 1.4;
}

.wishlist-card-desc {
    font-size: 14px;
    color: #475569;
    margin-bottom: 16px;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.6;
    flex-grow: 1;
}

.wishlist-card-footer {
    border-top: 1px dashed #e2e8f0;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    gap: 8px;
}

/* =========================================
   🏥 台灣輔具租借中心資源連結區
========================================= */
.rental-centers-section {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-top: 5px solid var(--primary);
    border-radius: 16px;
    padding: 30px;
    margin-top: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    position: relative;
}

.rental-centers-section::before {
    content: "🏥 官方與公益輔具資源";
    position: absolute;
    top: -14px;
    left: 30px;
    background: var(--primary);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.3);
}

.rental-centers-header {
    margin-bottom: 20px;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 14px;
    margin-top: 5px;
}

.rental-centers-header h3 {
    margin: 0 0 6px 0;
    color: var(--primary-hover);
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rental-centers-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.rental-links-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.rental-link-capsule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    background-color: #ffffff;
    color: #334155;
    text-decoration: none;
    border: 2px solid #cbd5e1;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rental-link-capsule:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 5px 12px rgba(46, 125, 50, 0.25);
    transform: translateY(-2px);
}

.rental-link-capsule.highlight-portal {
    background-color: #e8f5e9;
    border-color: var(--primary);
    color: var(--primary-hover);
}

.rental-link-capsule.highlight-portal:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* =========================================
   💡 網站建議留言區
========================================= */
.feedback-section {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-top: 5px solid #d97706;
    border-radius: 16px;
    padding: 30px;
    margin-top: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    position: relative;
}

.feedback-section::before {
    content: "💬 傾聽您的聲音";
    position: absolute;
    top: -14px;
    left: 30px;
    background: #d97706;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 15px;
    margin-top: 5px;
}

.feedback-header h3 {
    margin: 0;
    color: #b45309;
    font-size: 21px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-form-box {
    background: #fffbeb;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #fde68a;
    margin-bottom: 24px;
}

.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feedback-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.feedback-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feedback-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-right: 32px;
    flex-wrap: wrap;
    gap: 8px;
}

.feedback-author {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-date {
    font-size: 12px;
    color: #64748b;
}

.feedback-content {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* =========================================
   LINE QR-Code 按鈕樣式
========================================= */
.btn-line-qrcode {
    background-color: #06c755;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(6, 199, 85, 0.25);
    transition: all 0.2s ease;
}

.btn-line-qrcode:hover {
    background-color: #05b34c;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(6, 199, 85, 0.35);
}

/* =========================================
   彈出互動視窗 (Modal)
========================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 15px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    animation: fadeInMenu 0.2s ease-out;
}

.modal-box h3 {
    margin: 0 0 10px 0;
    font-size: 19px;
    color: #1e293b;
}

.modal-box p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
}

.modal-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.modal-btn-row button {
    flex: 1;
}

.btn-modal-cancel {
    background: #94a3b8;
}

.btn-modal-cancel:hover {
    background: #64748b;
}

/* =========================================
   表單與詳情頁樣式
========================================= */
.form-container {
    max-width: 650px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 14px;
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions .btn-submit,
.form-actions .btn-cancel {
    flex: 1;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
}

.form-actions .btn-cancel {
    background-color: #9e9e9e;
    color: #ffffff;
}

.detail-container {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.detail-top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.detail-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.detail-info-table th,
.detail-info-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.detail-info-table th {
    width: 120px;
    color: #475569;
    font-weight: 700;
    background-color: #f8fafc;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.pagination .active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.site-disclaimer-footer {
    margin-top: 50px;
    padding: 25px;
    background-color: #f8f9fa;
    border-top: 3px solid var(--primary);
    border-radius: 10px;
    color: #555555;
    font-size: 13px;
    line-height: 1.6;
}

.site-disclaimer-footer p {
    margin: 0 0 8px 0;
    color: #333333;
}

/* 離免責聲明下框線保留充足間距，三等分底部 */
.footer-action-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 44px;
    padding-top: 8px;
    width: 100%;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px 20px;
    background-color: #ffffff;
    color: #555555;
    text-decoration: none;
    border: 2px solid #555555;
    border-radius: 50px;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-home:hover {
    background-color: #555555;
    color: #ffffff;
}

.btn-icon-svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex-shrink: 0;
    display: block;
}

.btn-line-community {
    border-color: #06c755;
    color: #059642;
}

.btn-line-community:hover {
    background-color: #06c755;
    color: #ffffff;
}

.btn-fb-community {
    border-color: #1877f2;
    color: #1877f2;
}

.btn-fb-community:hover {
    background-color: #1877f2;
    color: #ffffff;
}

/* =========================================
   Detail.php 大圖 + 下方縮圖 Slider Show 樣式
========================================= */
.detail-gallery {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 440px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease-in-out;
}

.slide-item {
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-item img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.slider-btn:hover {
    background: rgba(15, 23, 42, 0.9);
}

.prev-btn { left: 12px; }
.next-btn { right: 12px; }

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.dot.active {
    background: #ffffff;
    transform: scale(1.2);
}

.thumbs-list {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.thumb-item {
    flex: 0 0 84px;
    width: 84px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #cbd5e1;
    opacity: 0.65;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-item.active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

/* =========================================
   多斷點響應式設計 (RWD Breakpoints)
========================================= */
@media screen and (max-width: 1200px) {
    .rental-links-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .container { padding: 30px 24px; }
    .equipment-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .wishlist-grid { grid-template-columns: repeat(2, 1fr); }
    .rental-links-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
    body { padding: 10px; }
    .container { padding: 20px 14px; border-radius: 12px; }
    .platform-banner { height: 140px; padding: 0 20px; margin-bottom: 20px; }
    .banner-content h1 { font-size: 20px; }
    .banner-content p { font-size: 12px; }
    .banner-icon { font-size: 42px; }

    .visitor-stats-bar { justify-content: center; }

    .toolbar { flex-direction: column; align-items: stretch; gap: 12px; }
    .search-group { flex-wrap: wrap; width: 100%; }
    .search-group input { max-width: none; flex: 1 1 65%; }
    .search-group button { flex: 1 1 auto; padding: 12px 16px; }
    .toolbar .btn-add { width: 100%; padding: 13px; }

    .category-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 12px;
        gap: 8px;
    }
    .cat-pill { flex-shrink: 0; padding: 6px 14px; font-size: 13px; }

    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .card-3d-shadow { transform: translateZ(-10px) translateX(4px) translateY(8px); }
    .card-cover-box { height: 210px; }
    .card-body { padding: 16px; }
    .card-title { font-size: 17px; }
    .card-price { font-size: 17px; }

    .wishlist-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .wishlist-section,
    .rental-centers-section,
    .feedback-section {
        margin-top: 40px;
        padding: 20px 14px;
    }

    .rental-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .rental-link-capsule {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-container, .detail-container { padding: 18px 14px; }
    .form-actions { flex-direction: column-reverse; gap: 10px; }
    .form-actions .btn-submit, .form-actions .btn-cancel { width: 100%; }

    .slider-container {
        height: 250px;
        border-radius: 8px;
    }
    .slider-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .thumb-item {
        flex: 0 0 70px;
        width: 70px;
        height: 54px;
    }
    .detail-info-table th {
        width: 92px;
        padding: 10px 8px;
        font-size: 14px;
    }
    .detail-info-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    .footer-action-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 36px;
    }
    .footer-action-row .btn-home {
        width: 100%;
    }
}

@media screen and (max-width: 450px) {
    .rental-links-grid {
        grid-template-columns: 1fr;
    }
}