/*
Theme Name: Storefront Child
Template: storefront
*/


/* =========================================================
   1. ОБЩИЕ ПРАВКИ ДЛЯ СТРАНИЦ КОРЗИНЫ / CHECKOUT / СЕРТИФИКАТА
   ========================================================= */

/* Убираем лишние верхние отступы у основного контента */
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main,
body.single-product.postid-46 .site-main {
    margin-top: 0;
    padding-top: 0;
}

/* Поджимаем стандартный заголовок страницы */
.entry-header {
    padding: 0 0 24px 0 !important;
}

/* Центрируем заголовки товара и страницы */
.product_title,
.entry-title {
    text-align: center;
}

.entry-title {
    margin: 0;
}

/* Скрываем системный блок meta у товара */
.product_meta {
    display: none;
}


/* =========================================================
   2. СТРАНИЦА ТОВАРА "ПОДАРОЧНЫЙ СЕРТИФИКАТ"
   ========================================================= */

/* Общий отступ формы покупки */
.postid-46 form.cart {
    margin-top: 24px;
}

/* Скрываем количество, так как сертификат оформляется по одному */
.postid-46 .quantity {
    display: none;
}


/* =========================================================
   3. КНОПКА "ОФОРМИТЬ СЕРТИФИКАТ"
   ========================================================= */

.postid-46 .single_add_to_cart_button {
    min-width: 220px;
    height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(154.25deg, #8d8d8d -3.08%, #6c6c6c 118.19%);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
    transition: all 0.25s ease;
}

.postid-46 .single_add_to_cart_button:hover {
    background: linear-gradient(154.25deg, #6c6c6c -3.08%, #5b5b5b 118.19%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.postid-46 .single_add_to_cart_button:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.25);
}

/* Убираем float у кнопки WooCommerce */
.postid-46 .woocommerce div.product form.cart .button {
    float: none;
}


/* =========================================================
   4. ОСНОВНОЙ КОНТЕЙНЕР БЛОКА СЕРТИФИКАТА
   ========================================================= */

.postid-46 .olimp-certificate-box {
    margin: 0 0 24px 0;
    padding: 0 28px 28px 28px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(146, 123, 29, 0.10);
}

/* Базовые стили текста внутри блока */
.postid-46 .olimp-certificate-box > strong {
    display: block;
    margin-bottom: 18px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.postid-46 .olimp-certificate-box label {
    color: #333;
    font-size: 16px;
    line-height: 1.4;
}

.postid-46 .olimp-certificate-box textarea {
    line-height: 1.5;
}


/* =========================================================
   5. ШАПКА БЛОКА СЕРТИФИКАТА
   ========================================================= */

.postid-46 .olimp-certificate-head {
    margin-bottom: 24px;
}

.postid-46 .olimp-certificate-head strong {
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
    color: #333;
    text-align: center;
    font-family: "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
}

.postid-46 .olimp-certificate-head p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}


/* =========================================================
   6. СЕКЦИИ ВНУТРИ БЛОКА СЕРТИФИКАТА
   ========================================================= */

.postid-46 .olimp-certificate-section + .olimp-certificate-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f1f1f1;
}

.postid-46 .olimp-certificate-section-title {
    margin-bottom: 14px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.postid-46 .olimp-certificate-help {
    margin-top: 8px;
    color: #8a8a8a;
    font-size: 13px;
    line-height: 1.4;
}


/* =========================================================
   7. ПЛИТКИ НОМИНАЛОВ
   ========================================================= */

.postid-46 .olimp-certificate-amounts {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.postid-46 .olimp-certificate-amount-item {
    display: block;
    margin: 0;
    cursor: pointer;
}

/* Нативные radio скрываем, работаем через span-плитки */
.postid-46 .olimp-certificate-amount-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.postid-46 .olimp-certificate-amount-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 14px 18px;
    box-sizing: border-box;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.postid-46 .olimp-certificate-amount-item:hover span {
    border-color: #8d8d8d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.postid-46 .olimp-certificate-amount-item input[type="radio"]:checked + span {
    border-color: #6c6c6c;
    background: linear-gradient(154.25deg, #8d8d8d -3.08%, #6c6c6c 118.19%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.postid-46 .olimp-certificate-amount-item--custom span {
    font-weight: 600;
}

/* Этот radio используется в других местах до скрытия — оставляем как fallback */
.postid-46 .olimp-certificate-box input[type="radio"] {
    margin-right: 10px;
    accent-color: #6c6c6c;
}


/* =========================================================
   8. ПОЛЯ ВВОДА СЕРТИФИКАТА
   ========================================================= */

.postid-46 #custom-certificate-amount-wrap {
    margin-top: 14px;
}

.postid-46 #custom_certificate_amount,
.postid-46 #certificate_recipient_name,
.postid-46 #certificate_sender_name,
.postid-46 #certificate_recipient_phone,
.postid-46 #certificate_message {
    width: 100% !important;
    max-width: 520px !important;
    min-height: 52px;
    padding: 14px 16px;
    box-sizing: border-box;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.postid-46 #certificate_message {
    min-height: 120px;
    resize: vertical;
}

.postid-46 #custom_certificate_amount::placeholder,
.postid-46 #certificate_recipient_name::placeholder,
.postid-46 #certificate_sender_name::placeholder,
.postid-46 #certificate_recipient_phone::placeholder,
.postid-46 #certificate_message::placeholder {
    color: #9a9a9a;
}

.postid-46 #custom_certificate_amount:focus,
.postid-46 #certificate_recipient_name:focus,
.postid-46 #certificate_sender_name:focus,
.postid-46 #certificate_recipient_phone:focus,
.postid-46 #certificate_message:focus {
    border-color: #8d8d8d;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.12);
    outline: none;
}


