@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap');

/* ============================================
   H8 WooCommerce - Product Detail
   ============================================ */

/* Breadcrumb detail page */
.h8-breadcrumb-detail.h8-breadcrumb a {
    color: #9E9E9E !important;
}

.h8-breadcrumb-detail.h8-breadcrumb .h8-breadcrumb-back {
    color: #9E9E9E !important;
}

.h8-breadcrumb-detail.h8-breadcrumb span {
    color: #0631A5 !important;
}

.h8-breadcrumb-detail.h8-breadcrumb strong {
    color: #0631A5 !important;
}

.h8-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 24px 0 48px;
}

/* Product image gallery */
.h8-detail-gallery {
    position: sticky;
    top: 24px;
    align-self: start;
}

.h8-detail-main-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--h8-gray-50);
    border-radius: var(--h8-radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.h8-detail-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.h8-detail-thumbnails {
    display: flex;
    gap: 16px;
}

.h8-detail-thumb {
    width: 64px !important;
    height: 64px !important;
    border: none !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    background: #FAFCFF !important;
    transition: all var(--h8-transition) !important;
    outline: none !important;
    box-shadow: none !important;
}

.h8-detail-thumb:hover,
.h8-detail-thumb.active {
    box-shadow: none !important;
}

.h8-detail-thumb img {
    width: 24px !important;
    height: 49px !important;
    object-fit: contain !important;
}

/* Product info */
.h8-detail-info {
    padding-top: 8px;
}

.h8-detail-code {
    font-family: 'Manrope', sans-serif !important;
    font-size: 32px !important;
    font-weight: 400 !important;
    color: #000000 !important;
    margin: 0 0 16px !important;
    line-height: 1.3 !important;
}

.h8-detail-code strong {
    font-weight: 700 !important;
    color: #000000 !important;
}

.h8-detail-subtitle {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 14px !important;
    color: var(--h8-gray-500) !important;
    margin: 0 0 16px !important;
    font-weight: 400 !important;
}

.h8-detail-title {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    color: #20201E !important;
    margin: 0 0 24px !important;
    line-height: 1.3 !important;
}

/* Quantity and add button - same row */
.h8-detail-qty-row {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
}

.h8-detail-add-btn {
    width: 222px !important;
    min-width: 222px !important;
    height: 48px !important;
    padding: 0 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 14px !important;
    background: #0631A5 !important;
    border-color: #0631A5 !important;
    color: var(--h8-white) !important;
}

.h8-detail-add-btn:hover {
    background: var(--h8-primary-dark) !important;
    border-color: var(--h8-primary-dark) !important;
}

/* Separator line */
.h8-detail-separator {
    height: 1px !important;
    background: #D9D9D7 !important;
    margin: 24px 0 !important;
}

/* Color chips */
.h8-detail-colors {
    margin-bottom: 24px;
}

.h8-detail-colors-title {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #20201E !important;
    margin: 0 0 12px !important;
}

/* Variation cards (color with image) */
.h8-detail-variation-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.h8-detail-variation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 2px solid transparent !important;
    border-radius: 12px !important;
    background: transparent !important;
    padding: 0 !important;
    transition: border-color 0.2s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.h8-detail-variation-card .h8-variation-img-wrap {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAFCFF;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.h8-detail-variation-card:hover .h8-variation-img-wrap {
    border-color: var(--h8-gray-200);
}

.h8-detail-variation-card.active .h8-variation-img-wrap {
    border-color: #0631A5;
}

.h8-detail-variation-card img {
    width: 24px !important;
    height: 49px !important;
    object-fit: contain !important;
}

.h8-detail-variation-card span {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #20201E;
    text-align: center;
    line-height: 1.2;
}

/* Description */
.h8-detail-description {
    margin-bottom: 24px;
}

.h8-detail-description-label {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #20201E !important;
    margin: 0 0 8px !important;
}

.h8-detail-description-content {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 16px !important;
    color: #656462 !important;
    line-height: 1.7 !important;
}

.h8-detail-description-content p {
    margin: 0 0 8px !important;
}

/* Share */
.h8-detail-share {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.h8-detail-share-text {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 16px !important;
    color: var(--h8-gray-800) !important;
    margin: 0 !important;
}

.h8-detail-share-text strong {
    font-weight: 700 !important;
}

.h8-detail-share-buttons {
    display: flex;
    gap: 12px;
}

.h8-detail-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--h8-gray-200);
    background: var(--h8-white);
    transition: all var(--h8-transition);
    text-decoration: none;
}

.h8-detail-share-btn:hover {
    border-color: var(--h8-primary);
    transform: scale(1.1);
}

.h8-detail-share-btn svg {
    width: 24px;
    height: 24px;
}

/* Related products carousel */
.h8-related-section {
    padding: 40px 0;
    border-top: 1px solid var(--h8-gray-200);
    margin-top: 20px;
    overflow: hidden;
}

.h8-related-title {
    font-family: 'DM Sans', sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #20201E !important;
    margin-bottom: 24px !important;
}

.h8-related-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.h8-related-carousel::-webkit-scrollbar {
    display: none;
}

.h8-related-carousel .h8-product-card {
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
}

/* Custom scrollbar */
.h8-related-scrollbar {
    width: 100%;
    height: 5px;
    background: var(--h8-gray-200);
    border-radius: 3px;
    margin-top: 20px;
    position: relative;
    cursor: pointer;
}

.h8-related-scrollbar-thumb {
    height: 100%;
    background: #ACCBFA;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 40px;
    cursor: grab;
    transition: background 0.15s;
}

.h8-related-scrollbar-thumb:hover,
.h8-related-scrollbar-thumb:active {
    background: #0631A5;
}

.h8-related-scrollbar-thumb:active {
    cursor: grabbing;
}

/* Dimension selector (placas) */
.h8-dimension-selector {
    margin-bottom: 20px;
}

.h8-dimension-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--h8-gray-900);
    margin-bottom: 8px;
}

.h8-dimension-options {
    display: flex;
    gap: 8px;
}

.h8-dimension-option {
    padding: 8px 20px;
    border: 1px solid var(--h8-gray-200);
    border-radius: var(--h8-radius);
    font-size: 14px;
    cursor: pointer;
    background: var(--h8-white);
    transition: all var(--h8-transition);
}

.h8-dimension-option:hover,
.h8-dimension-option.selected {
    background: var(--h8-primary);
    color: var(--h8-white);
    border-color: var(--h8-primary);
}

.h8-dimension-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--h8-gray-200);
    border-radius: var(--h8-radius);
    font-size: 14px;
    background: var(--h8-white);
    cursor: pointer;
}

/* Placas calculator */
.h8-placas-calc {
    background: var(--h8-gray-50);
    border: 1px solid var(--h8-gray-200);
    border-radius: var(--h8-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.h8-placas-calc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--h8-gray-900);
    margin-bottom: 12px;
}

.h8-placas-inputs {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.h8-placas-input-group {
    flex: 1;
}

.h8-placas-input-group label {
    display: block;
    font-size: 12px;
    color: var(--h8-gray-500);
    margin-bottom: 4px;
}

.h8-placas-input-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--h8-gray-200);
    border-radius: var(--h8-radius);
    font-size: 14px;
}

.h8-placas-result {
    font-size: 14px;
    color: var(--h8-primary);
    font-weight: 600;
    margin-top: 12px;
    display: none;
}

.h8-placas-result.show {
    display: block;
}
