/* =========================================================
   GAPPTI - Estilo institucional para portal OpenCart
   ========================================================= */

:root {
    --gappti-blue: #004b93;
    --gappti-blue-dark: #003b73;
    --gappti-blue-light: #eaf4ff;
    --gappti-blue-soft: #f7fbff;
    --gappti-green: #0f9d58;
    --gappti-text: #263238;
    --gappti-muted: #607d8b;
    --gappti-border: #d9e2ec;
    --gappti-white: #ffffff;
    --gappti-shadow: 0 8px 24px rgba(0, 44, 95, 0.08);
}

/* Base general */
body {
    background: #f4f7fb;
    color: var(--gappti-text);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--gappti-blue);
}

a:hover {
    color: var(--gappti-blue-dark);
}

/* Encabezados */
h1, h2, h3, h4, h5 {
    color: var(--gappti-blue-dark);
    font-weight: 700;
}

/* Contenedores principales */
#content {
    background: transparent;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 12px 0;
    margin-bottom: 18px;
}

.breadcrumb-item a {
    color: var(--gappti-blue);
    text-decoration: none;
}

/* Header */
header {
    background: var(--gappti-white);
}

#top {
    background: var(--gappti-blue-dark) !important;
    color: var(--gappti-white);
    border-bottom: none;
}

#top a,
#top .btn-link {
    color: var(--gappti-white) !important;
    text-decoration: none;
}

#top a:hover,
#top .btn-link:hover {
    color: #d8ecff !important;
}

/* Logo / zona superior */
#logo img {
    max-height: 72px;
}

/* Buscador */
#search input {
    border-radius: 10px 0 0 10px;
    border: 1px solid var(--gappti-border);
}

#search button {
    border-radius: 0 10px 10px 0;
    background: var(--gappti-blue);
    border-color: var(--gappti-blue);
    color: var(--gappti-white);
}

#search button:hover {
    background: var(--gappti-blue-dark);
    border-color: var(--gappti-blue-dark);
}

/* Carrito header */
#cart .btn {
    background: var(--gappti-green);
    border-color: var(--gappti-green);
    color: var(--gappti-white);
    border-radius: 10px;
    font-weight: 600;
}

#cart .btn:hover {
    background: #0b7f47;
    border-color: #0b7f47;
}

/* Menú principal */
#menu {
    background: var(--gappti-blue) !important;
    border: none;
    border-radius: 0;
}

#menu .navbar-nav > li > a,
#menu .nav-link {
    color: var(--gappti-white) !important;
    font-weight: 600;
}

#menu .navbar-nav > li > a:hover,
#menu .nav-link:hover {
    background: var(--gappti-blue-dark);
    color: var(--gappti-white) !important;
}

/* Tarjetas y paneles generales */
.card,
.list-group,
.table,
.dropdown-menu {
    border: 1px solid var(--gappti-border);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 44, 95, 0.04);
}

/* Productos en listado */
.product-thumb {
    background: var(--gappti-white);
    border: 1px solid var(--gappti-border);
    border-radius: 14px;
    box-shadow: var(--gappti-shadow);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 44, 95, 0.12);
}

.product-thumb .content,
.product-thumb .caption {
    padding: 16px;
}

.product-thumb h4,
.product-thumb h4 a {
    color: var(--gappti-blue-dark);
    font-weight: 700;
    text-decoration: none;
}

.product-thumb .price {
    color: var(--gappti-blue);
    font-size: 20px;
    font-weight: 700;
}

/* Botones */
.btn-primary {
    background: var(--gappti-blue);
    border-color: var(--gappti-blue);
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--gappti-blue-dark);
    border-color: var(--gappti-blue-dark);
}

.btn-success {
    background: var(--gappti-green);
    border-color: var(--gappti-green);
    border-radius: 10px;
    font-weight: 600;
}

.btn-light,
.btn-default {
    border-radius: 10px;
    border-color: var(--gappti-border);
}

/* Ficha del producto */
#product-info,
#product {
    background: var(--gappti-white);
    border: 1px solid var(--gappti-border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: var(--gappti-shadow);
}

#product-info h1 {
    color: var(--gappti-blue-dark);
}

#product-info .price-new,
#product-info h2,
#product h2 {
    color: var(--gappti-blue);
    font-weight: 700;
}

/* Avisos */
.alert {
    border-radius: 12px;
}

.alert-warning {
    background: #fff8e5;
    border-color: #f1d27a;
    color: #5f4700;
}

