/* ========================================================================
   WizHosting Premium Catalog
   Hijo visual de wiz_outline_standard. No modifica Smarty, rutas ni JS.
   ======================================================================== */

/* Encabezado: título y bajada se leen como una misma presentación. */
#main-content.cart .h1 {
    margin-bottom: 9px;
    max-width: 920px;
}
#main-content.cart .h1 + small.pull-right {
    display: block;
    float: none !important;
    margin: 0 0 28px !important;
    color: #91a3bd !important;
    font-size: 15px;
    line-height: 1.55;
}

/* La grilla conserva la cantidad dinámica de WHMCS, pero sus cartas se
   comportan como un catálogo uniforme y no como paneles independientes. */
#main-content.cart .cart-products > .row.row-eq-height {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-right: -10px;
    margin-left: -10px;
}
#main-content.cart .cart-products > .row.row-eq-height > [class*="col-"] {
    display: block;
    float: none;
    padding-right: 10px;
    padding-left: 10px;
}
#main-content.cart .cart-products > .row.row-eq-height > .col-md-4:only-child {
    margin-left: 33.333333%;
}
#main-content.cart .cart-products > .row.row-eq-height > .col-md-4:first-child:nth-last-child(2) {
    margin-left: 16.666667%;
}

/* Carta de plan --------------------------------------------------------- */
#main-content.cart .cart-products .panel-product {
    display: block;
    flex: none;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 20px;
    overflow: visible;
    background:
        radial-gradient(circle at 92% 4%, rgba(88, 179, 255, .12), transparent 31%),
        linear-gradient(155deg, #182842, #0f1a2c 72%);
    border: 1px solid #304663;
    border-top: 3px solid #58b3ff;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
}
#main-content.cart .cart-products .panel-product.panel-solid-primary {
    background:
        radial-gradient(circle at 88% 2%, rgba(255, 106, 23, .17), transparent 32%),
        linear-gradient(155deg, #202a41, #111b2e 72%);
    border-color: rgba(255, 139, 74, .72);
    border-top-color: #ff6a17;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .30), 0 0 0 1px rgba(255, 106, 23, .08);
}
#main-content.cart .cart-products .panel-product:hover {
    border-color: #58b3ff;
    box-shadow: 0 22px 46px rgba(0, 0, 0, .34), 0 0 0 1px rgba(88, 179, 255, .14);
    transform: translateY(-5px);
}
#main-content.cart .cart-products .panel-product.panel-solid-primary:hover {
    border-color: #ff8543;
}
#main-content.cart .cart-products .panel-product .panel-heading {
    min-height: 142px;
    padding: 22px 22px 18px;
    background: transparent;
    border-bottom: 1px solid rgba(116, 143, 180, .20);
}
#main-content.cart .cart-products .panel-product .panel-title {
    min-height: 51px;
    margin: 0;
    color: #f4f7fc;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.38;
    letter-spacing: -.012em;
}
#main-content.cart .cart-products .product-price {
    margin-top: 12px;
    color: #aab9ce;
}
#main-content.cart .cart-products .product-price > small {
    color: #90a0b7 !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
#main-content.cart .cart-products .product-price .price strong {
    color: #62bcff;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -.03em;
}
#main-content.cart .cart-products .product-price > small:last-child {
    display: inline-block;
    margin-top: 3px;
    letter-spacing: .04em;
}
#main-content.cart .cart-products .panel-product .panel-body {
    display: block;
    flex: none;
    padding: 20px 22px 16px;
    color: #bfccdc;
    font-size: 14px;
    line-height: 1.48;
}
#main-content.cart .cart-products .panel-product .panel-body p {
    margin-bottom: 13px;
}
#main-content.cart .cart-products .panel-product .panel-body .row {
    margin-top: 0;
}
#main-content.cart .cart-products .panel-product [id*="-feature"] {
    position: relative;
    min-height: 25px;
    margin-bottom: 4px;
    padding-left: 20px;
}
#main-content.cart .cart-products .panel-product [id*="-feature"] .fa-check {
    position: absolute;
    top: 5px;
    left: 0;
    color: #36d7ad !important;
    font-size: 11px;
}
#main-content.cart .cart-products .panel-product [id*="-feature"] br {
    display: none;
}
#main-content.cart .cart-products .feature-value {
    color: #edf4fd;
    font-weight: 600;
}
#main-content.cart .cart-products .panel-product .panel-footer {
    margin-top: 0;
    padding: 16px 22px 19px;
    background: rgba(255, 255, 255, .025);
    border-top: 1px solid rgba(116, 143, 180, .20);
}
#main-content.cart .cart-products .panel-product .panel-footer .btn {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    color: #071321 !important;
    background: #58b3ff !important;
    border-color: #58b3ff !important;
    border-radius: 9px;
    box-shadow: 0 4px 0 #217fbd, 0 10px 20px rgba(88, 179, 255, .19);
    font-size: 13px;
    font-weight: 700;
}
#main-content.cart .cart-products .panel-product.panel-solid-primary .panel-footer .btn {
    background: #ff6a17 !important;
    border-color: #ff6a17 !important;
    box-shadow: 0 4px 0 #b9440a, 0 10px 20px rgba(255, 106, 23, .20);
}
#main-content.cart .cart-products .panel-product .panel-footer .btn:hover,
#main-content.cart .cart-products .panel-product .panel-footer .btn:focus {
    color: #071321 !important;
    background: #82cbff !important;
    border-color: #82cbff !important;
}
#main-content.cart .cart-products .panel-product.panel-solid-primary .panel-footer .btn:hover,
#main-content.cart .cart-products .panel-product.panel-solid-primary .panel-footer .btn:focus {
    background: #ff8948 !important;
    border-color: #ff8948 !important;
}
#main-content.cart .cart-products .panel-product .qty {
    float: none !important;
    display: block;
    margin-top: 10px;
    color: #8fa0b8;
    font-size: 12px;
    text-align: center;
}

