/* ============================================================
   GHOSTEA — PRODUCT DETAIL PAGE REDESIGN
   Dark Emerald & Gold Glassmorphism
   ============================================================ */

.obolochka {
    width: 100%;
    min-height: calc(100vh - 90px);
    margin-top: 90px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

body.ghosteaapp .obolochka {
    margin-top: 20px;
}

/* ──────────────────────────────────────────────
   1. КНОПКА «← В КАТАЛОГ»
   ────────────────────────────────────────────── */

.back_to_catalog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-left: 65px;
    margin-bottom: 24px;
    padding: 6px 0;
    border-radius: 0;
    background: transparent;
    border: none;
    color: rgba(247, 234, 216, 0.75);
    text-decoration: none;
    font-size: 14px;
    font-family: Nunito, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s ease, transform 0.2s ease;
    box-shadow: none;
}

.back_to_catalog:hover {
    color: #EED9BE;
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateX(-3px);
}

/* ──────────────────────────────────────────────
   2. DESKTOP ВЕРСИЯ
   ────────────────────────────────────────────── */

.desktop_version {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.top_cont_desktop {
    display: flex;
    width: 100%;
    min-height: 480px;
    padding: 0 65px;
    gap: 60px;
    box-sizing: border-box;
    align-items: center;
}

/* Фото товара */
.top_cont_desktop .img_product {
    width: 45%;
    max-width: 440px;
    aspect-ratio: 1 / 1;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 24px;
    background: radial-gradient(circle at center, rgba(230, 197, 148, 0.04) 0%, rgba(14, 34, 30, 0.3) 70%);
    box-sizing: border-box;
    flex-shrink: 0;
}

.top_cont_desktop .img_product img {
    width: 100%;
    height: 100%;
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.5));
    transition: transform 0.25s ease, opacity 0.3s ease;
    display: block;
}

.top_cont_desktop .img_product:hover img {
    transform: translateY(-4px);
}

