/* ==========================================
   PRODUCT PAGE STYLES
   ========================================== */

/* Breadcrumb */
.breadcrumb-section {
    padding: 6rem 0 2rem;
    background: var(--bg-secondary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--cta-color);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text-primary);
    font-weight: 600;
}

/* Product Detail */
.product-detail {
    padding: 3rem 0;
    background: white;
    transition: background-color 0.3s ease;
}

.dark-theme .product-detail {
    background: var(--bg-primary);
}

.dark-theme .main-image,
.dark-theme .thumbnail {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.dark-theme .product-price-section,
.dark-theme .product-guarantees {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.dark-theme .feature-item {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

.dark-theme .radio-label {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

.dark-theme .radio-option.active .radio-label,
.dark-theme .radio-option input[type="radio"]:checked + .radio-label {
    background: rgba(94, 185, 255, 0.1);
    border-color: var(--cta-color);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    position: relative;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: white;
    aspect-ratio: 1;
}

.badge-stock {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.badge-stock.in-stock {
    background: var(--validation-color);
    color: var(--text-primary);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-placeholder .gradient-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #AEE2FF 0%, #A970FF 100%);
}

.image-icon {
    font-size: 5rem;
    position: relative;
    z-index: 1;
}

.thumbnail-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumbnail {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-medium);
    position: relative;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--cta-color);
    transform: translateY(-2px);
}

.thumbnail .gradient-bg,
.thumbnail .gradient-bg-2,
.thumbnail .gradient-bg-3,
.thumbnail .gradient-bg-4 {
    width: 100%;
    height: 100%;
}

.thumbnail .gradient-bg {
    background: linear-gradient(135deg, #AEE2FF 0%, #A970FF 100%);
}

.thumbnail .gradient-bg-2 {
    background: linear-gradient(135deg, #A970FF 0%, #C77DFF 100%);
}

.thumbnail .gradient-bg-3 {
    background: linear-gradient(135deg, #00FFC2 0%, #AEE2FF 100%);
}

.thumbnail .gradient-bg-4 {
    background: linear-gradient(135deg, #C77DFF 0%, #00FFC2 100%);
}

/* Product Info */
.product-info-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 2rem;
}

.product-category {
    display: inline-block;
    color: var(--cta-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.product-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stars {
    display: flex;
    gap: 0.25rem;
}

.star {
    color: var(--border-color);
    font-size: 1.25rem;
}

.star.filled {
    color: #FFB800;
}

.star.half {
    background: linear-gradient(90deg, #FFB800 50%, var(--border-color) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Price Section */
.product-price-section {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-unit {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tax-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Description */
.product-description h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.feature-icon {
    color: var(--validation-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Product Options */
.product-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group label {
    display: block;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 50px;
    height: 50px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
}

.qty-btn:hover {
    background: var(--bg-primary);
}

.qty-input {
    width: 80px;
    height: 50px;
    border: none;
    border-left: 2px solid var(--border-color);
    border-right: 2px solid var(--border-color);
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.qty-input:focus {
    outline: none;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: block;
    position: relative;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    transition: all var(--transition-medium);
}

.radio-option.active .radio-label,
.radio-option input[type="radio"]:checked + .radio-label {
    border-color: var(--cta-color);
    background: rgba(169, 112, 255, 0.05);
}

.radio-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.radio-price {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.discount {
    background: var(--validation-color);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Premium Glassmorphism Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85em 2.2em;
	font-size: 1.13rem;
	font-weight: 700;
	border-radius: 18px;
	border: none;
	cursor: pointer;
	transition: background 0.22s, box-shadow 0.22s, transform 0.15s;
	box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1.5px 8px rgba(0,0,0,0.04);
	margin-right: 1em;
	margin-bottom: 1em;
	background: linear-gradient(135deg, rgba(255,255,255) 0%, rgba(220,240,255, 0.75) 100%);
	color: #1a2332;
	backdrop-filter: blur(10px) saturate(1.2);
	position: relative;
	overflow: hidden;
	border: 1.5px solid rgba(180,200,255,0.18);
	letter-spacing: 0.02em;
}

.minus {
    background: black;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(90deg, #4f8cff 0%, #6ed0fa 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(79,140,255,0.18);
    border: none;
    position: relative;
    z-index: 1;
}
.btn-primary::after {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(79,140,255,0.12) 0%, rgba(110,208,250,0.10) 100%);
    opacity: 0;
    transition: opacity 0.22s;
    z-index: 0;
}
.btn-primary:hover::after {
    opacity: 1;
}
.btn-primary:hover, .btn-primary:focus {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px rgba(79,140,255,0.22);
}

/* Secondary Button: Buy Now */
.btn-secondary {
    background: linear-gradient(90deg, #dde6ed 0%, #f8fafc 100%);
    color: #1a2332;
    box-shadow: 0 2px 8px rgba(220,230,240,0.18);
    border: 1.5px solid rgba(180,200,255,0.18);
    position: relative;
    z-index: 1;
}
.btn-secondary::after {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(220,230,240,0.18) 0%, rgba(248,250,252,0.10) 100%);
    opacity: 0;
    transition: opacity 0.22s;
    z-index: 0;
}
.btn-secondary:hover::after {
    opacity: 1;
}
.btn-secondary:hover, .btn-secondary:focus {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px rgba(220,230,240,0.22);
}

/* 3D Viewer Button */
.btn-3d-viewer {
    background: linear-gradient(90deg, #e0eafc 0%, #cfdef3 100%);
    color: #2b3a55;
    box-shadow: 0 2px 8px rgba(110,208,250,0.18);
    border: 1.5px solid rgba(110,208,250,0.18);
    position: relative;
    z-index: 1;
}
.btn-3d-viewer::after {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    border-radius: 18px;
    background: linear-gradient(120deg, rgba(110,208,250,0.12) 0%, rgba(207,222,243,0.10) 100%);
    opacity: 0;
    transition: opacity 0.22s;
    z-index: 0;
}
.btn-3d-viewer:hover::after {
    opacity: 1;
}
.btn-3d-viewer:hover, .btn-3d-viewer:focus {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 24px rgba(110,208,250,0.22);
}

/* Button Icon Styling */
.btn span {
    margin-left: 0.7em;
    font-size: 1.2em;
}
.btn-3d-viewer span {
    font-size: 1.15em;
    margin-left: 0.5em;
}

/* Button Active State */
.product-guarantees {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.guarantee-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.guarantee-text {
    display: flex;
    flex-direction: column;
}

.guarantee-text strong {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.guarantee-text span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Technical Specs */
.product-specs {
    padding: 4rem 0;
    background: white;
    transition: background-color 0.3s ease;
}

.dark-theme .product-specs {
    background: var(--bg-primary);
}

.dark-theme .specs-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.dark-theme .spec-item {
    background: var(--bg-primary);
}

/* Reviews */
.product-reviews {
    padding: 4rem 0;
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.dark-theme .reviews-summary,
.dark-theme .review-card {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

.dark-theme .contact-form {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Recommended Products */
.recommended-products {
    padding: 4rem 0;
    background: white;
    transition: background-color 0.3s ease;
}

.dark-theme .recommended-products {
    background: var(--bg-primary);
}

.specs-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3rem;
}

.specs-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.spec-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.spec-value {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Reviews */
.product-reviews {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.reviews-header {
    margin-bottom: 3rem;
}

.reviews-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.reviews-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
}

.summary-score {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-stars {
    display: flex;
    gap: 0.25rem;
}

.score-stars .star {
    font-size: 1.5rem;
}

.score-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.btn-write-review {
    padding: 1rem 2rem;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.review-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all var(--transition-medium);
}

.review-card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-cta);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-weight: 700;
    color: var(--text-primary);
}

.review-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.review-stars {
    display: flex;
    gap: 0.25rem;
}

.review-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.review-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.review-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.review-helpful {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
}

.review-helpful:hover {
    border-color: var(--validation-color);
    color: var(--text-primary);
    background: rgba(0, 255, 194, 0.05);
}

/* Recommended Products */
.recommended-products {
    padding: 4rem 0;
    background: white;
}

.recommended-products .section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

/* Responsive */
@media (max-width: 968px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .product-gallery {
        position: static;
    }

    .product-title {
        font-size: 2rem;
    }

    .price {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        flex-direction: column;
    }

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .reviews-summary {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .breadcrumb-section {
        padding: 5rem 0 1.5rem;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .price {
        font-size: 2rem;
    }

    .thumbnail-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .specs-card {
        padding: 2rem 1.5rem;
    }

    .review-card {
        padding: 1.5rem;
    }
}

/* ==========================================
   VIEWER 3D MODAL
   ========================================== */

.modal-3d-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 30, 47, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-3d-viewer.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-3d {
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 25px 80px var(--shadow-medium);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.modal-3d-viewer.active .modal-content-3d {
    transform: scale(1);
}

.modal-header-3d {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header-3d h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-modal-3d {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    cursor: pointer !important;
}

.close-modal-3d:hover {
    background: var(--cta-color);
    color: white;
    transform: rotate(90deg);
}

.viewer-container {
    flex: 1;
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    cursor: grab !important;
}

.viewer-container:active {
    cursor: grabbing !important;
}

.viewer-container * {
    cursor: grab !important;
}

.viewer-container:active * {
    cursor: grabbing !important;
}

.modal-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-top: 2px solid var(--border-color);
}

.control-btn {
    padding: 0.75rem 1.5rem;
    background: var(--gradient-cta);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer !important;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(169, 112, 255, 0.3);
}

.control-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-3d-viewer {
    background: linear-gradient(90deg, #e0eafc 0%, #cfdef3 100%);
    color: #2b3a55;
    box-shadow: 0 2px 8px rgba(110,208,250,0.18);
    border: 1.5px solid rgba(110,208,250,0.18);
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    margin-top: 0;
    width: auto;
}

.btn-3d-viewer:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 255, 194, 0.4);
}

@media (max-width: 968px) {
    .modal-content-3d {
        width: 95%;
        height: 85%;
    }

    .modal-header-3d {
        padding: 1rem 1.5rem;
    }

    .modal-header-3d h2 {
        font-size: 1.2rem;
    }

    .modal-controls {
        padding: 0.75rem 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .control-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .modal-content-3d {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .control-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