/* Beneficios del grupo: una banda final más liviana y fácil de escanear. */
#main-content.cart .group-features {
    margin-top: 10px;
}
#main-content.cart .group-features .panel {
    border-top: 2px solid #36d7ad;
    border-radius: 15px;
}
#main-content.cart .group-features .panel-heading {
    padding: 15px 20px;
}
#main-content.cart .group-features .panel-body {
    padding: 18px 20px 12px;
}
#main-content.cart .group-features .panel-body [class*="col-"] {
    min-height: 29px;
    margin-bottom: 7px;
}

/* Resumen de pedido nativo ------------------------------------------------
   WHMCS mantiene #producttotal actualizado por AJAX al cambiar ciclos,
   configurables y complementos del producto. Sólo mejoramos su ubicación
   y lectura; no se duplican importes ni lógica de cálculo. */
#main-content.cart #orderSummary .panel,
#main-content.cart .wiz-premium-live-summary {
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 0, rgba(88, 179, 255, .14), transparent 34%),
        linear-gradient(155deg, #182842, #101b2d 74%);
    border: 1px solid #3d6188;
    border-top: 3px solid #58b3ff;
    border-radius: 15px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}
#main-content.cart #orderSummary .panel-heading,
#main-content.cart .wiz-premium-live-summary__heading {
    padding: 16px 18px;
    background: rgba(255, 255, 255, .025);
    border-bottom-color: rgba(116, 143, 180, .25);
}
#main-content.cart #orderSummary .panel-heading .panel-title,
#main-content.cart .wiz-premium-live-summary__heading strong {
    font-size: 14px;
    letter-spacing: .01em;
}
#main-content.cart #orderSummary .panel-heading .fa-shopping-cart,
#main-content.cart .wiz-premium-live-summary__heading .fa-shopping-cart {
    color: #58b3ff;
}
#main-content.cart #orderSummary .panel-body,
#main-content.cart .wiz-premium-live-summary__body {
    padding: 18px 22px 16px;
}
#main-content.cart #orderSummary .order-summary .table {
    margin-bottom: 0;
    font-size: 13px;
}
#main-content.cart #orderSummary .order-summary .table > tbody > tr > td {
    padding: 10px 0;
    border-color: rgba(116, 143, 180, .20);
    vertical-align: top;
}
#main-content.cart #orderSummary .order-summary .item-title,
#main-content.cart #orderSummary .order-summary strong {
    color: #edf4fd;
}
#main-content.cart #orderSummary .order-summary .totals td {
    padding-top: 13px;
    color: #f4f8ff;
    font-size: 14px;
}
#main-content.cart #orderSummary .order-summary .totals td:last-child strong {
    color: #62bcff;
    font-size: 18px;
}
#main-content.cart #orderSummary .panel-footer {
    padding: 15px 22px 19px;
    background: rgba(255, 255, 255, .028);
    border-top-color: rgba(116, 143, 180, .25);
}
#main-content.cart #orderSummary .panel-footer .btn {
    width: 100%;
    min-height: 43px;
    color: #071321 !important;
    background: #58b3ff !important;
    border-color: #58b3ff !important;
    border-radius: 9px;
    box-shadow: 0 4px 0 #217fbd, 0 9px 18px rgba(88, 179, 255, .18);
    font-size: 13px;
    font-weight: 700;
}
#main-content.cart #orderSummary .panel-footer .btn:hover,
#main-content.cart #orderSummary .panel-footer .btn:focus {
    color: #071321 !important;
    background: #82cbff !important;
    border-color: #82cbff !important;
}
#main-content.cart #orderSummary + .alert {
    margin-top: 14px;
}

