/* Página de produto (template v1 - SaaS) */
.product-page {
    padding: var(--spacing-lg) 0;
    min-height: 60vh;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: var(--spacing-md);
}
.breadcrumb-link {
    color: var(--gray);
    text-decoration: none;
}
.breadcrumb-link:hover {
    color: var(--primary);
}
.breadcrumb-sep {
    opacity: 0.7;
}
.breadcrumb-current {
    font-weight: 600;
    color: var(--dark);
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, min(40vw, 100%)) minmax(0, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    align-items: start;
}

/* Galeria */
.product-gallery {
    position: sticky;
    top: 0;
    height: fit-content;
}
.gallery-main {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-zoom {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.gallery-zoom img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 1rem;
}

/* Lightbox imagem (tela cheia) */
#productImageModal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.25s ease;
}

#productImageModal.active {
    opacity: 1;
    visibility: visible;
}

#productImageModal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

#productImageModal .product-image-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: min(980px, 92vw);
    max-height: 92vh;
    overflow: hidden;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.4);
}

#productImageModal .product-image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-bottom: 2px solid #e5e7eb;
}

#productImageModal .product-image-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.2;
}

#productImageModal .modal-close {
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
}

#productImageModal .modal-close:hover {
    background: #e5e7eb;
}

#productImageModal .product-image-modal-body {
    padding: 0.75rem;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#productImageModal .product-image-modal-body img {
    width: 100%;
    height: auto;
    max-height: calc(92vh - 78px);
    object-fit: contain;
    border-radius: 10px;
    background: #ffffff;
}
.gallery-thumbs {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
}
.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}
.gallery-thumbs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 999px;
}
.thumb-item {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    scroll-snap-align: start;
}
.thumb-item.active,
.thumb-item:hover {
    border-color: var(--primary);
}
.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0.25rem;
}

/* Infos */
.product-info-detail {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}
.product-badge-detail {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    width: fit-content;
}
.product-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-title-detail {
    flex: 1;
    min-width: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    margin: 0;
}

.product-title-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.product-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--gray-light, #e2e8f0);
    background: var(--white, #fff);
    color: var(--gray, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-action-btn:hover {
    background: var(--gray-lighter, #f1f5f9);
    color: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
}

.product-action-btn.is-active {
    background: var(--primary, #3b82f6);
    border-color: var(--primary, #3b82f6);
    color: var(--white, #fff);
}

.product-action-btn i {
    font-size: 1.125rem;
}
.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9375rem;
    color: var(--gray);
}
.product-code-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: var(--gray-lighter);
    border: 1px solid var(--gray-light);
    color: var(--dark);
    font-weight: 600;
    white-space: nowrap;
}
.product-code-detail i {
    color: var(--primary);
}
.product-code-detail strong {
    font-weight: 800;
}

.product-meta-label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-left: 0.25rem;
}

.product-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: var(--gray-lighter);
    border: 1px solid var(--gray-light);
    color: var(--dark);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    width: fit-content;
    white-space: nowrap;
}

.product-pill i {
    color: var(--primary);
}

.product-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.product-pill--brand {
    background: #ffffff;
}

.product-price-detail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: var(--spacing-md);
    background: var(--gray-lighter);
    border-radius: 8px;
}
.price-old {
    font-size: 1.1rem;
    color: var(--gray);
    text-decoration: line-through;
}
.price-current {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}
.price-pix-highlight-detail {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: 8px;
}
.price-pix-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    width: fit-content;
}
.price-pix-value-detail {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.price-pix-save {
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.18);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .price-pix-save {
        margin-left: 0;
    }
}
.price-normal-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
}
.price-label-detail {
    color: var(--gray);
}
.price-value-detail {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-dark);
}
.price-installment-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: 8px;
    border: 2px solid var(--gray-light);
}
.installment-label-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
}
.installment-value-detail {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
}
.installment-note-detail {
    margin-left: auto;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Atacado (Preços de Revenda) */
.wholesale-tiers-detail {
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9) 0%, rgba(255, 255, 255, 1) 60%);
}

.wholesale-tiers-detail-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.wholesale-tiers-detail-header i {
    color: #2563eb;
    font-size: 1.1rem;
}

.wholesale-tiers-detail-list {
    display: grid;
    gap: 0.75rem;
}

.wholesale-tier-detail-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.wholesale-tier-detail-item:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.wholesale-tier-detail-item .tier-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
    align-items: end;
}

