/* Product Detail Page Styles */

.product-detail-page {
    padding-bottom: 4rem;
}

/* Breadcrumb */
.product-breadcrumb {
    background: #f7fafc;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.product-breadcrumb nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.product-breadcrumb a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s;
}

.product-breadcrumb a:hover {
    color: #fbbf24;
}

.product-breadcrumb span {
    color: #a0aec0;
}

.product-breadcrumb span:last-child {
    color: #2d3748;
    font-weight: 500;
}

/* Product Detail Grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
}

.main-image-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    position: relative;
}

.main-image-container a {
    display: block;
    text-decoration: none;
}

.main-image-container img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
}

.image-placeholder svg {
    width: 120px;
    height: 120px;
    color: #cbd5e0;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: block;
    text-decoration: none;
}

.thumbnail-item:hover {
    opacity: 1;
    border-color: #e2e8f0;
}

.thumbnail-item.active {
    border-color: #fbbf24;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-zoom-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.image-zoom-btn:hover {
    background: #fbbf24;
}

.image-zoom-btn svg {
    width: 20px;
    height: 20px;
}

.product-badges-detail {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.badge-lg {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Product Info */
.product-info-detail {
    padding: 1rem 0;
}

.product-category-link {
    display: inline-block;
    font-size: 0.85rem;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.product-category-link:hover {
    color: #f59e0b;
}

.product-title-main {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Rating */
.product-rating-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.stars-large {
    display: flex;
    gap: 0.25rem;
}

.stars-large svg {
    width: 20px;
    height: 20px;
    color: #fbbf24;
    fill: #fbbf24;
}

.rating-text {
    font-size: 0.95rem;
    color: #718096;
}

.rating-text strong {
    color: #2d3748;
}

/* Price Section */
.price-section {
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
}

.price-original {
    font-size: 1.5rem;
    color: #a0aec0;
    text-decoration: line-through;
}

.discount-badge {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.price-note {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.5rem;
}

/* Description */
.product-description-full {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

/* Stock Status */
.stock-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.stock-indicator.in-stock {
    background: rgba(72, 187, 120, 0.1);
    color: #22543d;
}

.stock-indicator.in-stock svg {
    color: #48bb78;
}

.stock-indicator.low-stock {
    background: rgba(237, 137, 54, 0.1);
    color: #744210;
}

.stock-indicator.out-of-stock {
    background: rgba(245, 101, 101, 0.1);
    color: #742a2a;
}

.stock-indicator svg {
    width: 18px;
    height: 18px;
}

/* Quantity & Add to Cart */
.purchase-section {
    background: #f7fafc;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.quantity-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.quantity-label {
    font-weight: 500;
    color: #4a5568;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.quantity-selector button {
    width: 48px;
    height: 48px;
    border: none;
    background: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.2s;
}

.quantity-selector button:hover {
    background: #fbbf24;
    color: #1a202c;
}

.quantity-selector input {
    width: 60px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
}

.quantity-selector input:focus {
    outline: none;
}

.add-to-cart-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.add-to-cart-btn svg {
    width: 22px;
    height: 22px;
}

/* Secondary Actions */
.secondary-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.secondary-btn {
    flex: 1;
    padding: 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.secondary-btn:hover {
    border-color: #fbbf24;
    color: #fbbf24;
}

.secondary-btn.is-wishlisted {
    border-color: #fbbf24;
    background: #fff8e1;
    color: #b45309;
}

.secondary-btn svg {
    width: 18px;
    height: 18px;
}

/* Product Meta */
.product-meta-section {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #e2e8f0;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f7fafc;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    color: #718096;
    font-size: 0.9rem;
}

.meta-value {
    color: #2d3748;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Trust Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.trust-badge {
    text-align: center;
    padding: 1rem;
}

.trust-badge svg {
    width: 32px;
    height: 32px;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.trust-badge span {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    font-weight: 500;
}

/* Related Products */
.related-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
}

.section-link {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-link:hover {
    color: #f59e0b;
}

/* Share Modal */
#shareModalContainer {
    display: none;
}

.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.share-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1a202c;
}

.share-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: #718096;
}

.share-modal-content {
    padding: 2rem;
}

.share-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.share-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f7fafc;
    text-decoration: none;
    color: var(--share-color, #718096);
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.share-link:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: var(--share-color, #718096);
    transform: translateY(-2px);
}

.share-link svg,
.share-link i {
    width: 24px;
    height: 24px;
    color: var(--share-color, #718096);
}

.share-divider {
    text-align: center;
    color: #cbd5e0;
    font-size: 0.85rem;
    margin: 1rem 0;
    position: relative;
}

.share-divider:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: -1;
}

.share-divider span {
    background: white;
    padding: 0 0.5rem;
}

.share-link-copy {
    background: #f7fafc;
    border-radius: 12px;
    padding: 1rem;
}

.copy-input-group {
    display: flex;
    gap: 0.5rem;
}

.share-link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    background: white;
}

.share-link-input:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.1);
}

.btn-copy-link {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 8px;
    color: #1a202c;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.copy-message {
    margin-top: 0.75rem !important;
    color: #22863a !important;
    font-size: 0.9rem !important;
    text-align: center;
}

/* Responsive Share Modal */
@media (max-width: 480px) {
    .share-links {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .share-modal {
        width: 95%;
    }
    
    .copy-input-group {
        flex-direction: column;
    }
    
    .btn-copy-link {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-gallery {
        position: static;
    }
    
    .main-image-container img,
    .image-placeholder {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-title-main {
        font-size: 1.75rem;
    }
    
    .price-current {
        font-size: 2rem;
    }
    
    .trust-badges {
        grid-template-columns: 1fr;
    }
    
    .secondary-actions {
        flex-direction: column;
    }
}
