/**
 * ABHO Theme — Single Product Page Styles
 *
 * Provides proper layout, container, and enhanced visuals
 * for WooCommerce single product pages.
 * Scoped to .single-product body class.
 *
 * @package ABHO
 * @since   1.5.2
 */

/* ============================================================
   1. PAGE CONTAINER
   ============================================================ */

.single-product .site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.single-product .content-area {
    width: 100%;
}

.single-product .site-main {
    padding-top: 20px;
    padding-bottom: 60px;
}

/* ============================================================
   2. BREADCRUMB
   ============================================================ */

.single-product .woocommerce-breadcrumb {
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 24px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.single-product .woocommerce-breadcrumb a {
    color: #0057b7;
    text-decoration: none;
    transition: color .15s;
}

.single-product .woocommerce-breadcrumb a:hover {
    color: #003d80;
    text-decoration: underline;
}

/* ============================================================
   3. PRODUCT LAYOUT — Gallery + Summary Grid
   ============================================================ */

.single-product div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

/* Breadcrumb + notices span full width */
.single-product div.product > .woocommerce-breadcrumb,
.single-product div.product > .woocommerce-notices-wrapper {
    grid-column: 1 / -1;
}

/* Gallery column */
.single-product div.product .woocommerce-product-gallery {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

/* Summary column */
.single-product div.product .summary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0;
}

/* Tabs stretch full width */
.single-product div.product .woocommerce-tabs {
    grid-column: 1 / -1;
}

/* Related products stretch full width */
.single-product div.product .related.products {
    grid-column: 1 / -1;
}

/* Product meta stretch full width */
.single-product div.product > .product_meta ~ * {
    grid-column: 1 / -1;
}

/* ============================================================
   4. GALLERY ENHANCEMENTS
   ============================================================ */

.single-product .woocommerce-product-gallery__image img {
    border-radius: 12px;
    width: 100%;
    height: auto;
}

.single-product .woocommerce-product-gallery__image a {
    display: block;
}

/* Remove default WC gallery zoom trigger positioning issues */
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: rgba(255,255,255,.9);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Hide thumbnails ── */
.single-product .flex-control-thumbs {
    display: none !important;
}

/* ── Carousel Navigation Arrows ── */
.single-product .woocommerce-product-gallery .flex-direction-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .92);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    color: #1e293b;
    font-size: 0;
    text-decoration: none;
    transition: all .2s ease;
    cursor: pointer;
    opacity: 0;
}

.single-product .woocommerce-product-gallery:hover .flex-direction-nav a {
    opacity: 1;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    transform: translateY(-50%) scale(1.06);
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev {
    left: 12px;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next {
    right: 12px;
}

/* Arrow icons via pseudo-elements */
.single-product .woocommerce-product-gallery .flex-direction-nav a::before {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-prev::before {
    content: '\2039';
    margin-right: 2px;
}

.single-product .woocommerce-product-gallery .flex-direction-nav a.flex-next::before {
    content: '\203A';
    margin-left: 2px;
}

/* ── Dot indicators ── */
.single-product .woocommerce-product-gallery .flex-control-nav.flex-control-paging {
    display: flex !important;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 0 !important;
    padding: 0;
    list-style: none;
}

.single-product .woocommerce-product-gallery .flex-control-paging li a {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    font-size: 0;
    text-indent: -9999px;
    cursor: pointer;
    transition: all .2s ease;
    border: none;
}

.single-product .woocommerce-product-gallery .flex-control-paging li a:hover {
    background: #9ca3af;
}

.single-product .woocommerce-product-gallery .flex-control-paging li a.flex-active {
    background: #0057b7;
    transform: scale(1.2);
}

/* ============================================================
   5. SUMMARY CONTENT
   ============================================================ */

.single-product .summary .product_title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.25;
}

/* Price */
.single-product .summary > .price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 16px;
}

.single-product .summary > .price del {
    color: #9ca3af;
    font-size: 1rem;
    font-weight: 400;
}

.single-product .summary > .price ins {
    text-decoration: none;
}

/* Stock status */
.single-product .summary .stock {
    font-size: 0.82rem;
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 12px;
}

.single-product .summary .stock.in-stock {
    background: #d1fae5;
    color: #065f46;
}

.single-product .summary .stock.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Short description */
.single-product .woocommerce-product-details__short-description {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 16px;
}

.single-product .woocommerce-product-details__short-description p {
    margin: 0 0 8px;
}

/* Add to cart form */
.single-product .summary form.cart {
    margin-top: 0;
    margin-bottom: 16px;
}

/* Quantity */
.single-product .summary .quantity {
    margin-right: 12px;
}

.single-product .summary .quantity .qty {
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    min-width: 60px;
}

/* Add to cart button */
.single-product .summary .single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, #0057b7, #0073e6);
    color: #fff !important;
    border: none;
    cursor: pointer;
    transition: all .2s;
    text-transform: none;
    letter-spacing: 0;
}

