/* Garantías Frontend Styles v2 - Diseño Moderno */

:root {
    --grt-bg: #f7f8fa;
    --grt-bg-alt: #ffffff;
    --grt-border: #e8e8e8;
    --grt-heading: #000B30;
    --grt-text: #000B30;
    --grt-link: #ee0cf4;
    --grt-link-hover: #6b748b;
    --grt-primary: #ee0cf4;
    --grt-secondary: #6b748b;
    --grt-muted: #9698a3;
    --grt-shadow: 0 8px 30px rgba(0, 11, 48, 0.08);
    --grt-shadow-hover: 0 12px 40px rgba(238, 12, 244, 0.15);
    --grt-radius: 16px;
    --grt-radius-sm: 12px;
}

/* Container principal */
.grt-wrap {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--grt-bg);
    border-radius: var(--grt-radius);
}

.grt-section {
    display: none;
    animation: grtFadeIn 0.4s ease;
}

.grt-section.is-active {
    display: block;
}

@keyframes grtFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.grt-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--grt-heading);
    margin-bottom: 15px;
    text-align: center;
}

.grt-banner {
    margin-bottom: 15px;
    background: var(--grt-bg-alt);
    border-radius: var(--grt-radius);
    overflow: hidden;
    box-shadow: var(--grt-shadow);
}

.grt-banner-img {
    width: 100%;
    max-height: 160px;
    overflow: hidden;
    position: relative;
}

.grt-banner-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--grt-bg-alt), transparent);
}

.grt-banner-img img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.grt-intro {
    font-size: 15px;
    text-align: center;
    color: var(--grt-text);
    padding: 12px 20px 15px;
    margin: 0;
    line-height: 1.5;
}

.grt-intro strong {
    color: var(--grt-primary);
    font-weight: 700;
}

.grt-note {
    font-size: 12px;
    color: var(--grt-muted);
    background: var(--grt-bg-alt);
    padding: 10px 15px;
    border-radius: var(--grt-radius-sm);
    margin: 12px 0;
    border: 1px solid var(--grt-border);
    line-height: 1.5;
}

.grt-select-text {
    font-size: 14px;
    color: var(--grt-text);
    margin: 15px 0 12px;
    font-weight: 500;
}

/* Grid de marcas */
.grt-brands {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 15px 0;
}

@media (max-width: 992px) {
    .grt-brands {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .grt-brands {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .grt-brands {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .grt-wrap {
        padding: 15px 10px;
    }
    
    .grt-heading {
        font-size: 20px;
    }
    
    .grt-intro {
        font-size: 14px;
        padding: 10px 15px;
    }
}

.grt-brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 1px solid var(--grt-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--grt-bg-alt);
    min-height: 70px;
    position: relative;
    overflow: hidden;
}

.grt-brand-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--grt-primary), var(--grt-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.grt-brand-card:hover {
    border-color: var(--grt-primary);
    box-shadow: var(--grt-shadow-hover);
    transform: translateY(-4px);
}

.grt-brand-card:hover::before {
    transform: scaleX(1);
}

.grt-brand-card img {
    max-width: 110px;
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: grayscale(20%);
}

.grt-brand-card:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

@media (max-width: 480px) {
    .grt-brand-card {
        padding: 12px 10px;
        min-height: 60px;
    }
    
    .grt-brand-card img {
        max-width: 85px;
        max-height: 38px;
    }
}

.grt-footer-text {
    text-align: center;
    font-size: 13px;
    color: var(--grt-muted);
    margin-top: 20px;
    padding: 15px;
    background: var(--grt-bg-alt);
    border-radius: var(--grt-radius-sm);
    border: 1px solid var(--grt-border);
}

.grt-footer-text a {
    color: var(--grt-link);
    text-decoration: none;
    font-weight: 600;
}

.grt-footer-text a:hover {
    color: var(--grt-link-hover);
    text-decoration: underline;
}

/* Vista de detalle */
.grt-back-btn {
    display: inline-flex;
    align-items: center;
    color: var(--grt-secondary);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 8px 14px;
    background: var(--grt-bg-alt);
    border-radius: 20px;
    border: 1px solid var(--grt-border);
    transition: all 0.2s ease;
    font-weight: 500;
}

.grt-back-btn span {
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.grt-back-btn:hover {
    color: var(--grt-primary);
    border-color: var(--grt-primary);
}

.grt-back-btn:hover span {
    transform: translateX(-3px);
}

.grt-detail-heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--grt-heading);
    margin-bottom: 15px;
    line-height: 1.4;
    text-align: center;
}

.grt-detail-heading span {
    color: var(--grt-primary);
    background: linear-gradient(135deg, var(--grt-primary), #c40acc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 480px) {
    .grt-detail-heading {
        font-size: 18px;
    }
}

.grt-detail-box {
    display: flex;
    gap: 0;
    background: var(--grt-bg-alt);
    border: 1px solid var(--grt-border);
    border-radius: var(--grt-radius);
    overflow: hidden;
    box-shadow: var(--grt-shadow);
}

@media (max-width: 768px) {
    .grt-detail-box {
        flex-direction: column;
    }
}

/* Sidebar de marcas - SIN SCROLL */
.grt-sidebar {
    width: 130px;
    flex-shrink: 0;
    background: var(--grt-bg);
    border-right: 1px solid var(--grt-border);
    padding: 4px;
}

@media (max-width: 768px) {
    .grt-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--grt-border);
        padding: 12px 15px;
    }
}

