/* ==============================================
   SSC Single Product Page - Elementor Layout
   ============================================== */

/* ---- Rating ---- */
.elementor-widget-woocommerce-product-rating .woocommerce-product-rating {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
}
.elementor-widget-woocommerce-product-rating .star-rating {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.elementor-widget-woocommerce-product-rating .woocommerce-review-link {
    font-size: 0.85rem !important;
    color: #777 !important;
    text-decoration: none !important;
    visibility: visible !important;
    display: inline !important;
}

/* ---- Price: SGD + large number, no decimals ---- */
.elementor-widget-woocommerce-product-price .price,
.elementor-widget-woocommerce-product-price .woocommerce-Price-amount {
    color: #3b5bdb !important;
}
.elementor-widget-woocommerce-product-price .price {
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
    line-height: 1 !important;
    flex-wrap: wrap !important;
}
.elementor-widget-woocommerce-product-price .price .woocommerce-Price-currencySymbol {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #3b5bdb !important;
}
.elementor-widget-woocommerce-product-price .price .amount {
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    color: #3b5bdb !important;
    line-height: 1 !important;
}
.elementor-widget-woocommerce-product-price .price del .amount {
    font-size: 1rem !important;
    color: #aaa !important;
    font-weight: 400 !important;
}
.elementor-widget-woocommerce-product-price .price del {
    text-decoration: line-through !important;
}
.elementor-widget-woocommerce-product-price .price ins {
    text-decoration: none !important;
}

/* ---- SKU badge (hide or style) ---- */
.elementor-element-68ffd04 .sscsku {
    display: inline-flex !important;
    align-items: center !important;
    background: #f0f0f0 !important;
    color: #555 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 4px 14px 4px 20px !important;
    clip-path: polygon(12px 0%, 100% 0%, 100% 100%, 12px 100%, 0% 50%) !important;
    margin-bottom: 12px !important;
    border: none !important;
}
.elementor-element-68ffd04 .sscsku::before {
    display: none !important;
}

/* ---- Meta: categories / tags ---- */
.elementor-element-1eb2d0a .product_meta {
    margin-bottom: 4px !important;
}
.elementor-element-1eb2d0a .product_meta > span {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 10px !important;
}
.elementor-element-1eb2d0a .product_meta .woocommerce-product-details__short-description { display: none !important; }
.elementor-element-1eb2d0a .product_meta .sku_wrapper { display: none !important; }
.elementor-element-1eb2d0a .product_meta span > a,
.elementor-element-1eb2d0a .product_meta span > span:not(.label) > a {
    display: inline-block !important;
    padding: 4px 12px !important;
    border: 1px solid #d0d0d0 !important;
    font-size: 0.82rem !important;
    color: #333 !important;
    text-decoration: none !important;
    background: #fff !important;
    transition: border-color 0.15s !important;
}
.elementor-element-1eb2d0a .product_meta span > a:hover {
    border-color: #3b5bdb !important;
    color: #3b5bdb !important;
}
.elementor-element-1eb2d0a .product_meta .label {
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    color: #111 !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 4px !important;
}

/* ---- Variation Swatches ---- */
.elementor-element-0544831 .woo-variation-swatches .variable-items-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}
.elementor-element-0544831 .woo-variation-swatches .variable-item {
    border: 1.5px solid #d0d0d0 !important;
    padding: 8px 14px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border-radius: 0 !important;
    height: auto !important;
    min-width: unset !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: border-color 0.15s !important;
}
.elementor-element-0544831 .woo-variation-swatches .variable-item:hover {
    border-color: #3b5bdb !important;
    background: #fff !important;
}
.elementor-element-0544831 .woo-variation-swatches .variable-item.selected {
    border-color: #3b5bdb !important;
    background: #eef2ff !important;
}
.elementor-element-0544831 .woo-variation-swatches .variable-item img {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain !important;
}
.elementor-element-0544831 .woo-variation-swatches .variable-item .variable-item-span,
.elementor-element-0544831 .woo-variation-swatches .variable-item .variable-item-span-name {
    font-size: 0.82rem !important;
    color: #333 !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
}
.elementor-element-0544831 .woo-variation-swatches .variable-item.selected .variable-item-span,
.elementor-element-0544831 .woo-variation-swatches .variable-item.selected .variable-item-span-name {
    color: #3b5bdb !important;
}
/* Remove default swatch background box */
.elementor-element-0544831 .wvs-style-squared .variable-item,
.elementor-element-0544831 .wvs-style-rounded .variable-item {
    border-radius: 0 !important;
}