.single-product .summary .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #004a9e, #005ecc);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,87,183,.3);
}

/* Product meta — oculto (informação interna) */
.single-product .product_meta {
    display: none !important;
}

/* ============================================================
   6. TABS
   ============================================================ */

.single-product .woocommerce-tabs {
    margin-top: 0;
}

.single-product .woocommerce-tabs ul.tabs {
    padding: 0 !important;
    margin: 0 0 24px !important;
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    list-style: none;
    overflow: visible !important;
}

.single-product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

.single-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    border-radius: 0 !important;
}

.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
}

.single-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
    text-decoration: none;
    background: none;
}

.single-product .woocommerce-tabs ul.tabs li a:hover {
    color: #0057b7;
}

.single-product .woocommerce-tabs ul.tabs li.active a {
    color: #0057b7;
    border-bottom-color: #0057b7;
}

.single-product .woocommerce-tabs .panel {
    padding: 0;
    margin: 0;
}

.single-product .woocommerce-tabs .panel h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
}

/* ============================================================
   7. EVENTO REGIONAL OVERRIDES
   Scoped to .abho-single-evento for more specifity
   ============================================================ */

/* Hide default price (shown in info-box) */
.abho-single-evento .summary > .price {
    display: none !important;
}

/* Hide stock */
.abho-single-evento .summary .stock {
    display: none !important;
}

/* Full-width add-to-cart for events */
.abho-single-evento .summary .single_add_to_cart_button {
    width: 100%;
}

/* Quantity for events */
.abho-single-evento .summary .quantity {
    margin-right: 0;
    width: 100%;
    margin-bottom: 8px;
}

.abho-single-evento .summary .quantity .qty {
    width: 100%;
}

/* ── Event Info Box ── */
.abho-evento-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border: 1px solid #d0e3f1;
    border-radius: 14px;
    margin-bottom: 16px;
}

.abho-evento-info__item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 160px;
    min-width: 0;
}

.abho-evento-info__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #0057b7;
    color: #fff;
    flex-shrink: 0;
}

.abho-evento-info__icon--price {
    background: #059669;
}

.abho-evento-info__icon--cat {
    background: #7c3aed;
}

.abho-evento-info__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    line-height: 1.2;
}

.abho-evento-info__value {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.abho-evento-info__value--price {
    color: #059669;
}

/* ── Event Highlights Badge ── */
.abho-evento-highlights {
    margin-bottom: 12px;
}

.abho-evento-highlights__badge {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    padding: 6px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e40af;
    line-height: 1.4;
}

.abho-evento-highlights__badge svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Inscription Form ── */
.abho-evento-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.abho-evento-form__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.abho-evento-form__header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0057b7, #0073e6);
    color: #fff;
    flex-shrink: 0;
}

.abho-evento-form__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px;
}

.abho-evento-form__subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
}

.abho-evento-form__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.abho-evento-form__field {
    flex: 1 1 100%;
}

.abho-evento-form__field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 6px;
}

.abho-evento-form__field-icon {
    display: flex;
    color: #0057b7;
    flex-shrink: 0;
}

.abho-evento-form__req {
    color: #ef4444;
    font-weight: 700;
    margin-left: 1px;
}

