/* ============================================================
   Probar Customer System — Frontend
   Catalog cards · Product page · Mini-cart · Cart · Checkout
   ============================================================ */

/* ===== 1. CATALOG CARDS ===== */

/* Anchor for absolute positioning of corner badge.
   Verified Flatsome DOM: <div class="product-small box"> wraps both
   the image (.box-image) and the text (.box-text). Making this box
   position:relative pins the corner badge to the card's top-left,
   which equals the image's top-left because the image sits at top. */
.product-small.box,
.products .product-small.box,
ul.products li.product .product-small.box {
    position: relative !important;
}

/* Also anchor on the image wrap itself in case Flatsome variants differ */
.products .box-image,
ul.products li.product .box-image {
    position: relative !important;
    overflow: hidden !important;
}

/* The corner badge — bold red chip in the TOP-LEFT corner of the product
   image. JS moves it into .box-image, this CSS pins it.
   Sized to match Flatsome's native sale ribbon (matches the green-example
   reference in size, opposite corner). */
.pcs-corner-badge {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    background: #e63946 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    min-width: 0 !important;
    height: auto !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25) !important;
    z-index: 10 !important;
    display: inline-block !important;
    text-align: center !important;
    letter-spacing: 0.3px !important;
    pointer-events: none !important;
    margin: 0 !important;
}

/* Hide the inline -X% badge inside the price on EVERY product-card context
   (catalog, category, brand archives, related products, upsells, etc.).
   The corner badge already shows the discount on those pages. The single
   product page re-enables it below to keep the inline badge next to price. */
.price .onsale,
.price .pcs-loyalty-badge,
.products .price .onsale,
.products .price .pcs-loyalty-badge,
ul.products li.product .price .onsale,
ul.products li.product .price .pcs-loyalty-badge {
    display: none !important;
}

/* Single product page: bring the inline badge back, sitting inline-right of price */
body.single-product .summary .price .onsale,
body.single-product .summary .price .pcs-loyalty-badge,
body.single-product .product-page-wrapper .price .onsale,
body.single-product .product-page-wrapper .price .pcs-loyalty-badge {
    display: inline-block !important;
}

/* Stacked prices on catalog cards: old above (strikethrough), new below (orange) */
.products .price,
ul.products li.product .price {
    display: block !important;
    line-height: 1.3 !important;
    text-align: center !important;
}
.products .price del,
ul.products li.product .price del {
    display: block !important;
    color: #888 !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
    font-size: 0.9em !important;
    margin: 0 0 2px 0 !important;
    opacity: 1 !important;
}
.products .price del bdi { display: inline !important; }
.products .price ins,
ul.products li.product .price ins {
    display: block !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    color: #d35400 !important;
}

/* ===== 2. SINGLE PRODUCT PAGE ===== */

.single-product .summary .price,
.product-page-wrapper .price {
    line-height: 1.3 !important;
}
.single-product .summary .price del,
.product-page-wrapper .price del {
    display: block !important;
    color: #888 !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
    margin: 0 0 4px 0 !important;
}
.single-product .summary .price ins,
.product-page-wrapper .price ins {
    display: inline-block !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    color: #d35400 !important;
    vertical-align: middle !important;
}

/* Badge sits INLINE on the RIGHT of the orange price */
.single-product .summary .price .onsale,
.single-product .summary .price .pcs-loyalty-badge,
.product-page-wrapper .price .onsale,
.product-page-wrapper .price .pcs-loyalty-badge {
    display: inline-block !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    background: #e63946 !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    margin: 0 0 0 10px !important;
    vertical-align: middle !important;
    box-shadow: none !important;
    letter-spacing: 0.3px !important;
}

/* ===== 3. MINI-CART · CART · CHECKOUT — line strikethrough styling ===== */

.woocommerce-mini-cart del,
.widget_shopping_cart_content del,
.woocommerce-cart .product-subtotal del,
.woocommerce-cart .product-price del,
.woocommerce-checkout .product-total del,
.woocommerce-checkout .product-subtotal del,
table.cart .product-subtotal del,
table.cart .product-price del,
table.shop_table del {
    color: #888 !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
    margin-right: 6px !important;
    opacity: 1 !important;
}

.woocommerce-mini-cart ins,
.widget_shopping_cart_content ins,
.woocommerce-cart .product-subtotal ins,
.woocommerce-cart .product-price ins,
.woocommerce-checkout .product-total ins,
.woocommerce-checkout .product-subtotal ins,
table.cart .product-subtotal ins,
table.cart .product-price ins,
table.shop_table ins {
    text-decoration: none !important;
    font-weight: 700 !important;
    color: #d35400 !important;
}