/* ---- Quantity stepper ---- */
.elementor-element-0544831 .quantity {
    display: flex !important;
    align-items: center !important;
    border: 1.5px solid #d0d0d0 !important;
    width: fit-content !important;
    margin: 0 0 16px !important;
    float: none !important;
    background: #fff !important;
}
.elementor-element-0544831 .ssc-qty-btn {
    width: 38px !important;
    height: 46px !important;
    background: #fff !important;
    border: none !important;
    font-size: 1.3rem !important;
    cursor: pointer !important;
    color: #444 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.12s !important;
    padding: 0 !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}
.elementor-element-0544831 .ssc-qty-btn:hover { background: #f0f0f0 !important; }
.elementor-element-0544831 .quantity input.qty {
    width: 46px !important;
    height: 46px !important;
    text-align: center !important;
    border: none !important;
    border-left: 1.5px solid #d0d0d0 !important;
    border-right: 1.5px solid #d0d0d0 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
}
.elementor-element-0544831 .quantity input.qty::-webkit-outer-spin-button,
.elementor-element-0544831 .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
}

/* Stock text */
.ssc-stock-text {
    font-size: 0.88rem !important;
    color: #555 !important;
    margin-left: 8px !important;
    align-self: center !important;
}

/* Qty + stock in a row */
.elementor-element-0544831 .ssc-qty-stock-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 16px !important;
}

/* ---- Add to cart button (within ssc-cart-row) ---- */
.elementor-element-0544831 .ssc-cart-row {
    display: grid !important;
    grid-template-columns: 48px 1fr 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
    margin-top: 4px !important;
}

/* Wishlist heart */
.ssc-wishlist-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 52px !important;
    border: 1.5px solid #d0d0d0 !important;
    background: #fff !important;
    cursor: pointer !important;
    color: #555 !important;
    transition: border-color 0.15s, color 0.15s !important;
    padding: 0 !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}
.ssc-wishlist-btn:hover {
    border-color: #e74c3c !important;
    color: #e74c3c !important;
}

/* Add to Cart */
.elementor-element-0544831 .ssc-cart-row .single_add_to_cart_button,
.elementor-element-0544831 .ssc-cart-row button[name="add-to-cart"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 52px !important;
    background: #fff !important;
    color: #111 !important;
    border: 1.5px solid #d0d0d0 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 16px !important;
    transition: border-color 0.2s, color 0.2s, background 0.2s !important;
}
.elementor-element-0544831 .ssc-cart-row .single_add_to_cart_button:hover {
    border-color: #3b5bdb !important;
    border-width: 1.5px !important;
    background: #fff !important;
    color: #3b5bdb !important;
}
/* Cart icon in ATC button also turns blue on hover */
.elementor-element-0544831 .ssc-cart-row .single_add_to_cart_button:hover::before {
    color: #3b5bdb !important;
}

/* Buy Now */
.ssc-buy-now-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 52px !important;
    background: #3b5bdb !important;
    color: #fff !important;
    border: none !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.18s !important;
    padding: 0 16px !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}
.ssc-buy-now-btn:hover {
    background: #2f4ac4 !important;
    color: #fff !important;
}

/* Hide default WC place order / loop add to cart from this widget */
.elementor-element-0544831 .woocommerce-variation-add-to-cart-disabled .single_add_to_cart_button {
    opacity: 0.5 !important;
    cursor: default !important;
}

/* Hide YITH default wishlist button */
.elementor-element-0544831 .yith-wcwl-add-to-wishlist,
.yith-wcwl-add-to-wishlist { display: none !important; }

/* WhatsApp button (Elementor button widget 6e20b1c) */
.elementor-element-6e20b1c .elementor-button {
    background: #25d366 !important;
    border-radius: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: 15px 24px !important;
    color: #fff !important;
    text-decoration: none !important;
    transition: background 0.18s !important;
    letter-spacing: 0.3px !important;
    gap: 10px !important;
}
.elementor-element-6e20b1c .elementor-button:hover {
    background: #1ebe5d !important;
    color: #fff !important;
}
.elementor-element-6e20b1c .elementor-button-wrapper {
    width: 100% !important;
}

/* Ensure WC add-to-cart widget takes full width */
.elementor-element-0544831 .elementor-widget-container {
    width: 100% !important;
}
.elementor-element-0544831 .elementor-add-to-cart {
    width: 100% !important;
}

/* ---- Variation selected price ---- */
.ssc-add-to-cart-wrap .woocommerce-variation-price .price,
.ssc-add-to-cart-wrap .woocommerce-variation-price .price .amount {
    color: #3b5bdb !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}
.ssc-add-to-cart-wrap .woocommerce-variation-price {
    margin-bottom: 20px !important;
    display: block !important;
}

/* ---- Add to Cart button: always full size, even when disabled ---- */
.ssc-add-to-cart-wrap .single_add_to_cart_button,
.ssc-add-to-cart-wrap .woocommerce-variation-add-to-cart .single_add_to_cart_button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 52px !important;
    min-height: 52px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    padding: 0 16px !important;
    border-radius: 0 !important;
    gap: 8px !important;
}

