/* Product detail page */
.product-detail-hero {
    padding: 1.5rem 0 0;
    background: var(--white);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.breadcrumb a {
    color: var(--gray-700);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--black);
    text-decoration: underline;
}

.product-detail-section {
    padding: 2rem 0 4rem;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}

.product-detail-gallery {
    position: relative;
    background: var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.product-detail-main-image {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.product-detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top left;
}

.product-detail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--gray-400);
}

.product-brand-badge--detail {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
}

.product-detail-thumbs {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
    max-width: calc(100% - 1.5rem);
    overflow-x: auto;
}

.product-detail-thumb {
    width: 56px;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    padding: 0;
    background: var(--white);
    cursor: pointer;
    flex-shrink: 0;
}

.product-detail-thumb.active {
    border-color: var(--yellow);
}

.product-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0.75rem 0 1rem;
}

.product-detail-description {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.product-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.product-whatsapp-btn {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.product-whatsapp-btn:hover {
    background: #1ebe57;
    border-color: #1ebe57;
    color: #fff;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 600;
}

.btn-link:hover {
    color: var(--black);
}

.related-products {
    margin-top: 3.5rem;
}

.products-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.product-card-link .product-body h3 {
    font-size: 0.95rem;
}

.product-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.75rem;
}

.product-inquire-link--wa {
    color: #128c41;
}

.product-inquire-link--wa:hover {
    color: #0d6b32;
}

/* Search autocomplete */
.search-autocomplete-wrap {
    position: relative;
}

.search-autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    max-height: 280px;
    overflow-y: auto;
}

.search-autocomplete-list[hidden] {
    display: none;
}

.search-autocomplete-list a {
    display: block;
    padding: 0.55rem 0.85rem;
    color: inherit;
    text-decoration: none;
}

.search-autocomplete-list a:hover,
.search-autocomplete-list a:focus {
    background: var(--gray-100);
}

.search-autocomplete-list small {
    display: block;
    color: var(--gray-600);
    font-size: 0.8rem;
}

/* Pagination */
.products-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.products-pagination a,
.products-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.products-pagination a {
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--black);
}

.products-pagination a:hover {
    border-color: var(--yellow);
    background: rgba(255, 204, 49, 0.12);
}

.products-pagination .current {
    background: var(--yellow);
    color: var(--black);
}

.products-pagination .ellipsis {
    border: none;
    background: transparent;
}

@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}
