/**
 * Configurable Product Pricing Styles for SimRacing Theme
 * Ensures old-price (regular price) and special-price (discounted price) are displayed correctly
 */

/* Ensure old price is always visible */
.old-price.sly-old-price,
.old-price.sly-old-price .price {
    display: inline-block !important;
}

.old-price.sly-old-price.no-display {
    display: inline-block !important;
}

/* Parent final price styling */
.parent-final-price {
    display: inline-block !important;
    font-weight: bold;
    margin-left: 10px;
    font-size: 1.1em;
}

/* Ensure price wrapper is visible */
.product-info-price .normal-price,
.product-info-price .price-wrapper {
    display: inline-block !important;
    visibility: visible !important;
}

/* Old price styling */
.old-price.sly-old-price,
.old-price {
    margin-right: 10px !important;
}

/* Hide "Regular Price" label */
.product-info-price .old-price .price-label {
    display: none !important;
}

/* Hide "Regular Price" label everywhere (catalog, product page, etc.) */
.old-price .price-label,
.price-box .old-price .price-label,
.page-products .old-price .price-label {
    display: none !important;
}

/* Strike-through for old price */
.product-info-price .old-price .price-wrapper .price {
    text-decoration: line-through !important;
    color: #999 !important;
}

/* Price box display */
.page-products .price-box.price-final_price {
    display: inline-block !important;
    white-space: nowrap !important;
}

.price-box.price-final_price {
    display: inline-block !important;
    white-space: nowrap !important;
}

/* Hide ALL price labels (Regular Price, Special Price, etc.) everywhere */
.price-label,
.price-box .price-label,
.old-price .price-label,
.special-price .price-label {
    display: none !important;
}

/* Special price (discounted) styling */
.special-price .price {
    color: #0078be !important;
    font-weight: 700 !important;
}

/* Catalog listing price display */
.products-grid .price-box,
.products-list .price-box {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0px 0 0px !important; /* Override Luma's 10px 0 25px margin */
}

.products-grid .old-price,
.products-list .old-price {
    order: 2 !important;
}

.products-grid .special-price,
.products-list .special-price {
    order: 1 !important;
}

/* Old price styling in catalog listing */
.products-grid .old-price .price,
.products-list .old-price .price,
.old-price .price {
    text-decoration: line-through !important;
    color: #999 !important;
}

/* Product page price display */
.product-info-price .price-box {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 10px !important;
}

.product-info-price .old-price {
    order: 2 !important;
}

.product-info-price .special-price {
    order: 1 !important;
}

/* Fix price alignment - ensure prices are on the same line */
.product-info-main .product-info-price .price-box .price-container > span:last-child {
    margin-bottom: 5px;
}