.abho-evento-form__field input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #f8fafc;
    transition: all .2s ease;
    color: #1e293b;
    box-sizing: border-box;
}

.abho-evento-form__field input:focus {
    border-color: #0057b7;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,87,183,.1);
    outline: none;
}

.abho-evento-form__field input::placeholder {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .single-product div.product {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .single-product .summary .product_title {
        font-size: 1.35rem;
    }
}

@media (max-width: 600px) {
    .single-product .site-content {
        padding: 0 16px;
    }

    .single-product .summary .product_title {
        font-size: 1.2rem;
    }

    .abho-evento-info {
        flex-direction: column;
    }



    .abho-evento-form {
        padding: 16px;
    }
}

/* ============================================================
   9. LIVROS — Layout Premium
   Seletores usam .woocommerce.abho-single-livro div.product
   para superar a especificidade de .woocommerce div.product
   que o WooCommerce usa nos seus próprios estilos.
   ============================================================ */

/* ── Preço: del + ins quando há desconto de membro ── */
.abho-single-livro .summary > .price del {
    display: inline !important;
    color: #9ca3af !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    margin-right: 6px !important;
}

.abho-single-livro .summary > .price ins {
    text-decoration: none !important;
    font-size: 1.7rem !important;
    font-weight: 800 !important;
    color: #059669 !important;
}

/* ── Gallery: sombra de livro físico ── */
.abho-single-livro .woocommerce-product-gallery__image img {
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.12);
}

/* Esconder badge "Oferta!" */
.abho-single-livro .onsale {
    display: none !important;
}

/* Lupa de zoom — posição refinada */
.abho-single-livro .woocommerce-product-gallery__trigger {
    background: rgba(255,255,255,.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    width: 38px;
    height: 38px;
}

/* ── Summary: card branco ── */
.abho-single-livro .summary {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 28px 28px 24px !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    align-self: flex-start;
}

.abho-single-livro .summary .product_title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px;
    line-height: 1.3;
    border-bottom: none;
}

.abho-single-livro .summary > .price {
    display: flex !important;
    align-items: baseline;
    gap: 10px;
    font-size: 1.7rem;
    font-weight: 800;
    color: #059669;
    margin: 6px 0 14px;
    line-height: 1;
}

/* ── Short description: sem scroll ── */
.abho-single-livro .woocommerce-product-details__short-description {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.65;
    color: #374151;
}

.abho-single-livro .woocommerce-product-details__short-description p { margin: 0 0 8px; }
.abho-single-livro .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }
.abho-single-livro .woocommerce-product-details__short-description h3:empty { display: none; }
.abho-single-livro .woocommerce-product-details__short-description hr { display: none; }
.abho-single-livro .woocommerce-product-details__short-description ul,
.abho-single-livro .woocommerce-product-details__short-description ol { padding-left: 20px; margin: 6px 0; }
.abho-single-livro .woocommerce-product-details__short-description li { margin-bottom: 3px; }

/* ── Área de compra ── */
.abho-single-livro .summary form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    margin-top: 0;
}

/* ── Stepper Premium (qty +/-) ── */
.abho-single-livro .abho-stepper {
    display: inline-flex !important;
    align-items: center;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    height: 48px;
    flex-shrink: 0;
    transition: border-color .2s, box-shadow .2s;
}

.abho-single-livro .abho-stepper:hover {
    border-color: #cbd5e1;
}

.abho-single-livro .abho-stepper:focus-within {
    border-color: #0067ac;
    box-shadow: 0 0 0 3px rgba(0,103,172,.12);
}

.abho-single-livro .abho-stepper__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #374151;
    padding: 0;
    transition: background .15s, color .15s, transform .1s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
    outline: none;
}

.abho-single-livro .abho-stepper__btn:hover {
    background: #f1f5f9;
    color: #0067ac;
}

.abho-single-livro .abho-stepper__btn:active {
    background: #e2e8f0;
    transform: scale(.92);
}

.abho-single-livro .abho-stepper__btn--pulse {
    transform: scale(.88);
}

