/* 新版全域樣式修正 */
.model-info-container { padding: 20px 0; }
.model-info-container.row { display: flex; align-items: stretch; }
.profile-photo { display: flex; flex-direction: column; }
.profile-photo img { border-radius: 12px; width: 100%; height: 100%; object-fit: cover; display: block; }
.right-col-flex { display: flex; flex-direction: column; height: 100%; }

/* 統一 Slider 樣式 (照片 & 影片) - 配合 Owl Carousel */
.photo-slider-wrap { 
    position: relative !important; 
    margin: 15px 0 0 0 !important; 
    padding: 0 !important;
    clear: both; 
}

.owl-carousel { margin: 0 !important; padding: 0 !important; }

/* 強制 Owl 內部容器高度與左對應 */
.owl-carousel .owl-stage-outer { 
    height: 240px !important; 
    overflow: hidden !important; 
    padding: 0 !important;
}
.owl-carousel .owl-stage { 
    display: flex !important; 
    height: 100% !important; 
    align-items: stretch !important; 
    margin-left: 0 !important;
    padding-left: 0 !important;
}
.owl-carousel .owl-item { height: 100% !important; flex: 0 0 auto !important; }

.photo-card {
    height: 240px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    background: #000;
    display: block !important;
    position: relative !important;
    transition: all 0.3s ease; /* 新增過渡動畫 */
}

/* 僅為影片縮圖添加邊框與懸停變色 */
.video-slider-owl .photo-card {
    border: 1px solid #615e5eff !important;
}

/* 恢復寬度判斷 (配合 autoWidth) */
.photo-card.portrait  { width: 170px !important; }
.photo-card.landscape { width: 340px !important; }
.photo-card.square    { width: 240px !important; }

/* 影片縮圖專用：稍微放大以裁掉 YouTube 內建黑邊 */
.video-slider-owl .photo-card img {        
    transform-origin: center !important;
    border-radius: 0 !important; /* 讓內部的圖不重複圓角，靠容器裁切 */
}

.photo-card img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    display: block !important;
}

/* 自訂 Owl Carousel 導航箭頭 */
.owl-theme .owl-nav {
    margin: 0 !important;
    pointer-events: none; /* 防止擋住圖片點擊 */
}
.owl-theme .owl-nav [class*="owl-"] {
    pointer-events: auto;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important; /* 移除底色 */
    color: rgba(255, 255, 255, 0.7) !important; /* 稍微半透明的白色箭頭 */
    border: none !important;
    font-size: 30px !important; /* 放大箭頭 */
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 10px !important;
    text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.8); /* 加入陰影讓它在較亮的底圖上也能看清 */
    z-index: 10;
    outline: none !important;
    border-radius: 0 !important;
}
.owl-theme .owl-nav [class*="owl-"]:hover {
    background: transparent !important; /* 懸停也沒有底色 */
    color: #fff !important; /* 懸停時變全白 */
}
.owl-theme .owl-nav .owl-prev { left: -5px; } /* 靠左 */
.owl-theme .owl-nav .owl-next { right: -5px; } /* 靠右 */
.owl-theme .owl-nav .disabled { opacity: 0 !important; cursor: default; } /* 無法滑動時隱藏箭頭 */