/* =========================================================
   9. СЕТКА КОНТАКТНЫХ ДАННЫХ
   ========================================================= */

.postid-46 .olimp-certificate-meta {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f1f1;
}

.postid-46 .olimp-certificate-meta p {
    margin: 0 0 16px;
}

.postid-46 .olimp-certificate-meta label,
.postid-46 .olimp-certificate-grid label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.postid-46 .olimp-certificate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px 18px;
}

.postid-46 .olimp-certificate-grid p {
    margin: 0;
}

.postid-46 .olimp-certificate-grid-full {
    grid-column: 1 / -1;
}


/* =========================================================
   10. СОГЛАСИЕ С ПОЛИТИКОЙ КОНФИДЕНЦИАЛЬНОСТИ
   ========================================================= */

.postid-46 .olimp-certificate-consent {
    margin: 20px 0 0;
    padding-top: 18px;
    border-top: 1px solid #f1f1f1;
}

.postid-46 .olimp-certificate-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.postid-46 .olimp-certificate-consent input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 3px;
    accent-color: #6c6c6c;
}

.postid-46 .olimp-certificate-consent a {
    color: #927b1d;
    text-decoration: underline;
}

.postid-46 .olimp-certificate-consent a:hover {
    color: #d3caa4;
}


/* =========================================================
   11. СЛУЖЕБНЫЕ СООБЩЕНИЯ WOOCOMMERCE НА СТРАНИЦЕ СЕРТИФИКАТА
   ========================================================= */

.postid-46 .woocommerce-message {
    border-top-color: #6c6c6c;
}

.postid-46 .woocommerce-message::before {
    color: #6c6c6c;
}

.postid-46 .woocommerce-error {
    border-top-color: #b94a48;
}


/* =========================================================
   12. СТИЛИ ДЛЯ CHECKOUT-ССЫЛОК / КНОПОК
   ========================================================= */

/* Старый вариант фиксированной ссылки на checkout — оставлен, если вдруг ещё используется */
.olimp-checkout-fixed-actions {
    margin: 16px 0 24px;
}

.olimp-checkout-fixed-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.olimp-checkout-fixed-link:hover {
    border-color: #8d8d8d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: #333;
}

/* Основная кнопка "Изменить сертификат" на checkout */
.olimp-change-certificate-btn,
a.olimp-change-certificate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(154.25deg, #8d8d8d -3.08%, #6c6c6c 118.19%);
    color: #fff !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
    cursor: pointer;
    transition: all 0.25s ease;
}

