/* =========================================
   ESTRUCTURA GLOBAL (GRID LAYOUT)
   ========================================= */
body {
    margin: *;
    padding: *;
    top: 0;
    left: 0;
}

.grid_container {
    display: grid;
    /* Configuración:
       - aside_left: Ocupa toda la primera columna de arriba a abajo.
       - header y navbar: Ocupan las columnas 2 y 3.
       - main: Columna 2, fila 3.
       - aside_right: Columna 3, fila 3 (Sobre el footer).
       - footer: Ocupa las columnas 2 y 3 en la base.
    */
    grid-template-areas: 
        "aside_left header  header"
        "aside_left navbar  navbar"
        "aside_left main    aside_right"
        "aside_left footer  footer"; 
    grid-template-columns: 250px 1fr 300px;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    gap: 0;
}

/* =========================================
   COMPONENTES DE ESTRUCTURA
   ========================================= */

.aside_left {
    grid-area: aside_left;
    background-color: #fff;
    border-right: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.header {
    grid-area: header;
    width: 100%;
}

.navbar {
    grid-area: navbar;
    width: 100%;
}

.main {
    grid-area: main;
    padding: 30px;
    background-color: #fcfcfc;
}

.aside_right {
    grid-area: aside_right;
    padding: 20px;
    background-color: #fcfcfc;
    border-left: 1px solid #eee;
    /* Asegura que si el contenido es corto, el borde llegue al footer */
    border-bottom: 1px solid #eee; 
}

.footer {
    grid-area: footer;
    background-color: #3a8801;
    color: white;
    padding: 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   DETALLES DEL PRODUCTO
   ========================================= */

.product-detail-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 30px;
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.detail-image-container {
    flex-basis: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.detail-image {
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    border: 2px solid #3a8901;
    border-radius: 10px;
}

.detail-info-container {
    flex-basis: 50%;
}

.detail-title {
    color: #3a8901;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.detail-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-price-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.price-row {
    display: flex;
    align-items: center;
}

.price-row .label {
    font-weight: 500;
    color: #777;
    width: 80px;
}

.price-row .value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
}

.price-row.bs .value { color: #3a8901; }
.price-row.usd .value { color: #1976d2; }
.price-row.cny .value { color: #d32f2f; }

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.product-meta div {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
}

.product-meta i {
    font-size: 1.1rem;
    margin-right: 5px;
}
.btn-add-cart {
    width: 80%;
    padding: 7px;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    justify-content: center;  
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 8px rgba(58, 137, 1, 0.4);
    border-radius: 30px;
}
.cantidad-selector {
    justify-content: center;
    margin-top: 15px;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* =========================================
   SECCIÓN DE COMENTARIOS
   ========================================= */

.comments-section {
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.comments-section h3 {
    color: #3a8901;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 10px;
    resize: vertical;
    font-family: 'Roboto', sans-serif;
}

.comment-form button {
    background-color: #3a8901;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.comment-form button:hover {
    background-color: #2e6b01;
}

.comment-list {
    margin-top: 20px;
}

.comment-item {
    background-color: #f5f6fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #3a8901;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.comment-user {
    font-weight: 500;
    color: #333;
}

.avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    object-fit: cover;
}

/* =========================================
   BOTONES Y ENLACES
   ========================================= */

.vendor-profile-link {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 5px;
    background-color: #3a8901;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.vendor-profile-link:hover {
    background-color: #2e6b01;
}

.login-link-button {
    display: inline-block;
    padding: 3px 10px;
    background-color: #1976d2;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s;
}

/* AQUÍ ESTÁ LA SOLUCIÓN */
.login-link-button a {
    text-decoration: none;
    color: white !important; /* <--- Agrega esto */
}

.login-link-button:hover {
    background-color: #1565c0;
}

.chat-btn {
    background-color: #3a8901;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    width: 100%;
    margin: 20px 0;
    text-align: center;
    transition: transform 0.2s;
}

.chat-btn:hover {
    transform: scale(1.02);
    background-color: #2e6b01;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (max-width: 768px) {
    .grid_container {
        grid-template-areas: 
            "header"
            "navbar"
            "main"
            "footer";
        grid-template-columns: 1fr;
    }

    .aside_left, .aside_right {
        display: none;
    }

    .product-detail-card {
        flex-direction: column;
        padding: 15px;
    }

    .detail-image-container, .detail-info-container {
        flex-basis: 100%;
    }

    .detail-title {
        font-size: 1.6rem;
    }
}