.wholesale-tier-detail-item .tier-qty-detail,
.wholesale-tier-detail-item .tier-price-detail {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.wholesale-tier-detail-item .tier-qty-detail span:first-child,
.wholesale-tier-detail-item .tier-price-detail span:first-child {
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wholesale-tier-detail-item .tier-qty-detail span:last-child {
    font-size: 1.02rem;
    font-weight: 800;
    color: #0f172a;
}

.wholesale-tier-detail-item .tier-price-detail {
    text-align: right;
}

.wholesale-tier-detail-item .tier-price-detail span:last-child {
    font-size: 1.25rem;
    font-weight: 950;
    color: #1d4ed8;
    letter-spacing: -0.01em;
}

.wholesale-tiers-detail .btn-add-tier {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    white-space: nowrap;
    box-shadow: 0 10px 18px rgba(var(--primary-rgb, 59, 130, 246), 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.wholesale-tiers-detail .btn-add-tier:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 14px 24px rgba(var(--primary-rgb, 59, 130, 246), 0.22);
}

.wholesale-tiers-detail .btn-add-tier:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .wholesale-tier-detail-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .wholesale-tier-detail-item .tier-info {
        grid-template-columns: 1fr 1fr;
    }
    .wholesale-tier-detail-item .tier-price-detail {
        text-align: left;
    }
    .wholesale-tiers-detail .btn-add-tier {
        width: 100%;
    }
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    font-weight: 500;
}
.product-description-short {
    padding: var(--spacing-md);
    background: var(--gray-lighter);
    border-radius: 8px;
    line-height: 1.8;
    color: var(--dark);
}

/* Variações */
.variations-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}
.product-variations {
    padding: var(--spacing-lg);
    background: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
}
.variation-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}
.variation-label i {
    color: var(--primary);
}
.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.color-options .variation-option {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e5ea;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}
.color-options .variation-option.active {
    border-color: var(--primary);
}
.color-options .check-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    opacity: 0;
}
.color-options .variation-option.active .check-icon {
    opacity: 1;
}
.size-options .variation-option,
.material-options .variation-option {
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    border: 2px solid #e5e5ea;
    border-radius: 8px;
    cursor: pointer;
}
.size-options .variation-option.active,
.material-options .variation-option.active {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    border-color: var(--primary);
    color: #ffffff;
}

.variation-select-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
}

.variation-select {
    width: 100%;
    height: 46px;
    padding: 0 2.5rem 0 0.9rem;
    border-radius: 10px;
    border: 2px solid #e5e5ea;
    background: #ffffff;
    color: var(--dark);
    font-weight: 800;
    font-size: 0.95rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.variation-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

.variation-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.variation-select-icon {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

/* Ações */
.product-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}
.qty-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--white);
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 700;
}
.qty-input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: 1px solid var(--gray-light);
    border-right: 1px solid var(--gray-light);
    text-align: center;
    font-weight: 700;
}
.btn-add-cart-detail {
    flex: 1;
    min-width: 220px;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}
.btn-wishlist,
.btn-compare {
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.btn-wishlist:hover,
.btn-compare:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Frete inline */
.product-shipping-inline {
    margin-top: 1rem;
}
.product-shipping-box {
    margin-top: 0.75rem;
    padding: 0.9rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}
.product-shipping-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.35rem;
}
.product-shipping-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.product-shipping-input {
    flex: 1;
    min-width: 160px;
    height: 42px;
    padding: 0 0.85rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
}
.product-shipping-help {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    color: #6b7280;
}
.product-shipping-msg {
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
}
.product-shipping-msg.loading {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
}
.product-shipping-msg--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
/* Resultados: mesmos cards do resumo do carrinho (cart.css — .shipping-option) */
.product-shipping-results-container .shipping-options {
    display: block;
    margin-top: 0.75rem;
}
.product-shipping-results-container .shipping-option__name {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}
.product-shipping-results-container .shipping-option__name-stack {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    text-align: left;
}
.product-shipping-results-container .shipping-option__title-line {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--dark, #0f172a);
    line-height: 1.3;
}
.product-shipping-results-container .shipping-option__prazo-line {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray, #64748b);
}
.product-shipping-results-container .shipping-option__prazo-line--detalhado {
    font-size: 0.75rem;
    line-height: 1.45;
    max-width: 100%;
}

/* Features */
.product-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--gray-lighter);
    border-radius: 8px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.feature-item i {
    color: var(--primary);
}

/* Tabs */
.product-tabs {
    margin-top: var(--spacing-xl);
    border-top: 2px solid var(--gray-light);
    padding-top: var(--spacing-lg);
}
.tabs-header {
    display: flex;
    gap: var(--spacing-sm);
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: var(--spacing-lg);
}
.tab-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray);
    font-weight: 700;
    cursor: pointer;
}
.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}
.specs-table {
    width: 100%;
    border-collapse: collapse;
}
.specs-table tr {
    border-bottom: 1px solid var(--gray-light);
}
.spec-label {
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 700;
    color: var(--dark);
    width: 200px;
    background: var(--gray-lighter);
}
.spec-value {
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--gray);
}

/* Relacionados */
.related-products {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--gray-light);
}
.related-products .section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: var(--spacing-lg);
}

/* Responsivo */
@media (max-width: 1024px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    .product-gallery {
        position: static;
        width: 100%;
    }
}
@media (max-width: 768px) {
    .product-title-row {
        flex-wrap: wrap;
    }
    .product-title-detail {
        font-size: 1.5rem;
    }
    .product-action-btn {
        width: 40px;
        height: 40px;
    }
    .product-action-btn i {
        font-size: 1rem;
    }
    .product-actions {
        flex-direction: column;
    }
    .quantity-selector,
    .btn-add-cart-detail {
        width: 100%;
    }
    .variations-row {
        grid-template-columns: 1fr;
    }
}

