/* ==========================================================
   SECTIONS › PRODUCT DETAIL
   Página de detalhe do produto: visual, zoom modal, copy
   ========================================================== */

/* --- Botão flutuante do carrinho (aparece no catálogo/detalhe) --- */
.floating-cart-checkout {
    position: fixed;
    z-index: 40;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: var(--green-950);
    box-shadow: 0 10px 30px rgba(0, 44, 27, 0.28);
    font-size: 14px;
    font-weight: 900;
}

.floating-cart-checkout:hover,
.floating-cart-checkout:focus-visible {
    color: #fff;
    background: var(--green-700);
    transform: translateY(-2px);
}

.floating-cart-checkout svg { width: 24px; height: 24px; }

.floating-cart-checkout span {
    min-width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    color: var(--green-950);
    background: var(--orange);
    font-size: 12px;
}

/* --- Layout base de páginas transacionais --- */
.product-detail {
    max-width: 1120px;
    margin: 0 auto;
    padding: 58px 24px;
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(320px, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-visual {
    min-height: 430px;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.detail-visual .mini-pouch { width: 150px; height: 245px; padding-top: 52px; }
.detail-visual .ice-bag    { width: 190px; height: 215px; padding-top: 48px; }

.product-detail-image { min-height: 500px; background: #fff; }

.product-image-button {
    width: 100%;
    min-height: 500px;
    position: relative;
    display: grid;
    place-items: center;
    padding: 16px;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.product-image-button > img {
    width: 100%;
    height: 460px;
    display: block;
    object-fit: contain;
}

.zoom-hint {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 63, 38, 0.88);
    font-size: 13px;
    font-weight: 800;
}

.zoom-hint svg,
.zoom-actions svg { width: 18px; height: 18px; }

/* --- Modal de zoom --- */
.product-zoom-modal {
    width: min(1100px, calc(100vw - 32px));
    height: min(850px, calc(100vh - 32px));
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.product-zoom-modal::backdrop { background: rgba(0, 24, 15, 0.8); }

.zoom-toolbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--green-950);
}

.zoom-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zoom-actions button {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--green-950);
    background: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.zoom-actions button:hover,
.zoom-actions button:focus-visible {
    border-color: var(--green-700);
    background: #f1f8ed;
}

.zoom-canvas {
    height: calc(100% - 64px);
    overflow: auto;
    background: #f7f8f5;
}

.zoom-canvas img {
    width: 100%;
    max-width: none;
    min-height: 100%;
    display: block;
    object-fit: contain;
    transition: width 160ms ease;
}

/* --- Copy do produto --- */
.detail-copy h1 {
    margin: 10px 0 16px;
    color: var(--green-950);
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.05;
}

.detail-copy p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
    font-weight: 600;
}

.back-link { color: var(--green-700); font-weight: 800; }

.detail-list {
    list-style: none;
    padding: 0;
    margin: 22px 0;
    display: grid;
    gap: 10px;
    color: #34483f;
    font-weight: 700;
}

.detail-list li { display: flex; gap: 8px; align-items: center; }
.detail-list svg { width: 18px; height: 18px; color: var(--green-700); }

.detail-price {
    display: block;
    margin: 18px 0;
    color: var(--green-950);
    font-size: 34px;
}

.purchase-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
}

.purchase-form label,
.cart-item label,
.checkout-form label {
    display: grid;
    gap: 7px;
    color: var(--green-950);
    font-weight: 800;
}

.purchase-form input,
.cart-item input,
.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
    background: #fffdf8;
}

.purchase-form input { width: 110px; }
