/* Product detail */
.product-detail {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
}

.product-detail-main {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.7fr);
    gap: var(--space-6);
    align-items: start;
}

.product-detail-main > .product-detail-info:only-child {
    grid-column: 1 / -1;
}

.product-detail-media {
    min-width: 0;
}

.product-detail img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.product-detail .product-thumb {
    width: 100%;
    max-width: 360px;
    max-height: 420px;
    object-fit: cover;
}

.product-image-trigger {
    background: none;
    border: none;
    padding: 0;
    display: block;
    cursor: zoom-in;
}

.product-gallery {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.gallery-thumb-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: zoom-in;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.gallery-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin: 0;
    border: 1px solid var(--border);
}

/* Galeria no formulário de cadastro/edição de produto (staff) */
.gallery-thumbs {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.gallery-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.gallery-thumb--cover {
    max-width: 130px;
    text-align: center;
}

.gallery-thumb img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 0;
}

.lightbox-overlay[hidden] {
    display: none;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 42, 72, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 100;
}

.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    margin: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--paper);
    border: none;
    padding: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-2xl);
    line-height: 1;
    cursor: pointer;
    color: var(--navy);
    z-index: 101;
}

.lightbox-close:hover {
    color: var(--red);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-round);
    background: var(--paper);
    color: var(--navy);
    font-size: var(--fs-2xl);
    line-height: 1;
    cursor: pointer;
    z-index: 101;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-nav:hover { color: var(--red); }

.product-detail h1,
.product-detail h2 {
    font-family: var(--font-display);
    color: var(--navy);
    margin-top: 0;
}

.product-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 1rem 0;
}

.product-feature-tags .badge,
.condition-summary .badge {
    margin-left: 0;
    margin-bottom: 0;
}

.condition-summary {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    border-left: 4px solid var(--navy);
    border-radius: 0 10px 10px 0;
    background: var(--cream);
}

.condition-summary .product-feature-tags {
    margin: 0;
}

.condition-summary .product-feature-tags + p {
    margin-top: 0.7rem;
}

.condition-summary p {
    margin: 0;
}

.condition-summary p + p {
    margin-top: 0.7rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 1.25rem 0;
    padding: 0.45rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--cream);
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-md);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.back-link:hover {
    background: var(--border);
    border-color: var(--navy);
    transform: translateX(-2px);
}

.specs {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
    background: var(--cream);
    border-radius: var(--radius-md);
    padding: 0.5rem 1.25rem;
}

.specs li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: var(--fs-md);
}

.specs li:last-child {
    border-bottom: none;
}

.product-detail .product-price {
    margin: 1rem 0;
}

.product-detail .price-current {
    font-size: var(--fs-xl);
}

.product-detail .product-price--offer .price-current {
    font-size: var(--fs-2xl);
}

.product-detail form {
    display: flex;
    gap: var(--space-3);
    align-items: center;
}

.product-detail input[type="number"] {
    width: 4.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* Buttons */
button,
.btn-checkout,
.btn-whatsapp,
.btn-primary {
    background: var(--red);
    color: white;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity 0.15s ease;
}

button:hover,
.btn-checkout:hover,
.btn-whatsapp:hover,
.btn-primary:hover {
    opacity: 0.9;
}

.btn-whatsapp {
    background: var(--whatsapp);
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-round);
    background: var(--whatsapp);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 50;
    transition: transform 0.15s ease;
}

.whatsapp-float svg {
    width: 1.7rem;
    height: 1.7rem;
    fill: white;
}

.whatsapp-float:hover {
    opacity: 1;
    transform: scale(1.08);
}

.checkout-actions {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--paper);
    color: var(--navy);
    border: 1px solid var(--border);
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: background 0.15s ease;
}

.btn-secondary:hover {
    background: var(--cream);
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid #1E8E4E;
    color: #1E8E4E;
    background: var(--paper);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease;
}

.btn-share:hover {
    background: #E8F6EE;
}

.btn-share svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.pix-payment {
    max-width: 38rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--paper);
}

.pix-payment-qr {
    display: block;
    width: min(280px, 100%);
    height: auto;
    margin: 1rem 0;
    border-radius: var(--radius-sm);
}

.pix-copy-paste {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
    resize: vertical;
}

.copy-pix-status {
    margin-left: 0.75rem;
    color: var(--green-dark, #31572c);
    font-weight: 700;
}
