/**
 * PC layout extras: image fallback + cookie consent
 */

.img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C9A84C 0%, #9A7B2F 50%, #C9A84C 100%);
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    min-height: 200px;
    width: 100%;
    height: 100%;
    position: relative;
    letter-spacing: 1px;
}

.img-fallback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%, rgba(255, 255, 255, 0.1)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.1) 75%, rgba(255, 255, 255, 0.1));
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    opacity: 0.3;
}

.img-fallback-text {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

img[width="30"], img[width="35"], img[width="50"], img[width="60"], img[width="80"] {
    min-height: auto !important;
}

.img-fallback-small {
    min-height: 60px !important;
    font-size: 10px !important;
    padding: 5px !important;
}

/* Cookie consent */
.cookie-consent-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.cookie-consent-popup.is-visible {
    display: block;
}

.cookie-consent-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.cookie-consent-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background: #fff;
    width: 100%;
    max-width: 100%;
    padding: 20px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s ease;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent-body {
    margin-bottom: 16px;
}

.cookie-consent-body p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 6px;
}

.cookie-consent-body p strong {
    font-size: 14px;
    color: #333;
}

.cookie-consent-body p a {
    color: #FF9233;
    text-decoration: none;
}

.cookie-consent-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-top: 4px;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    min-width: 108px;
    line-height: 1.2;
    flex-shrink: 0;
}

.cookie-btn-decline {
    background: #f0f0f0;
    color: #666;
}

.cookie-btn-decline:hover {
    background: #e0e0e0;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #FF9233 0%, #FF6B00 100%);
    color: white;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #FF6B00 0%, #FF4500 100%);
}

@media (max-width: 480px) {
    .cookie-consent-footer {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* 右侧悬浮按钮列：WhatsApp（下）→ 回到顶部（中）→ 购物车（上） */
:root {
    --pc-float-right: 20px;
    --pc-float-gap: 14px;
    --pc-float-btn-size: 56px;
    --pc-float-backtop-size: 48px;
    --pc-float-base: 24px;
    /* WhatsApp “Chat with us” 气泡高度，避免遮挡回到顶部 */
    --pc-float-wa-cta-offset: 60px;
}

.wa-widget-send-button {
    bottom: var(--pc-float-base) !important;
    right: var(--pc-float-right) !important;
    margin-bottom: 0 !important;
    margin-right: 0 !important;
}

.wa-chat-box,
.wa-chat-bubble {
    bottom: calc(var(--pc-float-base) + var(--pc-float-btn-size) + var(--pc-float-gap)) !important;
    right: calc(var(--pc-float-right) + var(--pc-float-btn-size) + 12px) !important;
}

.shopcarInfo {
    bottom: calc(var(--pc-float-base) + var(--pc-float-btn-size) + var(--pc-float-gap) + var(--pc-float-wa-cta-offset) + var(--pc-float-backtop-size) + var(--pc-float-gap)) !important;
    right: var(--pc-float-right) !important;
}

.backTop {
    position: fixed;
    right: var(--pc-float-right) !important;
    bottom: calc(var(--pc-float-base) + var(--pc-float-btn-size) + var(--pc-float-gap) + var(--pc-float-wa-cta-offset)) !important;
    width: var(--pc-float-backtop-size) !important;
    height: var(--pc-float-backtop-size) !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #2C2C2C, #1A1A1A) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 9997 !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease !important;
}

.backTop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.backTop:hover {
    background: linear-gradient(135deg, #D4AF37, #B8860B) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.45) !important;
}

.backTop .iconfont {
    font-size: 22px !important;
    color: #fff !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    :root {
        --pc-float-right: 15px;
        --pc-float-gap: 12px;
        --pc-float-btn-size: 50px;
        --pc-float-backtop-size: 44px;
        --pc-float-base: 20px;
        --pc-float-wa-cta-offset: 52px;
    }

    .backTop {
        width: var(--pc-float-backtop-size) !important;
        height: var(--pc-float-backtop-size) !important;
    }

    .backTop .iconfont {
        font-size: 20px !important;
    }

    .wa-chat-box,
    .wa-chat-bubble {
        bottom: calc(var(--pc-float-base) + var(--pc-float-btn-size) + var(--pc-float-gap)) !important;
        right: calc(var(--pc-float-right) + var(--pc-float-btn-size) + 10px) !important;
    }
}

@media (max-width: 480px) {
    :root {
        --pc-float-right: 12px;
        --pc-float-gap: 12px;
        --pc-float-btn-size: 48px;
        --pc-float-backtop-size: 42px;
        --pc-float-base: 16px;
        --pc-float-wa-cta-offset: 48px;
    }

    .backTop {
        width: var(--pc-float-backtop-size) !important;
        height: var(--pc-float-backtop-size) !important;
    }
}
