@charset "utf-8";
/* CSS Document */

/*size box*/
.sizebox{ padding: 15px 0px;}





/* ===========================
   外層容器
   =========================== */
.pd-size-wrap {
    display: flex;
    gap: 30px;
    align-items: center;
    background:#FFF;
    padding: 10px;
    border-radius: 10px;
    margin-top: 20px;
    font-size:16px;
}

/* ===========================
   Size 區塊
   =========================== */
.sizebox {
    flex: 1 1 auto;   /* 自動撐滿剩餘空間 */
    min-width: 0;     /* 防止內容撐爆 */
}

/* 表格 */
.size-row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr 100px;
    padding: 14px 10px;
    border-bottom: 1px solid #ddd;
    align-items: center;
}

.size-row.inquiry {
    grid-template-columns: 2fr 1.2fr 1.5fr 1fr 1.2fr 40px;
}
.size-row.zcontact {
    grid-template-columns: 2fr 1.2fr 1.5fr 1fr 1.2fr;
}

.size-row.head {
    font-weight: bold;
    background: #f5f5f5;
}

/* ================================
   整個數量區
   ================================ */
.qtybox {
    display: flex;
    width: 90px;
    height: 42px;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
}

/* 數量欄 */
.qty-input {
    width: 50px;
    border: 0;
    text-align: center;
    font-size: 16px;
    background: #fff;
}

/* ================================
   右側上下鍵
   ================================ */
.qty-arrows {
    width: 38px;
    background: #0d6efd;
    display: flex;
    flex-direction: column;
}

.qty-arrows button {
    flex: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}

/* 上箭頭 */
.qty-up::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
    transform: translate(-50%, -30%) rotate(45deg);
}

/* 下箭頭 */
.qty-down::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: translate(-50%, -70%) rotate(45deg);
}

/* 減號 disabled 狀態 */
.qty-down:disabled {
    background: #e0e0e0;
    cursor: default;
}

/* 箭頭變淡 */
.qty-down:disabled::before {
    border-color: #aaa;
}

/* hover 效果 */
.qty-arrows button:not(:disabled):hover {
    background: rgba(255,255,255,.15);
}


/* ===========================
   Add to Cart
   =========================== */
.cartbox {
    width: 260px;
    flex: 0 0 260px;
    text-align: center;
}

.btn-cart, .btn-inquiry {
    width: 200px;
    background: #0d6efd;
    color: #fff;
    border: 0;
    padding: 14px 0;
    border-radius: 40px;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 5px;
}


.cart-msg {
    margin-bottom: 12px;
    color: #666;
    transition: color .25s ease;
}

/* 錯誤狀態 */
.cart-msg.is-error {
    color: #e53935;
}


.btn-ok {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    font-size: 20px;
    transition: all .35s ease;
}

/* 成功狀態 */
.btn-inquiry.is-success {
    background: #28a745;
}

.btn-inquiry.is-success .btn-ok {
    transform: translateY(-50%) scale(1);
    opacity: 1;
}

/* ======================
   View Inquiry
   ====================== */
.btn-view-inquiry{display: none; text-align: center;}
.btn-view-inquiry a{
    display: inline-block;
    margin-top: 14px;
    width: 200px;
    text-align: center;
    padding: 12px 0;
    border-radius: 40px;
    border: 2px solid #0d6efd;
    color: #0d6efd;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
    
}

.btn-view-inquiry a:hover {
    background: #0d6efd;
    color: #fff;
}



/* cartbox 晃動動畫 */
.cartbox.shake {
    animation: shakeX .4s ease;
}

@keyframes shakeX {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-6px); }
    40%  { transform: translateX(6px); }
    60%  { transform: translateX(-4px); }
    80%  { transform: translateX(4px); }
    100% { transform: translateX(0); }
}



/* ===========================
   ⭐ 手機版關鍵
   =========================== */
@media (max-width: 1200px) {

    .pd-size-wrap {
        flex-direction: column;
        gap: 12px;   /* ⭐ 手機縮小距離 */
    }
    .sizebox {
        width: 100%;
        max-width: 100%;
    }
    .cartbox {
        width: 100%;
        order: 99;   /* ⭐ 移到最下面 */
        flex: none;
    }

}


.btn-del {
    border: 0;
    background: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
}

.btn-del:hover {
    color: #e53935;
}