/* Lista de marcas - Sin scroll */
.grt-brand-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .grt-brand-list {
        display: none;
    }
}

.grt-brand-item {
    padding: 5px 8px;
    cursor: pointer;
    font-size: 11px;
    color: var(--grt-text);
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

.grt-brand-item:hover {
    background: var(--grt-bg-alt);
    color: var(--grt-primary);
}

.grt-brand-item.is-active {
    color: var(--grt-bg-alt);
    background: linear-gradient(135deg, var(--grt-primary), #c40acc);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(238, 12, 244, 0.2);
}

/* Select para móvil */
.grt-mobile-select {
    display: none;
}

@media (max-width: 768px) {
    .grt-mobile-select {
        display: block;
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
        color: var(--grt-heading);
        background: var(--grt-bg-alt);
        border: 2px solid var(--grt-primary);
        border-radius: 10px;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ee0cf4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 15px center;
        background-size: 12px;
    }
    
    .grt-mobile-select:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(238, 12, 244, 0.2);
    }
}

/* Contenido */
.grt-content {
    flex: 1;
    padding: 20px 25px;
    min-width: 0;
}

@media (max-width: 768px) {
    .grt-content {
        padding: 15px 15px;
    }
}

.grt-content-inner {
    min-height: 200px;
    animation: grtFadeIn 0.3s ease;
}

.grt-content-inner .grt-alert {
    background: linear-gradient(135deg, rgba(238, 12, 244, 0.08), rgba(196, 10, 204, 0.05));
    border-left: 4px solid var(--grt-primary);
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 14px;
    border-radius: 0 var(--grt-radius-sm) var(--grt-radius-sm) 0;
    color: var(--grt-text);
}

.grt-content-inner .grt-alert strong,
.grt-content-inner .garantia-alert strong {
    color: var(--grt-heading);
}

/* Soporte para clases antiguas */
.grt-content-inner .garantia-alert {
    background: linear-gradient(135deg, rgba(238, 12, 244, 0.08), rgba(196, 10, 204, 0.05));
    border-left: 4px solid var(--grt-primary);
    padding: 12px 16px;
    margin-bottom: 15px;
    font-size: 14px;
    border-radius: 0 var(--grt-radius-sm) var(--grt-radius-sm) 0;
    color: var(--grt-text);
}

.grt-content-inner p {
    margin: 12px 0;
    line-height: 1.6;
    color: var(--grt-text);
    font-size: 14px;
}

.grt-content-inner ul {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
}

.grt-content-inner li {
    margin: 8px 0;
    color: var(--grt-text);
    padding-left: 22px;
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

.grt-content-inner li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    background: var(--grt-primary);
    border-radius: 50%;
}

.grt-content-inner a {
    color: var(--grt-link);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.grt-content-inner a:hover {
    color: var(--grt-link-hover);
    text-decoration: underline;
}

/* Feedback */
.grt-feedback {
    margin-top: 25px;
    padding: 18px;
    background: var(--grt-bg);
    border-radius: var(--grt-radius-sm);
    text-align: center;
}

.grt-feedback-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--grt-heading);
    margin-bottom: 8px;
}

.grt-feedback-text {
    font-size: 13px;
    color: var(--grt-muted);
    margin: 0;
}

.grt-feedback-text a {
    color: var(--grt-link);
    text-decoration: none;
    font-weight: 600;
}

.grt-feedback-text a:hover {
    color: var(--grt-link-hover);
    text-decoration: underline;
}

/* Loading */
.grt-loading {
    text-align: center;
    padding: 60px 40px;
    color: var(--grt-muted);
    font-size: 15px;
}

.grt-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--grt-border);
    border-radius: 50%;
    border-top-color: var(--grt-primary);
    animation: grtSpin 0.8s linear infinite;
    margin-left: 12px;
    vertical-align: middle;
}

@keyframes grtSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Móvil extra pequeño */
@media (max-width: 480px) {
    .grt-content-inner .grt-alert,
    .grt-content-inner .garantia-alert {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .grt-content-inner p,
    .grt-content-inner li {
        font-size: 13px;
    }
    
    .grt-feedback {
        padding: 15px;
        margin-top: 20px;
    }
    
    .grt-feedback-title {
        font-size: 14px;
    }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .grt-brand-card {
        min-height: 70px;
    }
    
    .grt-brand-item {
        padding: 8px 10px;
    }
    
    .grt-back-btn {
        padding: 12px 18px;
    }
}