.abho-single-livro .abho-stepper__btn--disabled {
    opacity: .3;
    pointer-events: none;
    cursor: default;
}

.abho-single-livro .abho-stepper__btn--minus {
    border-right: 1px solid #f1f5f9;
}

.abho-single-livro .abho-stepper__btn--plus {
    border-left: 1px solid #f1f5f9;
}

.abho-single-livro .abho-stepper__btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

/* Qty input center */
.abho-single-livro .abho-stepper .qty {
    width: 44px;
    text-align: center;
    border: none !important;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    padding: 0;
    height: 100%;
    -moz-appearance: textfield;
    appearance: textfield;
    outline: none;
}

.abho-single-livro .abho-stepper .qty::-webkit-inner-spin-button,
.abho-single-livro .abho-stepper .qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Botão adicionar — flex grow para ocupar espaço restante */
.abho-single-livro .summary .single_add_to_cart_button {
    flex: 1;
    padding: 13px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #0067ac, #0089e0) !important;
    box-shadow: 0 4px 16px rgba(0,103,172,.25);
    color: #fff !important;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    height: 48px;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.abho-single-livro .summary .single_add_to_cart_button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.1), transparent);
    opacity: 0;
    transition: opacity .25s;
}

.abho-single-livro .summary .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #005590, #006fbb) !important;
    box-shadow: 0 6px 24px rgba(0,103,172,.35);
    transform: translateY(-1px);
}

.abho-single-livro .summary .single_add_to_cart_button:hover::after {
    opacity: 1;
}

.abho-single-livro .summary .single_add_to_cart_button:active {
    transform: translateY(0) scale(.98);
    box-shadow: 0 2px 8px rgba(0,103,172,.25);
}

/* "Em estoque" badge inline */
.abho-single-livro .summary .stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 4px 0 8px;
    padding: 4px 10px;
    border-radius: 20px;
}

.abho-single-livro .summary .stock.in-stock {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.abho-single-livro .summary .stock.in-stock::before {
    content: "●";
    font-size: 0.5rem;
    vertical-align: middle;
}

/* ── Metadata ── */
.abho-single-livro .product_meta {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

/* ══════════════════════════════════════════════════════
   TABS — alta especificidade para superar WooCommerce
   WC usa: .woocommerce div.product .woocommerce-tabs (3 classes)
   Nosso:  .woocommerce.abho-single-livro div.product .woocommerce-tabs (4 classes) → ganha
   ══════════════════════════════════════════════════════ */

/* Container card */
.abho-single-livro .woocommerce-tabs {
    grid-column: 1 / -1;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
    overflow: hidden;
}

/* ul.tabs — reset WC: overflow, padding, position */
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    border-bottom: 2px solid #e5e7eb !important;
    background: #f8fafc !important;
    overflow: visible !important;
    position: static !important;
}

/* Remove borda-bottom decorativa do WC (pseudo ::before no ul) */
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs::before {
    display: none !important;
    content: none !important;
}

.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs::after {
    display: none !important;
    content: none !important;
}

/* li — reset WC: borda, bg cinza, margin negativa, border-radius */
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li {
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    z-index: auto !important;
    position: static !important;
    display: block !important;
}

/* Remove pseudo-elementos de "curva" do WC no li */
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li::after {
    display: none !important;
    content: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Link da aba */
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 14px 24px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    border-bottom: 3px solid transparent !important;
    margin-bottom: -2px !important;
    text-decoration: none !important;
    background: none !important;
    text-shadow: none !important;
    transition: color .2s, border-color .2s !important;
}

.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li a:hover {
    color: #0057b7 !important;
    text-decoration: none !important;
}

/* Aba ativa */
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li.active {
    background: none !important;
    background-color: transparent !important;
    border-bottom-color: transparent !important;
    z-index: auto !important;
}

.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li.active a {
    color: #0057b7 !important;
    border-bottom-color: #0057b7 !important;
    text-shadow: none !important;
}

.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li.active::before,
.woocommerce.abho-single-livro div.product .woocommerce-tabs ul.tabs li.active::after {
    box-shadow: none !important;
    display: none !important;
}

/* Painel de conteúdo */
.abho-single-livro .woocommerce-tabs .panel {
    padding: 28px 32px;
    margin: 0;
}

/* Título interno do painel — esconder o h2 "Informação adicional" redundante */
.abho-single-livro .woocommerce-tabs .panel h2 {
    font-size: 0;
    margin: 0;
    padding: 0;
    border: none;
    height: 0;
    overflow: hidden;
}

/* ── Tabela "Informação adicional" — layout de fichas ── */
.abho-single-livro .shop_attributes {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 0.9rem;
}

.abho-single-livro .shop_attributes tr {
    border: none;
}

.abho-single-livro .shop_attributes th {
    padding: 10px 16px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    width: 140px;
    text-align: left;
    white-space: nowrap;
    border-radius: 8px 0 0 8px;
    border: none;
}

.abho-single-livro .shop_attributes td {
    padding: 10px 16px;
    color: #0f172a;
    font-weight: 500;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    border: none;
}

.abho-single-livro .shop_attributes td p {
    margin: 0;
}

/* ── Avaliações ── */
.abho-single-livro .woocommerce-Reviews-title {
    font-size: 1rem !important;
    font-weight: 700;
    color: #374151;
    margin: 0 0 16px;
}

.abho-single-livro .woocommerce-noreviews {
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.88rem;
    margin: 0 0 24px;
}

/* ══════════════════════════════════════════════════════
   PRODUTOS RELACIONADOS — reset float WooCommerce
   WC: .woocommerce ul.products li.product { float: left; width: 22.05% }
   Aplica a TODAS as single-product (livros, cursos, eventos…)
   ══════════════════════════════════════════════════════ */

.single-product .related.products {
    margin-top: 8px;
}

.single-product .related.products > h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

/* Força grid, descartando clearfix do WC */
.single-product .related.products ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    clear: none !important;
    float: none !important;
}