.alert-info {
    background: var(--gappti-blue-light);
    border-color: #b7d8f2;
    color: var(--gappti-blue-dark);
}

.alert-success {
    background: #e9f7ef;
    border-color: #bde5ce;
    color: #0b6b3a;
}

/* Carrito */
#checkout-cart h1,
#checkout-checkout h1 {
    color: var(--gappti-blue-dark);
}

#checkout-cart .table,
#checkout-checkout .table {
    background: var(--gappti-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--gappti-shadow);
}

#checkout-cart .table thead th,
#checkout-checkout .table thead th {
    background: var(--gappti-blue);
    color: var(--gappti-white);
    border-color: var(--gappti-blue);
}

#checkout-total tr:last-child td {
    background: var(--gappti-blue-soft);
    color: var(--gappti-blue-dark);
    font-size: 16px;
}

/* Checkout */
#checkout-checkout .card,
#checkout-checkout fieldset,
#checkout-checkout .accordion-item {
    background: var(--gappti-white);
    border: 1px solid var(--gappti-border);
    border-radius: 14px;
    box-shadow: var(--gappti-shadow);
    padding: 18px;
    margin-bottom: 18px;
}

#checkout-checkout legend,
#checkout-checkout h2,
#checkout-checkout h3 {
    color: var(--gappti-blue-dark);
    font-weight: 700;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid var(--gappti-border);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gappti-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 75, 147, 0.12);
}

/* Métodos de envío y pago */
#checkout-shipping-method,
#checkout-payment-method {
    background: var(--gappti-white);
    border: 1px solid var(--gappti-border);
    border-radius: 14px;
    box-shadow: var(--gappti-shadow);
    padding: 18px;
}

/* Pantalla de éxito GAPPTI */
.gappti-success-box {
    max-width: 760px;
    margin: 30px auto;
    padding: 34px 36px;
    background: var(--gappti-white);
    border: 1px solid var(--gappti-border);
    border-radius: 14px;
    box-shadow: var(--gappti-shadow);
    text-align: center;
}

.gappti-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px auto;
    border-radius: 50%;
    background: var(--gappti-green);
    color: var(--gappti-white);
    font-size: 42px;
    line-height: 72px;
    font-weight: 700;
}

.gappti-success-box h2 {
    margin: 0 0 14px 0;
    color: var(--gappti-blue);
    font-size: 28px;
    font-weight: 700;
}

.gappti-main-text {
    color: var(--gappti-text);
    font-size: 17px;
    margin-bottom: 24px;
}

.gappti-info-card {
    text-align: left;
    background: var(--gappti-blue-soft);
    border: 1px solid #cfe3f5;
    border-left: 6px solid var(--gappti-blue);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 22px 0;
}

.gappti-info-card p {
    margin: 0 0 12px 0;
    color: var(--gappti-text);
    font-size: 15px;
    line-height: 1.5;
}

.gappti-info-card p:last-child {
    margin-bottom: 0;
}

.gappti-info-card strong {
    color: var(--gappti-blue);
}

.gappti-alert {
    margin-top: 22px;
    padding: 14px 18px;
    background: var(--gappti-blue-light);
    border: 1px solid #b7d8f2;
    border-radius: 10px;
    color: var(--gappti-blue-dark);
    font-size: 14px;
    text-align: left;
}

/* =========================================================
   GAPPTI - Home institucional
   ========================================================= */

.gappti-home-hero {
    background: #ffffff;
    border: 1px solid var(--gappti-border);
    border-radius: 18px;
    box-shadow: var(--gappti-shadow);
    padding: 34px;
    margin: 24px 0 30px 0;
}

.gappti-home-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 30px auto;
}

.gappti-home-badge {
    display: inline-block;
    background: var(--gappti-blue-light);
    color: var(--gappti-blue-dark);
    border: 1px solid #b7d8f2;
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.gappti-home-header h1 {
    color: var(--gappti-blue);
    font-size: 34px;
    margin: 0 0 12px 0;
    font-weight: 800;
}

.gappti-home-header p {
    color: var(--gappti-muted);
    font-size: 17px;
    margin: 0;
}

.gappti-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0 34px 0;
}

.gappti-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--gappti-blue-soft);
    border: 1px solid #cfe3f5;
    border-radius: 14px;
    padding: 18px;
}

.gappti-step-number {
    min-width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gappti-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
}

.gappti-step h3 {
    margin: 0 0 6px 0;
    color: var(--gappti-blue-dark);
    font-size: 17px;
}

