/* ======================================================
     STYLES: Product Detail (Vista pública)

     Propósito:
     - Reglas específicas para la página de detalle de producto:
         imágenes, bloques de información, botones de acción,
         especificaciones y adaptaciones responsive.

     Organización:
     - Mantener las secciones claramente separadas (PRODUCT IMAGE,
         PRODUCT DETAILS, PRODUCT SPECS, BUTTONS, ALERTS, RESPONSIVE).
     - Usar variables de `tokens.css` para colores y radios.

     Nota:
     - Evitar reglas globales aquí; si algo debe aplicar a todo el
         frontend, muévelo a `base.css`.
====================================================== */

main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: calc(100vh - 200px);
}

/* ===================================
   PRODUCT IMAGE
   =================================== */
.product-img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 24px;
}

.card {
    border: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(20,18,22,0.96), rgba(13,12,15,0.96));
}

.card.border-0 {
    border: none !important;
}

.card.shadow-sm {
    box-shadow: var(--shadow-light);
}

.detail-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.5rem;
    padding: 1.25rem;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 40px rgba(0,0,0,0.28);
    margin-bottom: 1.5rem;
}

.detail-hero-media img,
.detail-hero-media .carousel-item img {
    width: 100%;
    height: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 20px;
}

.detail-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0.25rem 0.5rem 0.25rem;
}

.detail-intro {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.2rem;
}

.detail-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1rem;
}

.detail-status span {
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-status i {
    color: var(--primary-color);
    font-size: 0.55rem;
}

.detail-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* ===================================
   PRODUCT DETAILS
   =================================== */
#detailTitle {
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.modal-price {
    font-size: 1.85rem;
    color: var(--primary-color);
    font-weight: 800;
    margin: 0;
}

.modal-rating {
    color: var(--warning-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

#detailDescription {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* ===================================
   PRICE NOTES
   =================================== */
.modal-note {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.modal-note strong {
    color: var(--text-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.modal-note p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* New: rows that show a price on the left and a short note/details on the right */
.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
    justify-content: flex-start;
}

.price-row .modal-price {
    font-size: 1.75rem;
    color: var(--primary-color);
    font-weight: 850;
    margin: 0;
    white-space: nowrap;
}

.price-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
    .price-row {
        justify-content: space-between;
    }

    .price-row .modal-price {
        font-size: 1.55rem;
    }
}

@media (max-width: 480px) {
    .price-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .price-note {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===================================
   PRODUCT SPECS
   =================================== */
.modal-specs {
    background: linear-gradient(180deg, rgba(20,18,22,0.96), rgba(13,12,15,0.96));
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-specs h6 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-specs p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.modal-specs p strong {
    color: var(--text-dark);
}

/* ===================================
   TAGS SECTION
   =================================== */
.product-tags-section {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product-tags-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.product-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.product-tag-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--light-bg);
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-light);
}

/* ===================================
   BUTTONS SECTION
   =================================== */
.btn {
    padding: 0.875rem 1.5rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: var(--hero-button-bg);
    border-color: var(--primary-color);
    color: var(--hero-button-text);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ===================================
   ALERT MESSAGES
   =================================== */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-warning a {
    color: #856404;
    font-weight: 700;
}

/* ===================================
   PRODUCT IMAGES SECTION
   =================================== */
.product-images-section {
    padding: 1.5rem;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(20,18,22,0.96), rgba(13,12,15,0.96));
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.product-images-section h6 {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1.25rem;
}

.product-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.product-image-item {
    opacity: 1;
    transform: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-image-item.active {
    opacity: 1;
}

.product-image-item:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.product-image-item img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    display: block;
}

.image-number {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-light);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ===================================
   IMAGE MODAL
   =================================== */
.modal-dialog {
    max-width: 800px !important;
    margin: 1.75rem auto;
    padding: 1.5rem;
}

.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
}

.modal-body-img {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 60vh;
    background-color: var(--dark-bg);
}

#modalImg {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

@media (max-width: 768px) {
    .modal-dialog {
        max-width: 95% !important;
    }

    .modal-body-img {
        padding: 1rem;
    }

    #modalImg {
        max-width: 100%;
        max-height: 95vh;
    }
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 992px) {
    #detailTitle {
        font-size: 1.75rem;
    }

    .modal-price {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    main.container {
        padding-top: 1.5rem;
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-panel {
        grid-template-columns: 1fr;
    }

    #detailTitle {
        font-size: 1.5rem;
    }

    .modal-price {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .modal-specs,
    .product-images-section {
        padding: 1rem;
    }

    .modal-specs h6 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    #detailTitle {
        font-size: 1.3rem;
    }

    .modal-price {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    .btn i {
        margin-right: 0.25rem;
    }

    .modal-specs {
        padding: 0.75rem;
    }

    .modal-specs p {
        font-size: 0.85rem;
    }
}

/* ===================================
   FAQ: Dark accordion adjustments
   =================================== */
#faqAccordion {
    margin-top: 1rem;
}

#faqAccordion .accordion-item {
    background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

#faqAccordion .accordion-button {
    background: transparent;
    color: var(--text-light);
    padding: 1rem 1.25rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: none;
    box-shadow: none;
}

#faqAccordion .accordion-button.collapsed {
    color: var(--text-light);
    background: rgba(255,255,255,0.02);
}

#faqAccordion .accordion-button:not(.collapsed) {
    color: var(--text-dark);
    background: linear-gradient(90deg, rgba(234,166,192,0.06), rgba(255,255,255,0.02));
}

#faqAccordion .accordion-body {
    color: var(--text-light);
    background: transparent;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.03);
}

#faqAccordion .accordion-button::after {
    filter: invert(1) grayscale(1) brightness(1.2);
    opacity: 0.95;
}