/* 資訊區 & 其他 */
.model-info-table { width: auto; border-collapse: separate; border-spacing: 0 4px; }
.model-info-table td { padding: 2px 0; color: #ccc; font-size: 16px; vertical-align: top; }
.model-info-table td.info-label { font-weight: bold; color: #fff; width: 60px; white-space: nowrap; padding-right: 20px; }
.model-info-table td.info-value { color: #ccc; font-weight: bold;}
.model-id { font-size: 14px; color: #fff; margin-bottom: 5px;font-weight: bold; }
.model-name { font-size: 32px; font-weight: bold; color: #fff; margin-bottom: 18px; }

.video-resume-btn { text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 15px; height: 100%; }
.video-resume-btn .yt-circle { width: 80px; height: 80px; background: #ff0000; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; transition: all 0.3s; box-shadow: 0 4px 15px rgba(255,0,0,0.3); }
.video-resume-btn .yt-circle i { color: #fff; font-size: 36px; margin-left: 4px; }
.video-resume-btn:hover .yt-circle { transform: scale(1.1); box-shadow: 0 6px 20px rgba(255,0,0,0.5); }
.video-resume-btn span { font-size: 14px; color: #999; font-weight: bold; }

.main-video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 20px 0; border-radius: 8px; }
.main-video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.btn-custom-red { 
    background-color: #7A0204; color: #fff; border: none; padding: 12px;
     font-size: 18px; width: 100%; margin-top: 15px; 
    border-radius: 12px 12px 0px 0px !important; 
    display: flex; align-items: center; justify-content: center;
}
.btn-custom-red i { margin-left: 10px; font-size: 20px; }
.btn-custom-red:hover { background-color: #7A0204; }
.btn-custom-red:focus, .btn-custom-red:active { outline: none !important; box-shadow: none !important; }
.info-video-row { min-height: 380px; display: flex !important; align-items: center !important; }

@media (max-width: 768px) {
    .info-video-row { min-height: auto; display: flex !important; align-items: flex-start !important; padding: 10px 0; }
    .model-info-container.row { flex-direction: column; }
    .owl-carousel .owl-stage-outer, .photo-card { height: 180px !important; }
    .photo-card.portrait  { width: 128px !important; }
    .photo-card.landscape { width: 256px !important; }
    .photo-card.square    { width: 180px !important; }

    .model-name { font-size: 24px; margin-bottom: 12px; }
    .model-id { font-size: 12px; margin-bottom: 2px; }
    
    .video-resume-btn { padding: 0;text-align: left; }
    .video-resume-btn .yt-circle { width: 55px; height: 55px; margin-bottom: 8px; }
    .video-resume-btn .yt-circle i { font-size: 24px; }
    .video-resume-btn span { font-size: 12px; color: #ccc; }

    .model-info-table td { font-size: 14px; line-height: 1.4; }
    .model-info-table td.info-label { width: 48px; padding-right: 15px; color: #999; font-weight: normal; }
    .model-info-table td.info-value { color: #fff; font-weight: normal; }
    
    /* 手機版 YouTube 100% 寬度 */
    #video-area { margin-left: -15px !important; margin-right: -15px !important; }
    #video-area .col-12 { padding-left: 0 !important; padding-right: 0 !important; }
    .main-video-wrapper { margin-top: 5px !important; margin-bottom: 20px !important; border-radius: 0 !important; }
}
    
/* 自訂 Colorbox 樣式 (符合黑底、固定按鈕、頂部計數) */
#cboxOverlay { background: #000 !important; opacity: 1 !important; }
/* 移除 Colorbox 所有的 overflow: hidden 限制，避免 X 按鈕被邊界切掉 */
#colorbox, #cboxWrapper { outline: none !important; overflow: visible !important; }
#cboxContent, #cboxLoadedContent { background: transparent !important; padding: 0 !important; margin-top: 0 !important; border: none !important; overflow: visible !important; }
#cboxTopLeft, #cboxTopCenter, #cboxTopRight, #cboxMiddleLeft, #cboxMiddleRight, #cboxBottomLeft, #cboxBottomCenter, #cboxBottomRight { display: none !important; }
/* 讓圖片完全適應，不帶邊框，並確保它的層級低於按鈕 */
.cboxPhoto { border: none !important; margin: auto; position: relative !important; z-index: 1 !important; }

/* 固定按鈕位置到畫面兩側與頂部 */
#cboxPrevious, #cboxNext, #cboxClose, #cboxCurrent {
    position: fixed !important;
    background: transparent !important;
    z-index: 99999 !important;
    font-family: Arial, sans-serif !important;
    -webkit-transform: translateZ(100px) !important;
    transform: translateZ(100px) !important;
}

#cboxPrevious, #cboxNext {
    top: 50% !important;
    -webkit-transform: translateY(-50%) translateZ(100px) !important;
    transform: translateY(-50%) translateZ(100px) !important;
    width: 50px !important;
    height: 50px !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    text-indent: 0 !important;
    background-image: none !important;
}
#cboxPrevious i, #cboxNext i {
    font-size: 30px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    line-height: 50px !important;
    display: block !important;
    text-align: center !important;
}
#cboxPrevious:hover i, #cboxNext:hover i { color: #fff !important; }
#cboxPrevious { left: 10px !important; }
#cboxNext { right: 10px !important; }

#cboxCurrent {
    top: 15px !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 16px !important;
    font-weight: bold !important;
    pointer-events: none !important;
    text-indent: 0 !important;
}

#cboxClose {
    top: 15px !important;
    right: 15px !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    text-indent: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}
#cboxClose i {
    font-size: 24px !important;
    color: #fff !important;
    line-height: 44px !important;
    display: block !important;
    text-align: center !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
#cboxClose:hover { background: rgba(0, 0, 0, 0.9) !important; }
#cboxClose:hover i { color: #fe0000 !important; }

#cboxTitle { display: none !important; }

@media (max-width: 768px) {
    #cboxPrevious { left: 5px !important; }
    #cboxNext { right: 5px !important; }
    #cboxPrevious i, #cboxNext i { font-size: 24px !important; }
    #cboxCurrent { font-size: 14px !important; top: 10px !important; }
    #cboxClose { top: 8px !important; right: 8px !important; }
    #cboxClose i { color: #fff !important; }
}

/* 輔助類別 (替代 inline styles) */
.mt-5-px { margin-top: 5px !important; }
.pl-2-px { padding-left: 2px !important; }
.mt-15-px { margin-top: 15px !important; }
.mt-10-px { margin-top: 10px !important; }
.btn-xs-custom { font-size: 11px !important; padding: 2px 8px !important; }
.h-100 { height: 100% !important; }
.title-white-bold { color: #fff; margin-bottom: 10px; font-size: 16px; font-weight: bold; }
.cursor-pointer { cursor: pointer !important; }
.card-dark { background: #111 !important; color: #ccc !important; }
.pl-20-px { padding-left: 20px !important; }
.btn-custom-red-bottom { margin-top: 0 !important; border-radius: 0 0 12px 12px !important; }