/* Remove clearfix pseudo-elements que interferem no grid */
.single-product .related.products ul.products::before,
.single-product .related.products ul.products::after {
    display: none !important;
    content: none !important;
}

/* Card de produto — zera float/width do WC */
.single-product .related.products ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 16px !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.05) !important;
    display: flex !important;
    flex-direction: column !important;
    transition: box-shadow .2s, transform .2s;
    position: static !important;
    overflow: visible !important;
}

.single-product .related.products ul.products li.product:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.10) !important;
    transform: translateY(-2px);
}

.single-product .related.products ul.products li.product img {
    border-radius: 8px;
    width: 100% !important;
    height: auto !important;
    display: block;
    margin-bottom: 12px;
    float: none !important;
}

.single-product .related.products .woocommerce-loop-product__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.4;
    flex: 1;
}

.single-product .related.products .price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #059669;
    margin: 0 0 12px;
    display: block;
}

.single-product .related.products .price del {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.82rem;
    margin-right: 4px;
}

.single-product .related.products .price ins {
    text-decoration: none;
}

.single-product .related.products .button {
    display: block !important;
    text-align: center !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    background: #f1f5f9 !important;
    color: #374151 !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    border: 1px solid #e2e8f0 !important;
    transition: all .2s;
    cursor: pointer;
    margin-top: auto;
}

.single-product .related.products .button:hover {
    background: #0057b7 !important;
    color: #fff !important;
    border-color: #0057b7 !important;
}

/* ── Responsivo ── */
@media (max-width: 900px) {
    .abho-single-livro .summary {
        padding: 22px 18px !important;
    }

    .abho-single-livro .summary form.cart {
        gap: 10px;
    }

    .abho-single-livro .abho-stepper {
        height: 44px;
    }

    .abho-single-livro .abho-stepper__btn {
        width: 40px;
    }

    .abho-single-livro .abho-stepper .qty {
        width: 38px;
        font-size: 0.95rem;
    }

    .abho-single-livro .summary .single_add_to_cart_button {
        height: 44px;
        font-size: 0.88rem;
        padding: 10px 16px;
    }

    .abho-single-livro .woocommerce-tabs .panel {
        padding: 20px 16px;
    }

    .single-product .related.products ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .abho-bulk-bar {
        padding: 14px 16px !important;
    }
}