.gappti-step p {
    margin: 0;
    color: var(--gappti-muted);
    font-size: 14px;
    line-height: 1.45;
}

.gappti-product-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.gappti-product-card {
    background: #ffffff;
    border: 1px solid var(--gappti-border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(0, 44, 95, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gappti-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0, 44, 95, 0.12);
}

.gappti-product-tag {
    display: inline-block;
    background: #e9f7ef;
    color: #0b6b3a;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

.gappti-product-card h2 {
    color: var(--gappti-blue-dark);
    font-size: 22px;
    margin: 0 0 10px 0;
}

.gappti-product-card p {
    color: var(--gappti-muted);
    font-size: 14px;
    min-height: 68px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.gappti-price {
    color: var(--gappti-blue);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 2px;
}

.gappti-tax {
    color: var(--gappti-muted);
    font-size: 13px;
    margin-bottom: 18px;
}

.gappti-home-button {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: var(--gappti-blue);
    color: #ffffff !important;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 700;
    text-decoration: none;
}

.gappti-home-button:hover {
    background: var(--gappti-blue-dark);
    color: #ffffff !important;
    text-decoration: none;
}

.gappti-home-note {
    margin-top: 26px;
    padding: 16px 18px;
    background: var(--gappti-blue-light);
    border: 1px solid #b7d8f2;
    border-left: 6px solid var(--gappti-blue);
    border-radius: 12px;
    color: var(--gappti-blue-dark);
    font-size: 14px;
    line-height: 1.5;
}

/* =========================================================
   GAPPTI - Imágenes de productos en Home
   ========================================================= */

.gappti-product-image {
    width: 100%;
    height: 185px;
    margin: 4px 0 18px 0;
    background: #f7fbff;
    border: 1px solid var(--gappti-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gappti-product-image img {
    max-width: 88%;
    max-height: 165px;
    object-fit: contain;
    display: block;
}

.gappti-product-card h2 {
    min-height: 54px;
}

.gappti-product-card .gappti-home-button {
    margin-top: 4px;
}

/* =========================================================
   GAPPTI - Flujo de pasos Home en una sola caja sin tarjetas internas
   ========================================================= */

.gappti-steps-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 16px;
    background: #f7fbff;
    border: 1px solid #cfe3f5;
    border-left: 6px solid var(--gappti-blue);
    border-radius: 16px;
    padding: 22px;
    margin: 28px 0 34px 0;
    box-shadow: 0 6px 18px rgba(0, 44, 95, 0.06);
}

.gappti-step-flow-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.gappti-step-flow-item h3 {
    margin: 0 0 6px 0;
    color: var(--gappti-blue-dark);
    font-size: 17px;
    font-weight: 700;
}

.gappti-step-flow-item p {
    margin: 0;
    color: var(--gappti-muted);
    font-size: 14px;
    line-height: 1.45;
}

.gappti-step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gappti-blue);
    font-size: 34px;
    font-weight: 800;
    padding: 0 4px;
}

/* Oculta el estilo anterior de pasos si quedó cargado */
.gappti-steps {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .gappti-steps-flow {
        grid-template-columns: 1fr;
    }

    .gappti-step-arrow {
        transform: rotate(90deg);
        font-size: 30px;
        padding: 0;
        margin: -4px 0;
    }
}


/* Responsive Home */
@media (max-width: 992px) {
    .gappti-steps,
    .gappti-product-summary {
        grid-template-columns: 1fr;
    }

    .gappti-product-card p {
        min-height: auto;
    }

    .gappti-home-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .gappti-home-hero {
        padding: 22px;
    }

    .gappti-step {
        flex-direction: column;
    }
}

/* Footer */
footer {
    background: var(--gappti-blue-dark);
    color: var(--gappti-white);
    margin-top: 40px;
    padding-top: 28px;
}

footer a {
    color: #d8ecff;
}

footer a:hover {
    color: var(--gappti-white);
}

/* Responsive */
@media (max-width: 768px) {
    .gappti-success-box {
        padding: 24px 20px;
        margin: 20px auto;
    }

    #product-info,
    #product {
        padding: 16px;
    }

    .product-thumb {
        margin-bottom: 18px;
    }
}

/* GAPPTI - Ocultar bloque de pago hasta que se guarden los datos */
.gappti-bloque-pago-oculto {
    display: none !important;
}


/* GAPPTI - Ocultar únicamente el bloque visual de método de envío */
#checkout-shipping-method {
    display: none !important;
}