/* =========================================
   商品詳情頁主佈局 (PDP Main Layout)
========================================= */
.pdp-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 4rem 5rem;
}

/* 麵包屑導航 */
.breadcrumbs {
    font-size: 13px;
    color: #888;
    margin-bottom: 2.5rem;
}
.breadcrumbs a {
    color: #555;
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: var(--brand-color);
    text-decoration: underline;
}

/* 主容器雙欄排版 */
.pdp-container {
    display: flex;
    gap: 5rem;
    align-items: flex-start;
}

/* 左側：圖庫排版 */
.product-gallery {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.main-image-container {
    width: 100%;
    height: 500px;
    background-color: #fff;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumbnail-list {
    display: flex;
    gap: 1rem;
}
.thumb-img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 2px;
    transition: all 0.2s;
    background-color: #fff;
}
.thumb-img:hover, .thumb-img.active {
    border-color: var(--brand-color);
    opacity: 0.8;
}

/* 右側：規格面板 */
.product-info-panel {
    flex: 1;
}
.product-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--brand-color);
    background-color: rgba(125, 140, 122, 0.1);
    padding: 4px 8px;
    border-radius: 2px;
}
.product-title {
    font-size: 2.5rem;
    margin: 1rem 0 0.3rem;
}
.product-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}
.price-rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-color);
    font-family: 'Playfair Display', serif;
}
.stars {
    color: #FFB800;
    letter-spacing: 2px;
}
.review-count {
    font-size: 13px;
    color: #888;
    margin-left: 5px;
}
.divider {
    border: 0;
    border-top: 1px solid #EAEAEA;
    margin-bottom: 2rem;
}

/* 規格選擇鈕樣式 */
.variant-selector {
    margin-bottom: 2rem;
}
.selector-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}
.color-swatches {
    display: flex;
    gap: 12px;
}
.swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #DDD;
    transition: all 0.2s;
}
.swatch.active {
    box-shadow: 0 0 0 2px var(--brand-color);
}
.text-patches {
    display: flex;
    gap: 12px;
}
.patch {
    padding: 10px 20px;
    border: 1px solid #DDD;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    background: #fff;
    transition: all 0.2s;
}
.patch.active, .patch:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
    background-color: rgba(125, 140, 122, 0.03);
}

/* 數量與加購物車按鈕區 */
.purchase-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    height: 50px;
}
.quantity-counter {
    display: flex;
    border: 1px solid #DDD;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.qty-btn {
    width: 45px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}
.qty-btn:hover { background-color: #F5F5F5; }
#qty-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #DDD;
    border-right: 1px solid #DDD;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}
/* 移除欄位箭頭 */
#qty-input::-webkit-outer-spin-button,
#qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.btn-add-to-cart {
    flex: 1;
    background-color: var(--brand-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-add-to-cart:hover { background-color: var(--brand-hover); }
.btn-wishlist {
    width: 50px;
    background: #fff;
    border: 1px solid #DDD;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}
.btn-wishlist:hover {
    border-color: #FF4A4A;
    color: #FF4A4A;
}

.quick-features {
    list-style: none;
    padding: 0;
}
.quick-features li {
    font-size: 13px;
    color: #666;
    margin-bottom: 0.5rem;
}

/* =========================================
   下方的詳細規格頁籤 (Product Tabs)
========================================= */
.pdp-details-tabs {
    margin-top: 5rem;
    border-top: 1px solid #EAEAEA;
    padding-top: 3rem;
}
.tab-header {
    display: flex;
    gap: 3rem;
    border-bottom: 1px solid #EAEAEA;
    margin-bottom: 2rem;
}
.tab-btn {
    background: none;
    border: none;
    padding-bottom: 1rem;
    font-size: 16px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    position: relative;
}
.tab-btn.active {
    color: var(--text-primary);
    font-weight: 600;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; width: 100%; height: 2px;
    background-color: var(--brand-color);
}
.tab-content {
    display: none;
    font-size: 15px;
    color: #444;
    max-width: 800px;
    animation: fadeIn 0.4s ease;
}
.tab-content.active { display: block; }

/* 規格表格 */
.tab-content table {
    width: 100%;
    border-collapse: collapse;
}
.tab-content table th {
    text-align: left;
    width: 150px;
    color: #888;
    font-weight: 500;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}
.tab-content table td {
    padding: 12px 0;
    color: #111;
    font-weight: 500;
    border-bottom: 1px solid #F0F0F0;
}

/* =========================================
   懸浮式購物車 (Sticky Add-to-Cart Bar)
========================================= */
.sticky-cart-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transform: translateY(-100%); /* 預設隱藏在畫面上方 */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 12px 0;
}

/* 當 JS 加入 .show 類別時，觸發向下滑入動畫 */
.sticky-cart-bar.show {
    transform: translateY(0); 
}

.sticky-cart-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-product-info img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
}

.sticky-details {
    display: flex;
    flex-direction: column;
}

.sticky-title {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
}

.sticky-price {
    font-size: 0.95rem;
    color: var(--brand-color);
    font-weight: 600;
    margin: 0;
}

.sticky-cart-actions .sticky-add-btn {
    padding: 10px 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}