/* Disabled state (no variation selected) - same size, just greyed out */
.ssc-add-to-cart-wrap .woocommerce-variation-add-to-cart-disabled .single_add_to_cart_button {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: #7a7a7a !important;
    border-color: #7a7a7a !important;
}

/* Add to cart icon (cart icon from WC default) */
.ssc-cart-row .single_add_to_cart_button::before {
    font-family: WooCommerce !important;
    content: "\e01d" !important;
    font-size: 1rem !important;
    line-height: 1 !important;
}


/* ============================================================
   WPC Bundle Card — swatch-style (matches variation swatches)
   ============================================================ */

.woosb-wrap.woosb-bundled {
    margin: 14px 0 20px !important;
}

.woosb-before-text.woosb-text {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #111 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 10px !important;
    display: block !important;
}

/* Cards grid — CSS Grid for reliable 2-col layout */
.woosb-products,
.woosb-products.woosb-products-layout-grid-2,
.woosb-products.woosb-products-layout-grid-3 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
}

/* Each card — full height flex column */
.woosb-product {
    display: flex !important;
    flex-direction: column !important;
    border: 1.5px solid #d0d0d0 !important;
    background: #fff !important;
    cursor: pointer !important;
    transition: border-color 0.15s, background 0.15s !important;
    padding: 12px 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    user-select: none !important;
    float: none !important;
}

.woosb-product:hover {
    border-color: #3b5bdb !important;
}

/* Selected state — matches .variable-item.selected */
.woosb-product.ssc-bundle-selected {
    border-color: #d0d0d0 !important;
    background: #fff !important;
}

/* Thumbnail */
.woosb-product .woosb-thumb {
    width: 100% !important;
    margin-bottom: 10px !important;
    flex-shrink: 0 !important;
}
.woosb-product .woosb-thumb img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}
.woosb-product .woosb-thumb a {
    display: block !important;
    pointer-events: none !important;
}

/* Title — hide "1 × " text prefix using font-size trick */
.woosb-product .woosb-title {
    flex: 1 !important;
}
.woosb-product .woosb-name {
    font-size: 0 !important;
    margin-bottom: 0 !important;
}
.woosb-product .woosb-name a {
    font-size: 0.8rem !important;
    color: #333 !important;
    text-decoration: none !important;
    pointer-events: none !important;
    display: block !important;
    line-height: 1.35 !important;
}
.woosb-product.ssc-bundle-selected .woosb-name a {
    color: #3b5bdb !important;
}

/* Price — pinned to bottom via auto margin */
.woosb-product .woosb-price {
    margin-top: auto !important;
    padding-top: 8px !important;
    border-top: 1px solid #e8e8e8 !important;
    flex-shrink: 0 !important;
}
.woosb-product .woosb-price-ori {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
}
.woosb-product .woosb-price-ori del {
    font-size: 0.78rem !important;
    color: #aaa !important;
    display: block !important;
}
.woosb-product .woosb-price-ori ins {
    text-decoration: none !important;
    display: block !important;
}
.woosb-product .woosb-price-ori ins .woocommerce-Price-amount {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #3b5bdb !important;
}
.woosb-product .woosb-price-ori del .woocommerce-Price-amount {
    font-size: 0.78rem !important;
    color: #aaa !important;
    font-weight: 400 !important;
}

/* Hide qty stepper — card click replaces it */
.woosb-product .quantity,
.woosb-product .ssc-qty-btn,
.woosb-product .ssc-stock-text {
    display: none !important;
}

/* Hide availability text */
.woosb-product .woosb-availability {
    display: none !important;
}

/* Bundle total row */
.woosb-total {
    margin-top: 14px !important;
    padding-top: 10px !important;
    border-top: 1px solid #eee !important;
    font-size: 0.88rem !important;
    color: #555 !important;
}
.woosb-total .woocommerce-Price-amount {
    color: #3b5bdb !important;
    font-weight: 700 !important;
}

/* Bundle item SKU */
.woosb-product .woosb-item-sku {
    font-size: 0.72rem !important;
    color: #888 !important;
    margin-top: 3px !important;
    display: block !important;
}
.woosb-product.ssc-bundle-selected .woosb-item-sku {
    color: #5c7cfa !important;
}

/* Fix del/ins text-decoration in all price contexts */
p.price del, .price del, .woosb-price del {
    text-decoration: line-through !important;
    text-decoration-line: line-through !important;
}
p.price ins, .price ins, .woosb-price ins {
    text-decoration: none !important;
    text-decoration-line: none !important;
}
