/* ============================================================
   HANNA PRODUCT SHORTCODES CSS
   ============================================================ */

/* ---- SECCIÓN 1: GALERÍA ----------------------------------- */

.hanna-gallery-wrap {
    position: relative;
    font-family: inherit;
}

.hanna-badge-featured {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.hanna-gallery-main {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    margin-bottom: 12px;
}

.hanna-gallery-main img.hanna-main-img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
    padding: 16px;
    transition: opacity 0.2s;
}

.hanna-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.hanna-thumb {
    width: 74px;
    height: 74px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hanna-thumb.active,
.hanna-thumb:hover {
    border-color: #005DBD;
}

.hanna-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.hanna-gallery-icons {
    display: flex;
    gap: 0;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 4px;
}

.hanna-icon-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    font-size: 11.5px;
    color: #444;
    border-right: 1px solid #e8e8e8;
    text-align: center;
}

.hanna-icon-item:last-child {
    border-right: none;
}

.hanna-icon-item svg {
    color: #005DBD;
    flex-shrink: 0;
}

/* ---- SECCIÓN 2: INFO DE COMPRA --------------------------- */

.hanna-product-info-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: inherit;
}

.hanna-info-sku {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.hanna-info-title {
    font-size: 26px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
    margin: 0;
}

.hanna-info-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.hanna-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.hanna-info-tags a {
    display: inline-flex;
    align-items: center;
    background: #eef4fd;
    color: #005DBD !important;
    border: 1px solid #b8d4f0;
    border-radius: 6px;
    padding: 5px 13px;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none !important;
    line-height: 1.3;
    transition: background 0.15s, border-color 0.15s;
}

.hanna-info-tags a:hover {
    background: #dce9fb;
    border-color: #005DBD;
}

.hanna-info-price-box {
    background: #f7fbff;
    border: 1px solid #dce9fb;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hanna-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.hanna-price-main {
    font-size: 28px;
    font-weight: 800;
    color: #005DBD;
}

.hanna-price-main .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.hanna-price-tax {
    font-size: 13px;
    color: #888;
}

.hanna-stock-row {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.hanna-stock-available {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #1a9e4e;
    font-weight: 600;
    font-size: 12px;
}

.hanna-stock-available svg {
    color: #1a9e4e;
}

.hanna-stock-count {
    color: #888;
    font-size: 12px;
}

.hanna-stock-unavailable {
    color: #e53e3e;
    font-size: 12px;
    font-weight: 600;
}

.hanna-cotizar-price-label {
    font-size: 18px;
    color: #e53e3e;
    font-weight: 700;
    margin: 0;
}

.hanna-info-qty-cart {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hanna-qty-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
    height: 44px;
}

.hanna-qty-btn {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    color: #444;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hanna-qty-btn:hover {
    background: #e8e8e8;
}

.hanna-qty-input {
    width: 48px;
    border: none;
    border-left: 1px solid #d0d0d0;
    border-right: 1px solid #d0d0d0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    height: 44px;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.hanna-qty-input::-webkit-inner-spin-button,
.hanna-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.hanna-btn-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #005DBD;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    height: 44px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s;
}

.hanna-btn-cart:hover {
    background: #004fa3;
    color: #fff !important;
}

.hanna-info-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hanna-btn-buy {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #e53e3e;
    color: #fff !important;
    border-radius: 6px;
    height: 44px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s;
}

.hanna-btn-buy:hover {
    background: #c53030;
    color: #fff !important;
}

.hanna-btn-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff;
    color: #333 !important;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    height: 44px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    transition: border-color 0.2s, background 0.2s;
}

.hanna-btn-quote:hover {
    border-color: #005DBD;
    color: #005DBD !important;
}

.hanna-info-downloads {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 18px;
}

/* ---- SECCIÓN 3: TABS ------------------------------------- */

.hanna-tabs-wrap {
    font-family: inherit;
}

.hanna-tabs-nav {
    display: flex;
    border-bottom: 2px solid #e8e8e8;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.hanna-tabs-nav::-webkit-scrollbar { display: none; }

.hanna-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.hanna-tab-btn:hover {
    color: #005DBD;
}

.hanna-tab-btn.active {
    color: #005DBD;
    border-bottom-color: #005DBD;
    font-weight: 600;
}

.hanna-tab-panel {
    display: none;
    padding: 24px 0;
    font-size: 14px;
    color: #444;
    line-height: 1.7;
}

.hanna-tab-panel.active {
    display: block;
}

.hanna-tab-description p {
    margin-bottom: 16px;
}

.hanna-tab-specs table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hanna-tab-specs table th,
.hanna-tab-specs table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
}

.hanna-tab-specs table th {
    color: #888;
    font-weight: 500;
    width: 35%;
}

/* ---- SECCIÓN 4: PRODUCTOS COMPLEMENTARIOS ---------------- */

.hanna-related-wrap {
    font-family: inherit;
}

.hanna-related-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
}

