.product-logo-link {
    color: white;
    text-decoration: none;
}

.product-detail-container {
    max-width: 1500px;
    min-height: calc(100vh - 260px);
    margin: auto;
    padding: 30px 28px 65px;
}

.product-breadcrumbs {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.product-breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
}

.product-breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #afb4b9;
}

.product-detail-main {
    padding: 28px;
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(330px, 0.75fr);
    gap: 38px;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
}

.product-gallery {
    min-width: 0;
    height: 520px;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 14px;
}

.product-gallery.una-imagen,
.product-gallery.sin-imagen {
    grid-template-columns: minmax(0, 1fr);
}

.product-thumbnails {
    width: 100%;
    height: 520px;
    padding-right: 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
    scrollbar-color: #c5c9ce transparent;
}

.product-thumbnails::-webkit-scrollbar {
    width: 6px;
}

.product-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.product-thumbnails::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c5c9ce;
}

.product-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #aeb4ba;
}

.product-thumbnail {
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
}

.product-thumbnail.active {
    border-color: var(--accent);
    box-shadow:
        0 0 0 1px
        var(--accent);
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.product-main-image,
.product-main-placeholder {
    width: 100%;
    height: 520px;
    min-height: 520px;
}

.product-main-image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #f9fafb,
            #f0f2f4
        );
}

.product-main-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.product-detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background:
        linear-gradient(
            145deg,
            #f9fafb,
            #eef1f3
        );
    color: #adb3b9;
}

.product-detail-placeholder strong {
    font-size: 70px;
    font-weight: 900;
    opacity: 0.12;
}

.product-detail-placeholder span {
    font-size: 12px;
}

.product-detail-info {
    min-width: 0;
    position: relative;
    padding: 7px 4px 4px;
}

.product-detail-heading {
    padding-right: 58px;
}

.product-detail-brand {
    margin-bottom: 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.product-detail-heading h1 {
    margin: 0 0 8px;
    font-size:
        clamp(
            28px,
            3vw,
            40px
        );
    line-height: 1.08;
    letter-spacing: -1px;
}

.product-detail-code {
    color: var(--muted);
    font-size: 12px;
}

.product-detail-heart {
    width: 46px;
    height: 46px;
    position: absolute;
    right: 0;
    top: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: white;
    color: #8a9096;
    font-size: 24px;
    box-shadow:
        0 4px 15px
        rgba(0, 0, 0, 0.06);
}

.product-detail-heart:hover {
    color: var(--accent);
}

.product-detail-heart.active {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.product-detail-meta {
    margin-top: 27px;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
}

.product-detail-meta > div {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 8px;
    color: #555b62;
    font-size: 13px;
}

.product-detail-meta strong {
    color: var(--text);
}

.product-detail-price {
    margin-top: 27px;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -1px;
}

.product-detail-availability {
    width: fit-content;
    margin-top: 13px;
    padding: 7px 11px;
    border-radius: 20px;
    background: #e8f8ef;
    color: var(--success);
    font-size: 12px;
    font-weight: 800;
}

.product-detail-availability.agotado {
    background: #fdecec;
    color: #b52b2b;
}

.product-detail-actions {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.product-detail-list,
.product-detail-whatsapp {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 800;
}

.product-detail-list {
    border: 1px solid var(--border);
    background: white;
    color: var(--text);
}

.product-detail-list:hover,
.product-detail-list.active {
    border-color: var(--accent);
    color: var(--accent);
}

.product-detail-list.active {
    background:
        color-mix(
            in srgb,
            var(--accent) 6%,
            white
        );
}

.product-detail-whatsapp {
    border: 1px solid #18a957;
    background: #18a957;
    color: white;
}

.product-detail-whatsapp:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.product-detail-contact-note {
    margin-top: 11px;
    color: var(--muted);
    font-size: 11px;
}

.product-detail-lower {
    margin-top: 22px;
    display: grid;
    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(0, 1.15fr);
    gap: 22px;
}

.product-detail-section {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
}

.product-detail-section h2 {
    margin: 0 0 20px;
    font-size: 19px;
}

.product-specs {
    margin: 0;
    display: grid;
    grid-template-columns:
        minmax(120px, 0.65fr)
        minmax(0, 1fr);
}

.product-specs dt,
.product-specs dd {
    margin: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #eef0f2;
    font-size: 13px;
}

.product-specs dt {
    color: #444a50;
    font-weight: 700;
    background: #f8f9fa;
}

.product-specs dd {
    color: #62686f;
}

.product-description-text {
    margin: 0;
    color: #555b62;
    font-size: 14px;
    line-height: 1.75;
    white-space: pre-line;
}

.product-not-found {
    max-width: 650px;
    margin: 80px auto;
    padding: 50px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    text-align: center;
}

.product-not-found h1 {
    margin-top: 0;
}

.product-not-found p {
    color: var(--muted);
}

.product-not-found a {
    min-height: 42px;
    margin-top: 14px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 700;
}

@media (max-width: 1050px) {

    .product-detail-main {
        grid-template-columns: 1fr;
    }

    .product-detail-info {
        padding-top: 10px;
    }
}

@media (max-width: 760px) {

    .product-detail-container {
        padding:
            22px
            16px
            45px;
    }

    .product-detail-main {
        padding: 18px;
        gap: 25px;
    }

    .product-gallery {
        height: auto;
        grid-template-columns: 1fr;
    }

    .product-thumbnails {
        width: 100%;
        height: auto;
        padding-right: 0;
        padding-bottom: 6px;
        order: 2;
        flex-direction: row;
        align-items: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-gutter: auto;
    }

    .product-thumbnails::-webkit-scrollbar {
        width: auto;
        height: 6px;
    }

    .product-thumbnail {
        flex-shrink: 0;
    }

    .product-main-image,
    .product-main-placeholder {
        height: 400px;
        min-height: 400px;
    }

    .product-detail-actions,
    .product-detail-lower {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 570px) {

    .product-main-image,
    .product-main-placeholder {
        height: 300px;
        min-height: 300px;
    }

    .product-detail-main {
        padding: 14px;
    }

    .product-detail-heading h1 {
        font-size: 25px;
    }

    .product-detail-meta > div {
        grid-template-columns:
            105px
            minmax(0, 1fr);
    }

    .product-detail-section {
        padding: 18px;
    }

    .product-specs {
        grid-template-columns: 1fr;
    }

    .product-specs dt {
        padding-bottom: 4px;
        border-bottom: 0;
    }

    .product-specs dd {
        padding-top: 4px;
    }
}

.product-main-image-clickable {
    cursor: zoom-in;
}

.product-main-image-clickable:hover {
    opacity: 0.97;
}
