/**
 * Product Page Styles
 */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: #6b7280;
}

.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    position: relative;
    aspect-ratio: 16/11;
    border-radius: var(--radius-3xl);
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 16px;
    box-shadow: var(--shadow-xl);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.favorite-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 42px;
    height: 42px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    z-index: 10;
}

@media (max-width: 480px) {
    .favorite-btn {
        width: 36px;
        height: 36px;
        top: 10px;
        left: 10px;
    }
    .favorite-btn svg {
        width: 18px;
        height: 18px;
    }
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn.active {
    background: var(--danger-color);
    color: white;
}

.favorite-btn svg {
    width: 24px;
    height: 24px;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.thumbnail-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.thumbnail-gallery img:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.product-info-section {
    padding: 20px 0;
}

.product-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.product-name {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.stars {
    color: #fbbf24;
    font-size: 18px;
    letter-spacing: 2px;
}

.rating-count {
    color: var(--text-secondary);
    font-size: 14px;
    margin-left: 8px;
}

.product-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.product-info-badge svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.product-requirements li svg {
    color: var(--secondary-color) !important;
}

.product-price-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 32px;
}

.current-price {
    font-size: 40px;
    font-weight: 900;
    color: var(--primary-color);
}

.old-price {
    font-size: 24px;
    color: #6b7280;
    text-decoration: line-through;
}

.discount-badge {
    padding: 6px 12px;
    background: var(--danger-color);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.product-description,
.product-features {
    margin-bottom: 32px;
}

.product-description h3,
.product-features h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.product-description p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 15px;
}

.product-features ul {
    list-style: none;
    display: grid;
    gap: 12px;
}

.product-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 15px;
}

.product-features li svg {
    width: 20px;
    height: 20px;
    color: var(--success-color);
    flex-shrink: 0;
}

.product-actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.product-actions-section .btn {
    width: 100%;
    height: 52px;
    padding: 0 20px;
    font-size: 15px;
    border-radius: 14px;
    justify-content: center;
    gap: 10px;
}

.product-actions-section .btn-secondary {
    background: var(--btn-preview-bg, #6b7280);
    color: white;
    border-color: var(--btn-preview-bg, #6b7280);
}

.product-actions-section .btn-secondary:hover {
    background: var(--btn-preview-bg, #4b5563);
    color: white;
    border-color: var(--btn-preview-bg, #4b5563);
    opacity: 0.88;
}

.product-actions-section .btn-primary {
    background: var(--btn-cart-bg, var(--primary-color));
    color: white;
}

.product-actions-section .btn-primary:hover {
    background: var(--btn-cart-bg, var(--primary-dark));
    color: white;
    opacity: 0.88;
}

.product-actions-section .btn .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@media (min-width: 577px) {
    .product-actions-section {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .product-actions-section .btn {
        flex: 1;
        min-width: 180px;
        height: 56px;
        padding: 0 24px;
        font-size: 16px;
        border-radius: 16px;
    }

    .product-actions-section .btn .icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 576px) {
    .product-actions-section {
        flex-direction: column;
    }
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    font-size: 13px;
    transition: border-color 0.2s;
}

.meta-item:hover {
    border-color: var(--primary-color);
}

.meta-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.meta-item strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: unset;
}

.meta-item a {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 14px;
}

.meta-item span {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 14px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    padding: 4px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.share-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.share-section strong {
    color: var(--text-primary);
    font-size: 14px;
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn svg {
    width: 20px;
    height: 20px;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn.copy {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-products {
    margin-top: 64px;
    padding-bottom: 48px;
}

.related-products h2 {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 32px;
    text-align: center;
}

@media (max-width: 768px) {
    .related-products {
        margin-top: 48px;
    }
    .related-products h2 {
        font-size: 22px;
        margin-bottom: 24px;
    }
}

@media (max-width: 768px) {
    .product-details {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .product-gallery {
        position: static;
    }
    
    .product-name {
        font-size: 28px;
    }
    
    .current-price {
        font-size: 32px;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .product-actions-section {
        flex-direction: column;
        gap: 12px;
    }

    .product-actions-section .btn {
        width: 100% !important;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        display: grid !important;
    }
    
    .related-products .product-card {
        width: 100% !important;
        margin: 0 !important;
    }

    .related-products .product-actions {
        flex-direction: row;
        gap: 5px;
    }

    .related-products .product-actions .btn {
        width: auto;
        flex: 1;
        padding: 8px 4px;
        font-size: 10px;
    }
}

    .current-price {
        font-size: 26px;
    }

    .old-price {
        font-size: 18px;
    }

    .product-rating {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
    }

    .product-info-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .product-price-section {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 0;
        justify-content: center;
        text-align: center;
    }

    .product-actions-section .btn {
        min-width: unset;
        width: 100%;
        height: 48px;
        font-size: 14px;
        border-radius: 12px;
    }

    .share-section {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .breadcrumb {
        font-size: 12px;
        gap: 6px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .product-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .meta-item {
        padding: 10px 12px;
    }

    .meta-item strong {
        font-size: 10px;
    }

    .main-image {
        border-radius: 20px;
        margin-bottom: 12px;
    }

    .related-products h2 {
        font-size: 22px;
        margin-bottom: 24px;
    }

    .product-description h3,
    .product-features h3 {
        font-size: 17px;
    }

    .reviews-section h2 {
        font-size: 18px !important;
    }
}

/* Review form — stack on mobile */
@media (max-width: 600px) {
    .review-fields-grid {
        grid-template-columns: 1fr !important;
    }
}