.hanna-related-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0 0 20px;
}

.hanna-related-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .hanna-related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .hanna-related-grid { grid-template-columns: 1fr; }
    .hanna-icon-item span { display: none; }
    .hanna-info-qty-cart { flex-wrap: wrap; }
    .hanna-tabs-nav { gap: 0; }
}

.hanna-related-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.hanna-related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}

.hanna-related-img {
    display: block;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.hanna-related-img img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
    padding: 12px;
}

.hanna-related-info {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.hanna-related-sku {
    font-size: 11px;
    color: #999;
}

.hanna-related-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    text-decoration: none;
    display: block;
}

.hanna-related-name:hover { color: #005DBD; }

.hanna-related-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hanna-related-price {
    margin-top: 4px;
}

.hanna-related-price .price,
.hanna-related-price .woocommerce-Price-amount {
    font-size: 17px;
    font-weight: 700;
    color: #005DBD;
}

.hanna-related-price .price del {
    font-size: 12px;
    color: #bbb;
    font-weight: 400;
}

.hanna-related-price .hanna-cotizar-badge {
    display: inline-block;
    padding: 5px 14px;
    border: 1.5px solid #e00;
    border-radius: 20px;
    color: #e00;
    font-size: 12px;
    font-weight: 500;
    background: transparent;
}

/* ---- CARRITO [hanna_cart] --------------------------------- */

.hanna-cart-wrap {
    font-family: inherit;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 48px;
    box-sizing: border-box;
}

.hanna-cart-wrap *,
.hanna-cart-wrap *::before,
.hanna-cart-wrap *::after {
    box-sizing: border-box;
}

.hanna-cart-title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #111 !important;
    margin: 0 0 20px !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.hanna-cart-layout {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 28px !important;
    align-items: start !important;
}

@media (max-width: 860px) {
    .hanna-cart-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Main / items column --- */

.hanna-cart-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #888;
    margin: 0 0 12px;
    text-transform: uppercase;
}

.hanna-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 0;
    color: #aaa;
    font-size: 15px;
}

.hanna-cart-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
}

.hanna-cart-item {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 16px 20px !important;
    background: #fff !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.hanna-cart-item:last-child {
    border-bottom: none;
}

.hanna-cart-item-img {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hanna-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.hanna-cart-item-details {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
}

.hanna-cart-item-name {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #005DBD !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    display: block !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.hanna-cart-item-name:hover {
    text-decoration: underline !important;
}

.hanna-cart-item-sku {
    font-size: 11px;
    color: #999;
}

/* qty stepper en carrito */
.hanna-cart-qty-form {
    display: inline-block !important;
    width: auto !important;
}

.hanna-cart-qty-form .hanna-qty-wrap {
    margin-top: 6px !important;
    width: fit-content !important;
    display: flex !important;
}

.hanna-cart-qty-form .hanna-qty-btn {
    width: 30px !important;
    height: 32px !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.hanna-cart-qty-form .hanna-qty-input {
    width: 40px !important;
    height: 32px !important;
    font-size: 14px !important;
    min-width: 0 !important;
}

.hanna-cart-item-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.hanna-cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #005DBD;
    white-space: nowrap;
}

.hanna-cart-item-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.hanna-cart-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.hanna-cart-remove-btn:hover {
    color: #e53e3e;
}

.hanna-cart-clear-form {
    margin-top: 14px;
}

.hanna-cart-clear-btn {
    background: none;
    border: none;
    color: #005DBD;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hanna-cart-clear-btn:hover {
    color: #004fa3;
}

.hanna-cart-btn-primary {
    display: inline-block;
    background: #005DBD;
    color: #fff !important;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s;
}

.hanna-cart-btn-primary:hover {
    background: #004fa3;
}

/* --- Summary column --- */

.hanna-cart-summary {
    position: sticky;
    top: 24px;
}

.hanna-cart-summary-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hanna-cart-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.hanna-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #444;
}

.hanna-cart-summary-amount {
    font-weight: 600;
    color: #111;
}

.hanna-cart-shipping-note {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.hanna-cart-btn-checkout {
    display: block;
    text-align: center;
    background: #005DBD;
    color: #fff !important;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s;
    margin-top: 4px;
}

.hanna-cart-btn-checkout:hover {
    background: #004fa3;
    color: #fff !important;
}
