/* =========================================
   Product Detail Page – Biodata Templates
   ========================================= */

.product-detail-page {
    padding: 6rem 0 4rem;
}

/* Breadcrumb */
.product-breadcrumb {
    padding: 0.75rem 0 1.5rem;
    font-size: 0.875rem;
    color: var(--light-gray);
}
.product-breadcrumb a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.2s;
}
.product-breadcrumb a:hover {
    color: var(--primary);
}
.product-breadcrumb .sep {
    margin: 0 0.5rem;
    color: #ccc;
}
.product-breadcrumb .current {
    color: var(--light-black);
    font-weight: 500;
}

/* Main Layout */
.product-detail-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

/* Preview Image */
.product-detail-preview {
    flex: 0 0 42%;
    max-width: 42%;
    position: sticky;
    top: 2rem;
}
.product-detail-preview__image {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.product-detail-preview__image img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* Info Panel */
.product-detail-info {
    flex: 1;
    min-width: 0;
}

/* Title */
.product-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--light-black);
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

/* Tags */
.product-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.product-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0f4ff;
    color: #4a6fa5;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Price */
.product-detail-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.product-detail-price del {
    color: #aaa;
    font-weight: 400;
    font-size: 1.1rem;
}
.product-detail-price ins {
    text-decoration: none;
}

/* Color Variants */
.product-detail-colors {
    margin-bottom: 1.5rem;
}
.product-detail-colors h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--light-black);
    margin: 0 0 0.5rem;
}
.color-palette {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.color-swatch {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}
.color-swatch:hover {
    transform: scale(1.15);
}
.color-swatch.active {
    box-shadow: 0 0 0 3px var(--primary);
    border-color: #fff;
}
.color-palette.small .color-swatch {
    width: 1.25rem;
    height: 1.25rem;
}

/* CTA Button */
.product-detail-cta {
    display: inline-block;
    width: auto;
    text-align: center;
    padding: 1rem 2rem;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
    border-radius: 50px;
}
.product-detail-cta:hover {
    background: #c88a3a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(221, 157, 76, 0.35);
    color: #fff;
    text-decoration: none;
}
.product-detail-cta:active {
    transform: translateY(0);
}

/* Specifications */
.product-detail-specs {
    background: #f8fafb;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}
.spec-row {
    display: flex;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid #eef1f5;
}
.spec-row:last-child {
    border-bottom: none;
}
.spec-icon {
    flex: 0 0 2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
}
.spec-label {
    flex: 0 0 7rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--light-black);
}
.spec-value {
    flex: 1;
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* Trust Badges */
.product-detail-trust {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid #eef1f5;
    border-bottom: 1px solid #eef1f5;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--light-black);
    font-weight: 500;
}

/* Share */
.product-detail-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.share-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-black);
}
.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #555;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
}
.share-icon:hover {
    transform: scale(1.1);
}
.share-whatsapp:hover {
    background: #25d366;
    color: #fff;
}
.share-facebook:hover {
    background: #1877f2;
    color: #fff;
}
.share-twitter:hover {
    background: #000;
    color: #fff;
}

/* Description Section */
.product-detail-description {
    margin-top: 3rem;
    border-top: 1px solid #eef1f5;
    padding-top: 2rem;
}
.desc-section {
    margin-bottom: 2rem;
}
.desc-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--light-black);
    margin: 0 0 1rem;
}
.desc-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--light-gray);
}
.desc-content p {
    margin-bottom: 0.75rem;
}

/* Related Templates */
.product-detail-related {
    margin-top: 3rem;
    border-top: 1px solid #eef1f5;
    padding-top: 2rem;
}
.product-detail-related h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--light-black);
    margin: 0 0 1.5rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.related-template-card {
    border-radius: 12px;
    overflow: visible;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.related-template-card .template-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    aspect-ratio: 3 / 4;
    transition: transform 0.25s;
}
.related-template-card .template-image-wrapper .related-template-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
}
.related-template-card .template-hover-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    display: flex;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}
.related-template-card:hover .template-hover-buttons {
    opacity: 1;
}
.related-template-card .template-hover-buttons .hover-btn {
    background: var(--primary, #e75480);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.related-template-card .creat-btn-mobile {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
    background: var(--primary, #e75480);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
@media (max-width: 768px) {
    .related-template-card .creat-btn-desktop { display: none; }
    .related-template-card .creat-btn-mobile { display: block; }
}
.related-template-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}
.related-template-card:hover .template-image-wrapper {
    transform: translateY(-4px);
}
.related-template-image {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}
.related-template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.related-template-card:hover .related-template-image img {
    transform: scale(1.03);
}
.related-template-info {
    padding: 0.75rem 1rem 1rem;
    text-align: center;
}
.related-template-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.5rem 0 0;
    color: var(--light-black);
}
.related-template-info h3 a {
    color: inherit;
    text-decoration: none;
}
.related-template-info h3 a:hover {
    color: var(--primary);
}
.related-template-info .color-palette {
    justify-content: center;
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 1199px) {
    .product-detail-wrapper {
        gap: 2rem;
    }
    .product-detail-preview {
        flex: 0 0 45%;
        max-width: 45%;
    }
}

@media (max-width: 991px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-detail-page {
        padding: 4rem 0 3rem;
    }
    .product-detail-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    .product-detail-preview {
        flex: none;
        max-width: 100%;
        width: 100%;
        position: static;
    }
    .product-detail-preview__image {
        max-width: 400px;
        margin: 0 auto;
    }
    .product-detail-title {
        font-size: 1.4rem;
    }
    .product-detail-trust {
        gap: 1rem;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .product-detail-preview__image {
        max-width: 100%;
        border-radius: 8px;
    }
    .product-detail-cta {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    .spec-label {
        flex: 0 0 5.5rem;
    }
    .product-detail-trust {
        flex-direction: column;
        gap: 0.75rem;
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