@media (max-width: 480px) {
    .abho-single-livro .summary form.cart {
        flex-direction: column;
        gap: 10px;
    }

    .abho-single-livro .abho-stepper {
        width: 100%;
        justify-content: space-between;
    }

    .abho-single-livro .abho-stepper__btn {
        width: 52px;
    }

    .abho-single-livro .abho-stepper .qty {
        flex: 1;
    }

    .abho-single-livro .summary .single_add_to_cart_button {
        width: 100%;
    }

    .single-product .related.products ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════════════════════
   BARRA DE DESCONTO POR QUANTIDADE (Combo/Bulk)
   ══════════════════════════════════════════════════════ */

.abho-bulk-bar {
    margin: 14px 0 4px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 12px;
}

.abho-bulk-bar--achieved {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
}

.abho-bulk-bar__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.abho-bulk-bar__icon {
    font-size: 1.1rem;
    line-height: 1;
}

.abho-bulk-bar__text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #92400e;
}

.abho-bulk-bar--achieved .abho-bulk-bar__text {
    color: #065f46;
}

.abho-bulk-bar__status {
    font-size: 0.82rem;
    color: #b45309;
    margin-bottom: 10px;
}

.abho-bulk-bar__track {
    height: 8px;
    background: rgba(0,0,0,.08);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}

.abho-bulk-bar__fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    transition: width .4s ease;
    min-width: 4px;
}

.abho-bulk-bar--achieved .abho-bulk-bar__fill {
    background: linear-gradient(90deg, #10b981, #059669);
}

.abho-bulk-bar__labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #92400e;
    font-weight: 500;
    opacity: .8;
}

.abho-bulk-bar--achieved .abho-bulk-bar__labels {
    color: #065f46;
}

/* ══════════════════════════════════════════════════════
   CTA DE LOGIN (visitantes em livros)
   ══════════════════════════════════════════════════════ */

.abho-login-cta {
    margin-top: 16px;
    padding: 24px 20px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    text-align: center;
}

.abho-login-cta__icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.abho-login-cta__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.abho-login-cta__desc {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 16px;
}

.abho-login-cta__btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
}

.abho-login-cta__btn--primary {
    background: linear-gradient(135deg, #0067ac, #0089e0);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,103,172,.2);
    margin-bottom: 8px;
}

.abho-login-cta__btn--primary:hover {
    background: linear-gradient(135deg, #005590, #006fbb);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,103,172,.3);
}

.abho-login-cta__btn--secondary {
    background: #fff;
    color: #374151;
    border: 1.5px solid #e2e8f0;
}

.abho-login-cta__btn--secondary:hover {
    border-color: #0067ac;
    color: #0067ac;
    background: #f0f7ff;
}

/* ══════════════════════════════════════════════════════
   BADGE DE DESCONTO DE MEMBRO (polish)
   ══════════════════════════════════════════════════════ */

.single-product .abho-discount-badge,
.single-product .abho-discount-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 8px 0 !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    line-height: 1.45;
}

.single-product .abho-discount-badge {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
    border: 1px solid #a7f3d0 !important;
    color: #065f46 !important;
}

.single-product .abho-discount-info {
    background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
    border: 1px solid #fde68a !important;
    color: #92400e !important;
}

.single-product .abho-discount-badge .abho-badge__label,
.single-product .abho-discount-info .abho-badge__label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.single-product .abho-discount-badge .abho-badge__desc,
.single-product .abho-discount-info .abho-badge__desc {
    font-weight: 400;
}

@media (max-width: 480px) {
    .single-product .abho-discount-badge,
    .single-product .abho-discount-info {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
        font-size: 0.82rem !important;
        padding: 10px 14px !important;
    }
}

/* ══════════════════════════════════════════════════════
   SINGLE PRODUCT — ASSINATURAS DE REVISTAS
   ══════════════════════════════════════════════════════ */

/* Hide default WC breadcrumb and related products for subscription */
.abho-single-assinatura .woocommerce-breadcrumb,
.abho-single-assinatura .related.products {
    display: none !important;
}

/* Reset grid for subscription layout */
.abho-single-assinatura div.product.abho-sub-single {
    display: block;
}

/* ── Breadcrumb ── */
.abho-sub-single__breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #6b7280;
    margin-bottom: 28px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.abho-sub-single__breadcrumb a {
    color: #0057b7;
    text-decoration: none;
    transition: color 0.15s;
}

.abho-sub-single__breadcrumb a:hover {
    color: #003d80;
    text-decoration: underline;
}

.abho-sub-single__breadcrumb svg {
    flex-shrink: 0;
    color: #cbd5e1;
}

/* ── Hero ── */
.abho-sub-single__hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    margin-bottom: 56px;
    padding: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #e8f0fe 100%);
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.abho-sub-single__hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.abho-sub-single__thumb {
    max-width: 360px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.abho-sub-single__tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0057b7;
    background: rgba(0, 87, 183, 0.08);
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.abho-sub-single__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 12px;
    line-height: 1.25;
}

.abho-sub-single__desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px;
}

