/**
 * Avatex Product Page Visual Enhancements
 * Mobile-first CRO overrides — no template changes.
 * Loaded only on single product pages when feature is enabled.
 */

/* =============================================
   1. PRICE — BIGGER, BOLDER, CLEARER
   ============================================= */

.woocommerce div.product .summary .price {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0 !important;
    color: #111;
}

/* Pretul vechi (barrat) — mic, discret */
.woocommerce div.product .summary .price del {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.5;
    color: #888;
}

/* Pretul curent (dupa reducere) — fara underline */
.woocommerce div.product .summary .price ins {
    text-decoration: none;
    font-weight: 700;
    color: #111;
}

/* Pretul „ACUM" label din tema — mai vizibil */
.woocommerce div.product .summary .price .from-text {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =============================================
   2. ADD TO CART BUTTON — ACCENT + URGENTA
   ============================================= */

.woocommerce div.product .summary .single_add_to_cart_button {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border: none !important;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 15px 30px;
    border-radius: 4px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.woocommerce div.product .summary .single_add_to_cart_button:hover {
    background-color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.woocommerce div.product .summary .single_add_to_cart_button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Quantity input — clean */
.woocommerce div.product .summary form.cart .quantity .qty {
    font-size: 16px;
    min-width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* =============================================
   3. DESCRIERE SCURTA — SCANABILA
   ============================================= */

.woocommerce div.product .summary .woocommerce-product-details__short-description {
    line-height: 1.7;
    color: #444;
    font-size: 14px;
    margin-bottom: 18px;
}

/* Bullet points in short description — custom styling */
.woocommerce div.product .summary .woocommerce-product-details__short-description ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.woocommerce div.product .summary .woocommerce-product-details__short-description ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.woocommerce div.product .summary .woocommerce-product-details__short-description ul li::before {
    content: "◆";
    position: absolute;
    left: 0;
    top: 0;
    color: #b8860b;
    font-size: 8px;
    line-height: 1.5;
    padding-top: 5px;
}

/* Paragraphs — tighter on short desc */
.woocommerce div.product .summary .woocommerce-product-details__short-description p {
    margin-bottom: 8px;
}

/* =============================================
   4. SPACING & LAYOUT
   ============================================= */

/* Variable product form — close gap between stock highlight and variation selectors */
.woocommerce div.product .summary form.cart {
    margin-top: 4px !important;
}

.woocommerce div.product .summary .variations {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
}

.woocommerce div.product .summary .single_variation_wrap {
    margin-top: 0 !important;
}

/* Breadcrumb on product pages — compact, hide product name (already shown as H1) */
.single-product .breadcrumb-title-wrapper {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-bottom: 0 !important;
}

/* Hide product name (bare text) from breadcrumb — it's already shown as H1 below */
.single-product .breadcrumbs-container {
    font-size: 0;
}

.single-product .breadcrumbs-container a,
.single-product .breadcrumbs-container .brn_arrow {
    font-size: 12px;
}

/* Hide last arrow (before the hidden product name) */
.single-product .breadcrumbs-container .brn_arrow:last-of-type {
    display: none;
}

/* Theme applies margin-bottom: 100px globally — reduce it */
.woocommerce div.product div.images-thumbnails {
    margin-bottom: 20px !important;
}
.woocommerce div.product div.summary {
    margin-bottom: 40px !important;
}

/* Hide duplicate WC price only when yoox shows a discount (simple products with sale price).
   Variable products have empty yoox block, so p.price must stay visible for them. */
.single-product div.product .summary.entry-summary > .yoox-price-block.yoox-has-discount + .avatex-stock-highlight + p.price {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Theme variation price — redundant when Yoox block handles price display.
   Theme JS unhides it on found_variation, creating a gap. Always hide. */
.single-product div.product .summary.entry-summary > .ts-variation-price {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Empty delivery estimate mobile wrapper — no space */
.avatex-delivery-estimate-mobile:empty {
    display: none !important;
}

.woocommerce div.product .summary .woocommerce-product-rating {
    margin-bottom: 8px !important;
}

/* Title */
.woocommerce div.product .summary .product_title {
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

/* Yoox price block (ACUM + price + Redus de la) */
.woocommerce div.product .summary .yoox-price-block {
    margin-bottom: 10px !important;
}

/* WC price fallback (non-yoox) */
.woocommerce div.product .summary > p.price {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
}

/* Stock highlight */
.woocommerce div.product .summary .avatex-stock-highlight {
    margin-top: 4px !important;
    margin-bottom: 14px !important;
}

/* Meta section — cleaner separator */
.woocommerce div.product .summary .meta-content {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Rating stars bigger */
.woocommerce div.product .summary .woocommerce-product-rating .star-rating {
    font-size: 15px;
}

/* Stock status — green accent */
.woocommerce div.product .summary .availability.in-stock span,
.woocommerce div.product .summary .stock.in-stock {
    color: #2e7d32;
    font-weight: 600;
}

/* =============================================
   5. TABS
   ============================================= */

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    padding: 10px 18px;
    font-size: 14px;
}

.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel {
    line-height: 1.7;
}

/* =============================================
   6. MICRO-INTERACTIONS
   ============================================= */

/* Trust badges subtle entrance */
.avatex-trust-badges {
    animation: avatexFadeInUp 0.4s ease-out;
}

.avatex-delivery-estimate {
    animation: avatexFadeInUp 0.3s ease-out;
}

@keyframes avatexFadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   MOBILE (max-width: 767px)
   ============================================= */

@media only screen and (max-width: 767px) {
    /* Product labels — smaller on mobile single product */
    .woocommerce div.product .images .product-label .onsale,
    .woocommerce div.product .images .product-label .new,
    .woocommerce div.product .images .product-label .featured,
    .woocommerce div.product .images .product-label .out-of-stock {
        font-size: 12px !important;
        height: 26px !important;
        line-height: 24px !important;
        min-width: auto !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .woocommerce div.product .images .product-label > div {
        margin-top: 6px;
    }

    /* Theme sets margin-bottom: 100px on both — way too much on mobile */
    .woocommerce div.product div.images-thumbnails {
        margin-bottom: 12px !important;
    }

    .woocommerce div.product div.summary {
        margin-bottom: 25px !important;
    }

    /* --- Reorder: push description below CRO elements --- */
    .woocommerce div.product .summary.entry-summary {
        display: flex;
        flex-direction: column;
    }

    .woocommerce div.product .summary .woocommerce-product-details__short-description {
        order: 35;
    }

    .woocommerce div.product .summary .meta-content {
        order: 40;
    }

    /* Price — large and clear, keep near top */
    .woocommerce div.product .summary .price {
        font-size: 24px;
        margin-bottom: 4px;
    }

    /* Stock highlight tight under price */
    .woocommerce div.product .summary .avatex-stock-highlight {
        margin-bottom: 4px;
    }

    /* Reduce spacing around add-to-cart form */
    .woocommerce div.product .summary form.cart {
        margin-top: 2px !important;
        margin-bottom: 6px;
    }

    .woocommerce div.product .summary .price del {
        font-size: 15px;
    }

    /* Add to Cart — full width, tall, prominent */
    .woocommerce div.product .summary .single_add_to_cart_button {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 1px;
    }

    /* Summary padding */
    .woocommerce div.product .summary {
        padding-left: 0;
        padding-right: 0;
    }

    .woocommerce div.product .summary .yoox-price-block {
        margin-bottom: 4px;
    }

    .woocommerce div.product .summary .woocommerce-product-details__short-description:empty {
        display: none;
    }

    .woocommerce div.product .summary .variations {
        margin-top: 0 !important;
        margin-bottom: 4px !important;
    }

    /* Short description — collapsible on mobile if too long */
    .woocommerce div.product .summary .woocommerce-product-details__short-description {
        font-size: 13.5px;
        line-height: 1.6;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    /* Wishlist/Compare — row layout */
    .woocommerce div.product .summary .yith-wcwl-add-to-wishlist,
    .woocommerce div.product .summary a.compare {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Tabs — easier to tap */
    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Gallery thumbnails bigger */
    .woocommerce div.product .thumbnails .product-thumbnails li {
        width: 70px;
        height: 70px;
    }

    /* Space for sticky cart at bottom */
    .woocommerce div.product {
        padding-bottom: 70px;
    }
}
