/**
 * Guest Restrictions - Hide Prices and Add to Cart
 * Applied to all guests (non-logged-in users)
 *
 * @category  WadeRain
 * @package   WadeRain_DealerPortal
 */

/* === HIDE ALL PRICING ELEMENTS FOR GUESTS === */
body:not(.customer-logged-in) .price-box,
body:not(.customer-logged-in) .product-info-price,
body:not(.customer-logged-in) .price-container,
body:not(.customer-logged-in) .price-final_price,
body:not(.customer-logged-in) .old-price,
body:not(.customer-logged-in) .special-price,
body:not(.customer-logged-in) .price-wrapper,
body:not(.customer-logged-in) .minimal-price,
body:not(.customer-logged-in) .price-label,
body:not(.customer-logged-in) [data-price-type],
body:not(.customer-logged-in) .price-tier_price {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === FOR LOGGED-IN CUSTOMERS - HIDE OLD/REGULAR PRICE, SHOW ONLY FINAL === */
body.customer-logged-in .old-price,
body.customer-logged-in .price-label,
body.customer-logged-in [data-price-type="oldPrice"],
body.customer-logged-in [data-price-type="regularPrice"] {
    display: none !important;
}

/* Show only the final price for logged-in customers */
body.customer-logged-in .special-price .price-label {
    display: none !important;
}

body.customer-logged-in .special-price {
    display: block !important;
}

body.customer-logged-in .special-price .price-wrapper,
body.customer-logged-in .special-price .price-container,
body.customer-logged-in .special-price .price {
    display: inline !important;
}

/* Clean up price display - remove "Special Price" label */
body.customer-logged-in .product-info-price .price-box {
    display: block !important;
}

/* === HIDE ALL ADD TO CART ELEMENTS === */
body:not(.customer-logged-in) .action.tocart,
body:not(.customer-logged-in) .tocart,
body:not(.customer-logged-in) button.tocart,
body:not(.customer-logged-in) .box-tocart,
body:not(.customer-logged-in) #product-addtocart-button,
body:not(.customer-logged-in) .product-addto-links,
body:not(.customer-logged-in) .product-social-links,
body:not(.customer-logged-in) [id*="product_addtocart"],
body:not(.customer-logged-in) .fieldset.product-add-form,
body:not(.customer-logged-in) .product-options-wrapper,
body:not(.customer-logged-in) .product-options-bottom,
body:not(.customer-logged-in) form[data-product-sku],
body:not(.customer-logged-in) .product-add-form {
    display: none !important;
    visibility: hidden !important;
}

/* === HIDE QUANTITY SELECTOR === */
body:not(.customer-logged-in) .field.qty,
body:not(.customer-logged-in) .control.qty,
body:not(.customer-logged-in) input[name="qty"],
body:not(.customer-logged-in) .qty-changer {
    display: none !important;
}

/* === HIDE WISHLIST/COMPARE FOR GUESTS === */
body:not(.customer-logged-in) .action.towishlist,
body:not(.customer-logged-in) .action.tocompare,
body:not(.customer-logged-in) a.towishlist,
body:not(.customer-logged-in) a.tocompare {
    display: none !important;
}

/* === CLEAN UP LAYOUT GAPS === */
body:not(.customer-logged-in) .product-info-main .product-info-price,
body:not(.customer-logged-in) .product-item-details .price-box {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* === PRODUCT LISTING ADJUSTMENTS === */
body:not(.customer-logged-in) .product-item-info {
    display: flex;
    flex-direction: column;
}

body:not(.customer-logged-in) .product-item-details {
    flex-grow: 1;
}

body:not(.customer-logged-in) .product-item-actions {
    display: none !important;
}

/* === PRODUCT DETAIL PAGE ADJUSTMENTS === */
body:not(.customer-logged-in) .product-info-main .product-info-stock-sku {
    margin-top: 20px;
}

body:not(.customer-logged-in) .product-info-main .product-reviews-summary {
    margin-top: 10px;
}

/* === SMARTWAVE PORTO THEME SPECIFIC === */
body:not(.customer-logged-in) .porto-product-action,
body:not(.customer-logged-in) .porto-add-to-cart,
body:not(.customer-logged-in) .porto-product-price {
    display: none !important;
}

/* === MXN CURRENCY LABEL === */
.currency-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #666;
    margin-left: 2px;
}

/* Product detail page - larger currency label */
.product-info-main .currency-label {
    font-size: 0.75em;
}

/* Category/listing page - smaller currency label */
.product-item .currency-label,
.product-items .currency-label {
    font-size: 0.8em;
}