/* Vista lateral sincronizada con el resumen nativo. El original de WHMCS
   permanece al final como confirmación completa antes de continuar. */
#main-content.cart .wiz-premium-live-summary {
    position: sticky;
    top: 24px;
    z-index: 2;
    margin: 0 15px 24px;
}
#main-content.cart .wiz-premium-live-summary__heading {
    display: flex;
    align-items: center;
    gap: 9px;
}
#main-content.cart .wiz-premium-live-summary__body .order-summary .table {
    margin-bottom: 0;
    font-size: 13px;
}
#main-content.cart .wiz-premium-live-summary__body .order-summary .table > tbody > tr > td {
    padding: 10px 0;
    border-color: rgba(116, 143, 180, .20);
    vertical-align: top;
}
#main-content.cart .wiz-premium-live-summary__body .order-summary strong {
    color: #edf4fd;
}
#main-content.cart .wiz-premium-live-summary__body .order-summary .totals td:last-child strong {
    color: #62bcff;
    font-size: 18px;
}
#main-content.cart .wiz-premium-live-summary__empty {
    margin: 0;
    color: #93a4bb;
    font-size: 13px;
    line-height: 1.5;
}
#main-content.cart .wiz-premium-live-summary__promo {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 14px;
    padding: 10px;
    color: #cde9ff;
    background: rgba(88, 179, 255, .09);
    border: 1px solid rgba(88, 179, 255, .26);
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.4;
}
#main-content.cart .wiz-premium-live-summary__promo .fa-ticket-alt {
    margin-top: 2px;
    color: #58b3ff;
}
#main-content.cart .wiz-premium-live-summary__promo strong {
    display: block;
    color: #f2f8ff;
}
@media (min-width: 1200px) {
    #main-content.cart #frmConfigureProduct > .row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    #main-content.cart #frmConfigureProduct > .row > div:first-child {
        flex: 0 0 66.666667%;
        width: 66.666667%;
    }
    #main-content.cart #frmConfigureProduct > .row > .wiz-premium-live-summary {
        flex: 0 0 calc(33.333333% - 30px);
        width: calc(33.333333% - 30px);
    }
    #main-content.cart #frmConfigureProduct > .row > div:last-child {
        flex: 0 0 100%;
        width: 100%;
    }
}

@media (max-width: 1199px) {
    /* A partir de este ancho, tres tarjetas compiten con el sidebar y el
       igualado heredado puede convertir la fila en una columna muy alta.
       Pasamos a dos columnas reales y devolvemos cada carta a su alto natural. */
    #main-content.cart .cart-products > .row.row-eq-height > [class*="col-"] { width: 50%; }
    #main-content.cart .cart-products > .row.row-eq-height > .col-md-4:only-child,
    #main-content.cart .cart-products > .row.row-eq-height > .col-md-4:first-child:nth-last-child(2) {
        margin-left: 0;
    }
    #main-content.cart .cart-products > .row.row-eq-height > .col-md-4:only-child {
        margin-left: 25%;
    }
    #main-content.cart .wiz-premium-live-summary {
        position: static;
        margin: 22px 0 24px;
    }
    #main-content.cart #frmConfigureProduct > .row {
        display: block;
    }
    #main-content.cart #frmConfigureProduct > .row > div:first-child,
    #main-content.cart #frmConfigureProduct > .row > div:last-child,
    #main-content.cart #frmConfigureProduct > .row > .wiz-premium-live-summary {
        width: 100%;
    }
}
@media (max-width: 991px) {
    #main-content.cart .cart-products > .row.row-eq-height > .col-md-4:only-child {
        margin-left: 25%;
    }
}
@media (max-width: 767px) {
    #main-content.cart .h1 + small.pull-right {
        margin-bottom: 21px !important;
        font-size: 14px;
    }
    #main-content.cart .cart-products > .row.row-eq-height > [class*="col-"] {
        width: 100%;
        padding-right: 7px;
        padding-left: 7px;
    }
    #main-content.cart .cart-products > .row.row-eq-height {
        margin-right: -7px;
        margin-left: -7px;
    }
    #main-content.cart .cart-products > .row.row-eq-height > .col-md-4:only-child {
        margin-left: 0;
    }
    #main-content.cart .cart-products .panel-product .panel-heading {
        min-height: 0;
    }
}
