/* ============================================
   THANK YOU PAGE — Modern Redesign
   ============================================ */

/* Hide woodmart's default page title */
.page-title.page-title-default.title-size-small.title-design-centered.color-scheme-light,
.page-title.page-title-default {
    display: none;
}

/* ===== Wrapper / Grid ===== */
.thankyoumainwrap {
    max-width: 1080px;
    margin: 40px auto;
    padding: 0 20px;
    display: block;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.thank-you-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    max-width: none;
    margin: 0;
    justify-content: stretch;
}

/* ============================================
   LEFT CARD (.thank-you-block)
   ============================================ */
.thank-you-block {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 20px;
    padding: 32px 32px 28px;
    box-shadow: 0 6px 32px -16px rgba(15, 23, 42, 0.10);
    max-width: none;
    padding-right: 32px;
    text-align: left;
}

.thank-you-block .title-block,
.title-block {
    text-align: left;
    margin-bottom: 22px;
}

.thank-you-block h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    text-align: left;
}

/* ===== Promo block (tinted card) ===== */
.thankyoutext {
    background: linear-gradient(135deg, #fff5f3 0%, #fef0ed 100%);
    border: 1px solid #fde2dc;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thankyoutext-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    text-align: left;
    justify-content: flex-start;
}

.thankyoutext-item:nth-child(2) {
    display: flex;
    align-content: center;
    align-items: center;
}

.thankyoutext-item p {
    margin: 0 !important;
    font-size: 14px !important;
    color: #475569 !important;
    line-height: 1.4 !important;
    margin-right: 0 !important;
}

.thankyoutext-item:nth-child(2) > p {
    margin: 0 !important;
    margin-right: 0 !important;
}

/* The -8% pill (red outlined) */
span.discount {
    display: inline-flex !important;
    align-items: center;
    padding: 3px 11px !important;
    font-size: 12px;
    font-weight: 700;
    color: #FA3B3B;
    background: #fff;
    border-radius: 999px;
    border: 1.5px solid #FA3B3B;
    line-height: 1.3;
    margin: 0 0 0 2px;
    position: static;
    z-index: auto;
}

span.discount::before,
span.discount::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

span.discount > * {
    position: static;
    z-index: auto;
}

/* ===== Promo code pill ===== */
.banner-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    flex-wrap: nowrap;
    text-align: left;
    justify-content: flex-start;
}

.thank-you-block .code,
.code {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    background: #fff;
    border: 1.5px dashed #94a3b8;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #0f172a;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease;
    max-width: none;
    margin: 0;
    line-height: 1.3;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.thank-you-block .code:hover,
.code:hover {
    border-color: #FA3B3B;
    color: #FA3B3B;
}

div#p1 {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

div#p1::after {
    content: '';
    width: 13px;
    height: 13px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain !important;
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
}

span.copied {
    display: none;
    color: #16a34a;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    max-width: none;
    text-align: left;
    width: auto;
}

/* ===== Hint text (replaces italic) ===== */
.thank-you-block i {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 24px 0;
    padding: 0;
    font-style: normal;
    font-size: 12.5px;
    color: #94a3b8;
    line-height: 1.4;
    width: auto;
    justify-content: flex-start;
    text-align: left;
}

.thank-you-block i::before {
    content: '';
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
    margin-top: 1px;
    display: inline-block;
}

/* ============================================
   PRICE BLOCK
   ============================================ */
#woocommerce_product {
    margin: 0 0 16px 0;
}

#woocommerce_product_data {
    display: block;
}

#woocommerce_product_data_prices {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 16px 0;
}

#woocommerce_product_price {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -0.02em;
}

.old-price-items {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

#woocommerce_product_regular_price {
    font-size: 17px;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
    line-height: 1;
}

#item-sale-percent {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    background: #FA3B3B;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

#item-sale-percent:empty {
    display: none;
}

/* ===== Add to Cart Button (keep theme blue, modernize shape only) ===== */
#add_to_cart_button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.18s ease, transform 0.1s ease;
    margin: 0;
    box-sizing: border-box;
}

#add_to_cart_button:hover {
    opacity: 0.92;
}

#add_to_cart_button:active {
    transform: translateY(1px);
}

#proceed_to_checkout_button {
    display: none;
}

#woocommerce_product_order_message,
#woocommerce_product_error_message {
    margin-top: 8px;
    font-size: 13px;
}

#woocommerce_product_error_message:not(:empty) {
    color: #ef4444;
}

#woocommerce_product_order_message:not(:empty) {
    color: #16a34a;
}

/* ===== Download Again Button ===== */
.download-again {
    margin-top: 14px;
}

a.download-button-again {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    padding: 9px 14px !important;
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    color: #475569 !important;
    font-size: 12.5px;
    font-weight: 500;
    width: auto !important;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    text-align: center;
    justify-content: center;
    font-family: inherit;
}

a.download-button-again::before {
    content: '';
    width: 13px;
    height: 13px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: inline-block;
    flex-shrink: 0;
}

a.download-button-again:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* ============================================
   RIGHT CARD (.thank-you-tovar — product)
   ============================================ */
.thank-you-tovar {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 6px 32px -16px rgba(15, 23, 42, 0.10);
    min-width: auto;
}