/* CENA column (cart page) — plain black price + small red %-badge below */
.pcs-cart-price {
    display: inline-block !important;
    color: #1d2327 !important;
    font-weight: 700 !important;
}
.pcs-cart-badge {
    display: inline-block !important;
    background: #e63946 !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 3px 7px !important;
    border-radius: 3px !important;
    margin-top: 4px !important;
    letter-spacing: 0.2px !important;
}

/* MEDJUZBIRNA column — red %-badge sits next to the orange discounted line total */
.pcs-subtotal-badge {
    display: inline-block !important;
    background: #e63946 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    padding: 3px 7px !important;
    border-radius: 3px !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    letter-spacing: 0.2px !important;
}

/* Isprazni korpu button — small spacing left so it sits next to Ažuriraj korpu */
.pcs-empty-cart-btn { margin-left: 8px !important; }

/* ============================================================
   THANK YOU / ORDER RECEIVED PAGE
   /checkout/order-received/<id>/
   ============================================================ */

.woocommerce-order-received .entry-content,
body.woocommerce-order-received .entry-content {
    max-width: 1100px !important;
    margin: 0 auto !important;
}

/* REMOVED: success header + order overview block.
   User prefers a clean page — the Detalji narudžbine section already shows
   the order number, items, totals, payment method, etc. */
.woocommerce-order-received p.woocommerce-thankyou-order-received,
.woocommerce-order-received .woocommerce-notice--success,
.woocommerce-order-received .woocommerce-thankyou-order-received,
.woocommerce-order-received ul.woocommerce-order-overview,
.woocommerce-order-received .woocommerce-order-overview {
    display: none !important;
}

/* Order details panel (the items table block) */
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received section.woocommerce-order-details {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 28px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    margin: 0 0 30px 0 !important;
}
.woocommerce-order-received .woocommerce-order-details h2,
.woocommerce-order-received .woocommerce-order-details > h2.woocommerce-order-details__title {
    margin: 0 0 22px 0 !important;
    color: #1d2327 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    padding-bottom: 14px !important;
    border-bottom: 2px solid #d35400 !important;
}

/* Items table inside the order details */
.woocommerce-order-received table.order_details,
.woocommerce-order-received table.shop_table.order_details {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: none !important;
}
.woocommerce-order-received table.order_details thead th {
    background: #f8f9fa !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.6px !important;
    color: #6c757d !important;
    padding: 14px 14px !important;
    border-bottom: 1px solid #e8e8e8 !important;
    text-align: left !important;
}
.woocommerce-order-received table.order_details thead th:last-child { text-align: right !important; }

.woocommerce-order-received table.order_details tbody td {
    padding: 16px 14px !important;
    border-bottom: 1px solid #f3f3f3 !important;
    color: #2c3e50 !important;
}
.woocommerce-order-received table.order_details tbody td:last-child { text-align: right !important; font-weight: 600 !important; }
.woocommerce-order-received table.order_details tbody tr:hover td { background: #fcfcfc !important; }

.woocommerce-order-received table.order_details tfoot th {
    text-align: right !important;
    color: #555 !important;
    padding: 12px 14px !important;
    background: transparent !important;
    border: none !important;
}
.woocommerce-order-received table.order_details tfoot td {
    text-align: right !important;
    padding: 12px 14px !important;
    color: #2c3e50 !important;
    border: none !important;
    font-weight: 600 !important;
}
.woocommerce-order-received table.order_details tfoot tr:last-child th,
.woocommerce-order-received table.order_details tfoot tr:last-child td {
    border-top: 2px solid #d35400 !important;
    background: #fef5ee !important;
    color: #d35400 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

/* Billing / shipping address columns below */
.woocommerce-order-received .woocommerce-customer-details {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 28px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    margin: 0 0 30px 0 !important;
}
.woocommerce-order-received .woocommerce-customer-details h2 {
    margin: 0 0 16px 0 !important;
    color: #1d2327 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}
.woocommerce-order-received .woocommerce-customer-details address {
    background: #fafafa !important;
    border: 1px solid #efefef !important;
    border-radius: 8px !important;
    padding: 16px !important;
    color: #2c3e50 !important;
    font-style: normal !important;
    line-height: 1.7 !important;
}

/* The intro paragraph above the order box ("Nakon što primimo vašu porudžbinu...") */
.woocommerce-order-received .entry-content > p:not(.woocommerce-thankyou-order-received) {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    padding: 20px 24px !important;
    color: #555 !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03) !important;
}