.olimp-change-certificate-btn:hover,
a.olimp-change-certificate-btn:hover {
    background: linear-gradient(154.25deg, #6c6c6c -3.08%, #5b5b5b 118.19%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.olimp-change-certificate-btn:focus,
a.olimp-change-certificate-btn:focus {
    outline: none;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.25);
}


/* =========================================================
   13. СЛУЖЕБНЫЕ СТИЛИ ДЛЯ PRODUCT META (ОСТАВЛЕНЫ НА БУДУЩЕЕ)
   ========================================================= */

/* Блок скрыт глобально выше, но стили оставлены, если решишь вернуть product_meta */
.postid-46 .product_meta {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #efefef;
}

.postid-46 .product_meta a {
    color: #927b1d;
}

.postid-46 .product_meta a:hover {
    color: #d3caa4;
}


/* =========================================================
   14. АДАПТИВНОСТЬ
   ========================================================= */

@media (max-width: 768px) {
    /* Сужаем основной контейнер на мобильных */
    .postid-46 .olimp-certificate-box {
        padding: 20px 16px;
    }

    /* Кнопка оформления на мобильных — на всю ширину */
    .postid-46 .single_add_to_cart_button {
        width: 100%;
        min-width: 100%;
        margin-top: 12px;
    }

    /* Плитки номиналов — в одну колонку */
    .postid-46 .olimp-certificate-amounts {
        grid-template-columns: 1fr;
    }

    .postid-46 .olimp-certificate-amount-item span {
        min-height: 58px;
        font-size: 15px;
    }

    /* Заголовок блока делаем чуть компактнее */
    .postid-46 .olimp-certificate-head strong {
        font-size: 22px;
    }

    /* Контактные поля на мобильных — в одну колонку */
    .postid-46 .olimp-certificate-grid {
        grid-template-columns: 1fr;
    }

    .postid-46 .olimp-certificate-grid-full {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .olimp-change-certificate-btn,
    a.olimp-change-certificate-btn {
        display: flex;
        width: 100%;
        justify-content: center;
        margin-bottom: 12px;
    }
}

/* Убираем стандартную фиолетовую обводку у полей на checkout */
.woocommerce-checkout input[type="text"]:focus,
.woocommerce-checkout input[type="tel"]:focus,
.woocommerce-checkout input[type="email"]:focus,
.woocommerce-checkout input[type="number"]:focus,
.woocommerce-checkout input[type="password"]:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout .input-text:focus {
    border-color: #8d8d8d !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.12) !important;
    outline: none !important;
}

.wc-block-checkout__guest-checkout-notice, .wc-block-components-checkout-step__heading {
    display: none;
}

/* =========================================================
   15. Политика конфедициальности
   ========================================================= */

.legal-page {
    padding: 40px 0 60px;
    background: #fff;
}

.legal-page__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    color: #333;
    line-height: 1.7;
    font-size: 16px;
}

.legal-page h1 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 36px;
    font-weight: 400;
    color: #333;
}

.legal-page h2 {
    margin: 36px 0 16px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.legal-page p {
    margin: 0 0 16px;
}

.legal-page ul {
    margin: 0 0 20px 20px;
    padding: 0;
}

.legal-page li {
    margin-bottom: 10px;
}

.legal-page a {
    color: #927b1d;
    text-decoration: underline;
}

.legal-page a:hover {
    color: #d3caa4;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 24px 0 40px;
    }

    .legal-page__container {
        font-size: 15px;
        line-height: 1.6;
    }

    .legal-page h1 {
        font-size: 28px;
    }

    .legal-page h2 {
        font-size: 20px;
        margin-top: 28px;
    }
}

/* =========================================================
   16. Блок документов на странице сертификата
   ========================================================= */

.postid-46 .olimp-certificate-documents {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f1f1;
}