.thank-you-tovar > a {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: #f8fafc;
    text-align: center;
    line-height: 0;
}

.thank-you-tovar img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.thank-you-tovar:hover img {
    transform: scale(1.02);
}

.tovar-name {
    margin-top: 16px;
    text-align: left;
}

.tovar-name h2 {
    font-size: 17px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    text-align: left !important;
    margin-top: 0 !important;
}

.tovar-name a {
    text-decoration: none !important;
}

.price-tovar {
    margin: 0;
}

.price-tovar:empty {
    display: none;
}

/* ===== Meta (views + comments) ===== */
.meta-tovar {
    margin: 12px 0 0 0;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.meta-tovar:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.meta-tovar-item {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #64748b;
    line-height: 1;
}

/* Глушим любые иконки, которые тема или плагин (Post Views Counter и т.п.)
   могут впихнуть внутрь .meta-tovar-item — чтобы не было дублей */
.meta-tovar-item svg,
.meta-tovar-item img,
.meta-tovar-item i,
.meta-tovar-item .post-views-icon,
.meta-tovar-item .pvc-icon,
.meta-tovar-item .dashicons,
.meta-tovar-item .views-icon,
.meta-tovar-item .post-view-icon,
.meta-tovar-item [class*="icon"]:not(::before):not(::after) {
    display: none !important;
}

/* Свои иконки — глаз для просмотров, чат для комментариев */
.meta-tovar-item:nth-child(1)::before {
    content: '' !important;
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: inline-block !important;
    flex-shrink: 0;
}

.meta-tovar-item:nth-child(2)::before {
    content: '' !important;
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: inline-block !important;
    flex-shrink: 0;
}

/* ============================================
   TELEGRAM BANNER (when no product_price)
   ============================================ */
#contentproducttelegram,
.thank-you-block div#contentproducttelegram {
    height: auto;
    margin-top: 28px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #ecf5ff 0%, #dde9fb 100%);
    border-radius: 16px;
    background-size: auto;
    background-position: initial;
}

#contentproducttelegram .banner-cat,
.thank-you-block div#contentproducttelegram .banner-cat {
    max-width: 100%;
}

#contentproducttelegram .banner-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
    line-height: 1.4;
}

#contentproducttelegram .banner-code {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: auto;
}

#contentproducttelegram .codee a,
.thank-you-block div#contentproducttelegram .codee a,
.codee a {
    background: #2196f3 !important;
    border: none !important;
    border-radius: 8px !important;
    text-transform: none !important;
    padding: 10px 16px !important;
    color: #fff !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    width: auto !important;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
}

#contentproducttelegram .banner-code span,
.thank-you-block .banner-code span {
    font-size: 12.5px;
    color: #64748b;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    line-height: 1.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media screen and (max-width: 900px) {
    .thankyoumainwrap {
        margin: 16px auto;
        padding: 0 12px;
    }

    .thank-you-wrap {
        grid-template-columns: 1fr;
        gap: 16px;
        display: grid;
        flex-wrap: nowrap;
    }

    .thank-you-tovar {
        order: -1;
        min-width: 0;
    }

    .thank-you-block,
    .thank-you-tovar {
        padding: 22px 18px;
        border-radius: 16px;
        max-width: none;
    }

    .thank-you-block {
        text-align: left;
    }

    .thank-you-block h2 {
        font-size: 22px;
        text-align: left;
    }

    .thank-you-block .title-block,
    .title-block {
        text-align: left;
    }

    #woocommerce_product_price {
        font-size: 28px;
    }

    .thankyoutext {
        padding: 14px 16px;
    }

    .thankyoutext-item {
        justify-content: flex-start;
        text-align: left;
    }

    .thank-you-tovar > a {
        max-width: 320px;
        margin: 0 auto;
    }

    .thank-you-tovar img {
        max-width: 100%;
    }

    .tovar-name {
        text-align: center;
    }

    .tovar-name h2 {
        text-align: center !important;
    }

    .meta-tovar {
        justify-content: center;
    }

    .thank-you-block i {
        text-align: left;
        justify-content: flex-start;
    }

    .download-again {
        display: block;
    }

    a.download-button-again {
        max-width: none;
    }

    .banner-code {
        justify-content: flex-start;
        text-align: left;
    }
}

@media screen and (max-width: 480px) {
    .thank-you-block,
    .thank-you-tovar {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .thank-you-block h2 {
        font-size: 20px;
    }

    #woocommerce_product_price {
        font-size: 26px;
    }

    .thankyoutext-item p {
        font-size: 13.5px !important;
    }

    .thank-you-block .code,
    .code {
        font-size: 12.5px;
        padding: 6px 11px;
    }
}

.thank-you-tovar .tovar-name,
.thank-you-tovar .tovar-name h2,
.thank-you-tovar .tovar-name a,
.thank-you-tovar .tovar-name a h2 {
    
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    color:#333 !important;
    position:static !important;
    text-indent:0 !important;
    transform:none !important;
    filter:none !important;
    clip:auto !important;
    -webkit-text-fill-color:#333 !important;
}

.thank-you-tovar .tovar-name a:hover,
.thank-you-tovar .tovar-name a:hover h2 {

    color:#333 !important;
}