/* Правая панель с описанием и покупкой */
.add_cont_desktop {
    position: relative;
    width: 55%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0E221E;
    border: 1px solid rgba(230, 197, 148, 0.12);
    border-radius: 16px;
    padding: 34px 38px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.name.desktopTxt {
    font-family: Comfortaa, sans-serif;
    font-size: clamp(24px, 2.4vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    color: #F7EAD8;
    margin: 0;
}

.price.desktopTxt {
    font-family: Nunito, sans-serif;
    color: #EED9BE;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

/* Ввод веса / количества */
.weight_cont {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.without_error {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weight_text.desktopTxt {
    font-family: Nunito, sans-serif;
    color: rgba(247, 234, 216, 0.7);
    font-size: 15px;
    font-weight: 600;
}

.weight_input.desktopTxt {
    width: 90px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(230, 197, 148, 0.25);
    background: rgba(3, 20, 17, 0.85);
    color: #F7EAD8;
    font-family: Nunito, sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.weight_input.desktopTxt:focus {
    border-color: rgba(230, 197, 148, 0.6);
    box-shadow: 0 0 0 2px rgba(212, 155, 91, 0.15);
}

.weight_gramm.desktopTxt {
    font-family: Nunito, sans-serif;
    color: rgba(247, 234, 216, 0.7);
    font-size: 15px;
    font-weight: 600;
}

.error {
    color: #ff7a8f;
    font-family: Nunito, sans-serif;
    font-size: 13px;
    display: none;
}

/* Уже выбранный вес */
.ready_weight_cont {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(138, 230, 196, 0.08);
    border: 1px solid rgba(138, 230, 196, 0.25);
    width: fit-content;
}

.weight_text_rady.desktopTxt {
    font-family: Nunito, sans-serif;
    color: #8ae6c4;
    font-size: 14px;
    font-weight: 600;
}

.weight_gram_ready.desktopTxt {
    font-family: Nunito, sans-serif;
    color: #c9ffe9;
    font-size: 15px;
    font-weight: 800;
}

/* Чекбокс целого блина */
.cake_option_cont {
    margin-top: 2px;
}

.cake_option {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(230, 197, 148, 0.06);
    border: 1px solid rgba(230, 197, 148, 0.2);
    transition: all 0.2s ease;
}

.cake_option:hover {
    background: rgba(230, 197, 148, 0.12);
    border-color: rgba(230, 197, 148, 0.4);
}

.cake_option_input {
    accent-color: #EED9BE;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.cake_option_label.desktopTxt {
    font-family: Nunito, sans-serif;
    color: #F7EAD8;
    font-size: 14px;
    font-weight: 600;
}

/* Кнопки действий */
.button_cont {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.add_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 34px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid rgba(230, 197, 148, 0.35);
    color: #0A1715;
    font-family: Nunito, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    background: #EED9BE;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.add_button:hover {
    background: #F7EAD8;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.edit_post_button,
.save_button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid rgba(230, 197, 148, 0.25);
    background: rgba(212, 155, 91, 0.1);
    color: #F7EAD8;
    font-family: Nunito, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit_post_button:hover,
.save_button:hover {
    background: rgba(212, 155, 91, 0.2);
    border-color: rgba(230, 197, 148, 0.5);
    color: #FFF;
}

.delete_post_button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid rgba(255, 122, 143, 0.25);
    background: rgba(255, 122, 143, 0.08);
    color: #ff8c9b;
    font-family: Nunito, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete_post_button:hover {
    background: rgba(255, 122, 143, 0.16);
    border-color: rgba(255, 122, 143, 0.5);
}

.auth_button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 28px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid rgba(230, 197, 148, 0.35);
    background: rgba(212, 155, 91, 0.12);
    color: #F7EAD8;
    font-family: Nunito, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth_button:hover {
    border-color: rgba(230, 197, 148, 0.6);
    background: rgba(212, 155, 91, 0.2);
}

.whithout_button {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 46px;
    border-radius: 8px;
    border: 1px solid rgba(255, 122, 143, 0.25);
    background: rgba(255, 122, 143, 0.06);
    color: rgba(255, 140, 155, 0.85);
    font-family: Nunito, sans-serif;
    font-size: 14px;
    font-weight: 600;
}

/* Описание */
.title_product.desktopTxt {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #D49B5B;
    font-family: Nunito, sans-serif;
    margin-top: 12px;
}

.text_product.desktopTxt {
    font-family: Nunito, sans-serif;
    color: rgba(247, 234, 216, 0.85);
    font-size: 14.5px;
    line-height: 1.65;
    margin: 0;
}

/* ──────────────────────────────────────────────
   3. ХАРАКТЕРИСТИКИ ТОВАРА (ВКУС, АРОМАТ, ЭФФЕКТ...)
   ────────────────────────────────────────────── */

.desktop_data_cont {
    width: 100%;
    margin-top: 40px;
    padding: 0 65px 80px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    background: transparent;
}

.spec_card {
    background: #0E221E;
    border: 1px solid rgba(230, 197, 148, 0.12);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.spec_card:hover {
    transform: translateY(-2px);
    border-color: rgba(230, 197, 148, 0.25);
}

.spec_card .title_product {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #D49B5B;
    font-family: Nunito, sans-serif;
    margin: 0;
}

.spec_card .text_product {
    font-family: Nunito, sans-serif;
    color: rgba(247, 234, 216, 0.88);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0;
}

.mobile_data_cont {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

/* ──────────────────────────────────────────────
   4. МОБИЛЬНАЯ ВЕРСИЯ (< 860px)
   ────────────────────────────────────────────── */

.mobile_version {
    display: none;
}

@media (max-width: 860px) {
    .obolochka {
        margin-top: calc(120px + env(safe-area-inset-top, 0px));
    }

    .desktop_version {
        display: none;
    }

    .mobile_version {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 10px 16px 40px;
        box-sizing: border-box;
    }

    .back_to_catalog {
        margin-left: 0;
        margin-bottom: 16px;
    }

    .mobile_version .img_product {
        width: 100%;
        max-width: 300px;
        aspect-ratio: 1 / 1;
        min-height: 260px;
        margin: 0 auto 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border-radius: 20px;
        background: radial-gradient(circle at center, rgba(230, 197, 148, 0.04) 0%, rgba(14, 34, 30, 0.3) 70%);
        box-sizing: border-box;
    }

    .mobile_version .img_product img {
        width: 100%;
        height: 100%;
        max-width: 280px;
        max-height: 280px;
        object-fit: contain;
        filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.45));
        transition: opacity 0.3s ease;
        display: block;
    }

    .panel {
        width: 100%;
        background: #0E221E;
        border: 1px solid rgba(230, 197, 148, 0.12);
        border-radius: 14px;
        padding: 22px 18px;
        box-sizing: border-box;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .panel .name {
        font-family: Comfortaa, sans-serif;
        font-size: 20px;
        font-weight: 700;
        color: #F7EAD8;
        margin: 0;
        line-height: 1.25;
    }

    .panel .price {
        font-family: Nunito, sans-serif;
        color: #EED9BE;
        font-size: 19px;
        font-weight: 700;
    }

    .panel .weight_text,
    .panel .weight_gramm {
        font-family: Nunito, sans-serif;
        color: rgba(247, 234, 216, 0.7);
        font-size: 14px;
    }

    .panel .weight_input {
        width: 80px;
        height: 38px;
        border-radius: 8px;
        border: 1px solid rgba(230, 197, 148, 0.25);
        background: rgba(3, 20, 17, 0.85);
        color: #F7EAD8;
        font-family: Nunito, sans-serif;
        font-size: 15px;
        font-weight: 700;
        text-align: center;
        outline: none;
    }

    .panel .button_cont {
        width: 100%;
        margin-top: 6px;
    }

    .panel .button_cont .add_button,
    .panel .button_cont .auth_button,
    .panel .button_cont .whithout_button {
        width: 100%;
        height: 44px;
        border-radius: 8px;
        box-sizing: border-box;
        text-align: center;
        justify-content: center;
    }

    .panel .button_cont .edit_post_button,
    .panel .button_cont .save_button,
    .panel .button_cont .delete_post_button {
        flex: 1 1 calc(50% - 6px);
        height: 44px;
        border-radius: 8px;
        box-sizing: border-box;
        justify-content: center;
    }

    .panel .title_product {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #D49B5B;
        font-family: Nunito, sans-serif;
        margin-top: 8px;
    }

    .panel .text_product {
        font-family: Nunito, sans-serif;
        color: rgba(247, 234, 216, 0.85);
        font-size: 14px;
        line-height: 1.6;
        margin: 0;
    }
}