.postid-46 .olimp-certificate-documents__title {
    margin-bottom: 14px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.postid-46 .olimp-certificate-documents__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.postid-46 .olimp-certificate-documents__list li {
    margin-bottom: 10px;
}

.postid-46 .olimp-certificate-documents__list a {
    color: #927b1d;
    text-decoration: underline;
    line-height: 1.5;
}

.postid-46 .olimp-certificate-documents__list a:hover {
    color: #d3caa4;
}

/* =========================================================
   17 FIXED-КНОПКА ВОЗВРАТА К ПОКУПКЕ СЕРТИФИКАТА
   На юридических и информационных страницах
   ========================================================= */

.olimp-fixed-back-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 56px;
    padding: 0 24px;

    border: 0;
    border-radius: 4px;

    background: linear-gradient(154.25deg, #8d8d8d -3.08%, #6c6c6c 118.19%);
    color: #fff !important;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: all 0.25s ease;
}

.olimp-fixed-back-button:hover {
    background: linear-gradient(154.25deg, #6c6c6c -3.08%, #5b5b5b 118.19%);
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

.olimp-fixed-back-button:focus {
    outline: none;
    color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.25);
}

/* Мобильная версия: кнопка на всю ширину снизу */
@media (max-width: 768px) {
    .olimp-fixed-back-button {
        right: 16px;
        left: 16px;
        bottom: 16px;
        width: auto;
        min-height: 52px;
        padding: 0 18px;
        font-size: 15px;
    }
}

/* =========================================================
   18 АККОРДЕОН "КАК РАБОТАЕТ ПОДАРОЧНЫЙ СЕРТИФИКАТ"
   ========================================================= */

.postid-46 .olimp-certificate-accordion {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f1f1;
}

.postid-46 .olimp-certificate-accordion__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s ease;
}

.postid-46 .olimp-certificate-accordion__toggle:hover {
    border-color: #8d8d8d;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.postid-46 .olimp-certificate-accordion__toggle:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(102, 102, 102, 0.12);
}

.postid-46 .olimp-certificate-accordion__title {
    display: block;
    padding-right: 16px;
    line-height: 1.3;
}

.postid-46 .olimp-certificate-accordion__icon {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.postid-46 .olimp-certificate-accordion__icon::before,
.postid-46 .olimp-certificate-accordion__icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: #6c6c6c;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.postid-46 .olimp-certificate-accordion__icon::before {
    width: 14px;
    height: 2px;
}

.postid-46 .olimp-certificate-accordion__icon::after {
    width: 2px;
    height: 14px;
}

.postid-46 .olimp-certificate-accordion__toggle[aria-expanded="true"] .olimp-certificate-accordion__icon::after {
    opacity: 0;
}

.postid-46 .olimp-certificate-accordion__content {
    margin-top: 12px;
    padding: 20px 18px 4px;
    border: 1px solid #ececec;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(146, 123, 29, 0.08);
}

.postid-46 .olimp-certificate-accordion__content p {
    margin: 0 0 16px;
    color: #444;
    font-size: 15px;
    line-height: 1.65;
}

.postid-46 .olimp-certificate-accordion__content strong {
    color: #333;
}

@media (max-width: 768px) {
    .postid-46 .olimp-certificate-accordion__toggle {
        min-height: 52px;
        padding: 0 14px;
        font-size: 15px;
    }

    .postid-46 .olimp-certificate-accordion__content {
        padding: 16px 14px 2px;
    }

    .postid-46 .olimp-certificate-accordion__content p {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* =========================================================
   19 СТРАНИЦА ПОСЛЕ ОПЛАТЫ (THANK YOU PAGE)
   ========================================================= */

.woocommerce-order-received .olimp-thankyou-box {
    margin: 24px 0 32px;
    padding: 28px;
    border: 1px solid #ececec;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(146, 123, 29, 0.10);
}

.woocommerce-order-received .olimp-thankyou-box__title {
    margin: 0 0 16px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.woocommerce-order-received .olimp-thankyou-box__text {
    margin: 0 0 14px;
    color: #444;
    font-size: 16px;
    line-height: 1.65;
    text-align: center;
}

.woocommerce-order-received .olimp-thankyou-box__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.woocommerce-order-received .olimp-thankyou-box__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 24px;
    border: 0;
    border-radius: 4px;
    background: linear-gradient(154.25deg, #8d8d8d -3.08%, #6c6c6c 118.19%);
    color: #fff !important;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.10);
    transition: all 0.25s ease;
}

.woocommerce-order-received .olimp-thankyou-box__btn:hover {
    background: linear-gradient(154.25deg, #6c6c6c -3.08%, #5b5b5b 118.19%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.woocommerce-order-received .olimp-thankyou-box__btn--secondary {
    background: #fff;
    border: 1px solid #dcdcdc;
    color: #333 !important;
    box-shadow: none;
}

.woocommerce-order-received .olimp-thankyou-box__btn--secondary:hover {
    background: #fff;
    border-color: #8d8d8d;
    color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .woocommerce-order-received .olimp-thankyou-box {
        padding: 20px 16px;
    }

    .woocommerce-order-received .olimp-thankyou-box__title {
        font-size: 24px;
    }

    .woocommerce-order-received .olimp-thankyou-box__text {
        font-size: 15px;
    }

    .woocommerce-order-received .olimp-thankyou-box__actions {
        flex-direction: column;
    }

    .woocommerce-order-received .olimp-thankyou-box__btn {
        width: 100%;
    }
}