.abho-sub-single__price-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}

.abho-sub-single__price {
    font-size: 2rem;
    font-weight: 800;
    color: #0057b7;
}

.abho-sub-single__price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.abho-sub-single__price-period {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.abho-sub-single__features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.abho-sub-single__features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #334155;
    padding: 5px 0;
}

.abho-sub-single__features li svg {
    flex-shrink: 0;
}

/* Add to cart button styling within hero */
.abho-sub-single__hero .cart .single_add_to_cart_button {
    background: linear-gradient(135deg, #0057b7, #003d80);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: none;
}

.abho-sub-single__hero .cart .single_add_to_cart_button:hover {
    background: linear-gradient(135deg, #003d80, #002a5c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 87, 183, 0.3);
}

.abho-sub-single__hero .cart .quantity {
    display: none;
}

/* ── Plans Section ── */
.abho-sub-single__plans-section {
    margin-bottom: 48px;
    text-align: center;
}

.abho-sub-single__plans-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.abho-sub-single__plans-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 32px;
}

.abho-sub-single__plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

/* ── Plan Card ── */
.abho-plan-card {
    position: relative;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 24px;
    text-align: left;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}

.abho-plan-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.abho-plan-card--active {
    border-color: #0057b7;
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
    box-shadow: 0 4px 20px rgba(0, 87, 183, 0.12);
}

.abho-plan-card--featured {
    border-color: #f59e0b;
}

.abho-plan-card__badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.abho-plan-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.abho-plan-card__icon {
    font-size: 1.5rem;
}

.abho-plan-card__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.abho-plan-card__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 12px;
}

.abho-plan-card__amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0057b7;
}

.abho-plan-card__amount .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.abho-plan-card__period {
    font-size: 0.8rem;
    color: #64748b;
}

.abho-plan-card__desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 16px;
}

.abho-plan-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    flex: 1;
}

.abho-plan-card__features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #334155;
    padding: 4px 0;
}

.abho-plan-card__action {
    margin-top: auto;
}

.abho-plan-card__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0057b7;
    background: transparent;
    border: 1.5px solid #0057b7;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.abho-plan-card__btn:hover {
    background: #0057b7;
    color: #fff;
}

.abho-plan-card__current {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0057b7, #003d80);
    border-radius: 10px;
}

/* ── Content Section ── */
.abho-sub-single__content {
    max-width: 720px;
    margin: 0 auto 48px;
    padding: 32px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

.abho-sub-single__content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
}

.abho-sub-single__content p {
    color: #475569;
    line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .abho-sub-single__hero {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .abho-sub-single__hero-image {
        order: -1;
    }

    .abho-sub-single__thumb {
        max-width: 240px;
    }

    .abho-sub-single__title {
        font-size: 1.4rem;
    }

    .abho-sub-single__price {
        font-size: 1.6rem;
    }

    .abho-sub-single__plans-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}
