/* =============================================================================
   Cart: auto-update & processing state
   ============================================================================= */

button[name="update_cart"] {
    display: none !important;
}

.woocommerce-cart-form.processing {
    opacity: 0.5;
    pointer-events: none;
}

/* =============================================================================
   Single product: flex layout for add-ons + cart
   ============================================================================= */

.single-product form.cart {
    flex-wrap: wrap !important;
}

.woocommerce-variation-add-to-cart {
    flex-wrap: wrap !important;
}

/* =============================================================================
   Product page: value-added services block
   ============================================================================= */

.blessfa-addons-container {
    width: 100% !important;
    flex: 0 0 100% !important;
    box-sizing: border-box;
    margin: 0 0 20px 0 !important;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #FCF9F2;
}

.blessfa-addons-title {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.blessfa-addons-container label {
    cursor: pointer;
}

.blessfa-addon-row {
    margin-bottom: 0;
}

.blessfa-addon-row--spaced {
    margin-bottom: 8px;
}

.blessfa-eng-input-wrap {
    display: none;
    margin-top: 8px;
}

.blessfa-eng-input-wrap .blessfa-addon-input {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.blessfa-addon-input.is-invalid {
    border: 2px solid #e2401c;
    background-color: #fff9f8;
}

/* =============================================================================
   Shortcode: blessing media viewer page
   ============================================================================= */

.blessfa-blessing-error {
    text-align: center;
    padding: 50px;
}

.blessing-viewer-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Georgia, serif;
}

.blessing-viewer-header {
    text-align: center;
    margin-bottom: 40px;
}

.blessing-viewer-header h1 {
    color: #333;
}

.blessing-viewer-order-id {
    color: #888;
}

.blessing-viewer-video-section {
    margin-bottom: 40px;
}

.blessing-viewer-section-title {
    border-left: 4px solid #d4af37;
    padding-left: 15px;
    margin-bottom: 15px;
}

.blessing-viewer-video-frame {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
}

.blessing-viewer-video-frame video {
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blessing-viewer-video-placeholder {
    padding: 30px;
    background: #f9f9f9;
    border-radius: 10px;
    text-align: center;
}

.blessing-viewer-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.blessing-viewer-gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.blessing-viewer-gallery-grid a:hover img {
    transform: scale(1.02);
}

.blessing-viewer-footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
    color: #aaa;
    font-size: 12px;
}

/* =============================================================================
   Product page: Consecration Modal & Layout
   ============================================================================= */

.blessfa-consecration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blessfa-ritual-link {
    font-size: 13px;
    color: #888;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.blessfa-ritual-link:hover {
    color: #D4AF37;
}

/* Modal Overlay (Background) */
.blessfa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* 增加背景磨砂高级感 */
}

/* Modal Box */
.blessfa-modal-content {
    background: #fff;
    width: 90%;
    max-width: 420px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    position: relative;
}

.blessfa-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Video Wrapper 16:9 Aspect Ratio */
.blessfa-modal-video-wrapper {
    background: #000;
    position: relative;
    padding-top: 56.25%;
}

.blessfa-modal-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal Text & Button */
.blessfa-modal-text {
    padding: 25px 20px;
}

.blessfa-modal-text h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-family: 'Playfair Display', Georgia, serif; /* 使用衬线体提升仪式高级感 */
    font-size: 18px;
}

.blessfa-modal-text p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.blessfa-modal-btn {
    width: 100%;
    padding: 12px;
    background-color: #D4AF37; /* 契合求财站的暗金色 */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s;
}

.blessfa-modal-btn:hover {
    background-color: #B5952F;
    color: #fff;
}