/* 
 * SBOBET88 - Product Detail Page Styles
 * Optimized for SEO and user experience
 */

/* Breadcrumbs */
.product-breadcrumbs {
    background: #f0f7ff;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e9f7;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin: 0 0.5rem;
    color: #a0b0d0;
}

.breadcrumbs a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #003580;
    text-decoration: underline;
}

.breadcrumbs span {
    color: #666;
}

/* Product Detail Section */
.product-detail-section {
    padding: 3rem 0;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Product Gallery */
.product-gallery {
    position: relative;
}

.product-main-image {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.product-main-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.product-main-image:hover img {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    z-index: 1;
}

.product-badge.premium {
    background: linear-gradient(to right, #f7971e, #ffd200);
}

.product-badge.new {
    background: linear-gradient(to right, #00c6ff, #0072ff);
}

.product-badge.sale {
    background: linear-gradient(to right, #ff416c, #ff4b2b);
}

.product-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.thumbnail {
    width: 100px;
    height: 67px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.active {
    opacity: 1;
    border-color: #0056b3;
}

/* Product Info */
.product-info h1 {
    font-size: 2rem;
    margin: 0 0 1rem;
    color: #091e5b;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.product-rating {
    display: flex;
    align-items: center;
}

.stars {
    color: #ffb800;
    margin-right: 0.5rem;
    letter-spacing: 2px;
}

.star {
    position: relative;
}

.star.filled {
    color: #ffb800;
}

.star.half-filled {
    position: relative;
    color: #e0e0e0;
}

.star.half-filled::before {
    content: "★";
    position: absolute;
    color: #ffb800;
    width: 50%;
    overflow: hidden;
}

.star.empty {
    color: #e0e0e0;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
}

.product-id {
    color: #666;
    font-size: 0.9rem;
    border-left: 1px solid #ddd;
    padding-left: 1rem;
}

.product-availability {
    margin-left: auto;
}

.in-stock {
    color: #27ae60;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.in-stock::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #27ae60;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.out-of-stock::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: #091e5b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.original-price {
    font-size: 1.3rem;
    color: #777;
    text-decoration: line-through;
}

.discount-badge {
    background: #e74c3c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
}

.product-short-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Product Options */
.product-options {
    margin-bottom: 1.5rem;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.option-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23091e5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.product-actions .btn {
    flex: 1;
}

.buy-now-btn {
    background: linear-gradient(to bottom, #ff5e62 0%, #ff2a6a 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.buy-now-btn:hover {
    background: linear-gradient(to bottom, #ff4e52 0%, #e91e63 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 46, 105, 0.3);
    text-decoration: none;
    color: white;
}

.add-to-cart-btn {
    background: linear-gradient(to bottom, #0056b3 0%, #003580 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.add-to-cart-btn:hover {
    background: linear-gradient(to bottom, #004494 0%, #002a66 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 53, 128, 0.3);
    text-decoration: none;
    color: white;
}

.wishlist-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    background: #f0f7ff;
    border-color: #0056b3;
    color: #0056b3;
}

.wishlist-btn svg {
    transition: all 0.3s ease;
}

.wishlist-btn:hover svg {
    stroke: #0056b3;
}

.wishlist-btn.active {
    background: #ffe9ef;
    border-color: #ff2a6a;
    color: #ff2a6a;
}

.wishlist-btn.active svg {
    stroke: #ff2a6a;
    fill: #ff2a6a;
}

/* Product Share */
.product-share {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.product-share span {
    margin-right: 1rem;
    font-weight: 600;
}

.share-icons {
    display: flex;
    gap: 0.5rem;
}

.share-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.share-icon.facebook {
    background: #3b5998;
}

.share-icon.twitter {
    background: #1da1f2;
}

.share-icon.whatsapp {
    background: #25d366;
}

.share-icon.telegram {
    background: #0088cc;
}

.share-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Product Payment Info */
.product-payment-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.payment-methods {
    margin-bottom: 1rem;
}

.payment-methods span {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.security-guarantee {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #091e5b;
    font-weight: 600;
}

/* Product Tabs */
.product-tabs {
    margin-bottom: 3rem;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.tabs-header::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.tab-btn {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #0056b3;
}

.tab-btn.active {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Description Tab */
.tab-content h2 {
    color: #091e5b;
    margin-bottom: 1.5rem;
}

.tab-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tab-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.tab-content ul li {
    margin-bottom: 0.5rem;
}

.tab-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
}

.product-video {
    margin-top: 2rem;
}

.product-video h3 {
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Features Tab */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
}

.feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 30px;
    height: 30px;
}

.feature-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #091e5b;
}

.premium-comparison {
    margin-top: 3rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #eee;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.comparison-table th {
    background: #f0f7ff;
    font-weight: 600;
    color: #091e5b;
}

.comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Reviews Tab */
.reviews-summary {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.overall-rating {
    flex: 1;
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #091e5b;
    line-height: 1;
    margin: 1rem 0;
}

.large-stars {
    font-size: 2rem;
    color: #ffb800;
    margin-bottom: 1rem;
}

.total-reviews {
    color: #666;
}

.rating-bars {
    flex: 2;
}

.rating-bar-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.rating-label {
    width: 80px;
}

.rating-bar {
    flex: 1;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 1rem;
}

.bar-fill {
    height: 100%;
    background: #ffb800;
    border-radius: 4px;
}

.rating-percentage {
    width: 40px;
    text-align: right;
    font-size: 0.9rem;
    color: #666;
}

.reviews-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.filter-options select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.filter-by-stars {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star-filter {
    background: white;
    border: 1px solid #ddd;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-filter:hover {
    border-color: #0056b3;
    color: #0056b3;
}

.star-filter.active {
    background: #0056b3;
    color: white;
    border-color: #0056b3;
}

.reviews-list {
    margin-bottom: 2rem;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-weight: 600;
    color: #091e5b;
}

.review-date {
    font-size: 0.9rem;
    color: #666;
}

.review-rating {
    font-size: 1.1rem;
    color: #ffb800;
}

.review-content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.review-footer {
    display: flex;
    justify-content: flex-end;
}

.review-helpful {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.helpful-btn:hover {
    background: #f0f7ff;
    border-color: #0056b3;
    color: #0056b3;
}

.helpful-btn:hover svg {
    stroke: #0056b3;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.pagination a {
    background: white;
    color: #091e5b;
    border: 1px solid #ddd;
}

.pagination a:hover {
    background: #f0f7ff;
    border-color: #0056b3;
}

.pagination a.active {
    background: #0056b3;
    color: white;
    border-color: #0056b3;
}

.pagination .next,
.pagination .prev {
    width: auto;
    padding: 0 1rem;
}

.write-review {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
}

.write-review h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.rating-input {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
    color: #e0e0e0;
}

.rating-star {
    cursor: pointer;
    transition: all 0.3s ease;
}

.rating-star:hover,
.rating-star.selected {
    color: #ffb800;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: #0056b3;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit:hover {
    background: #003d82;
}

/* FAQ Tab */
.faq-list {
    margin-bottom: 2rem;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.faq-question {
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    padding-right: 40px;
    color: #091e5b;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.faq-question.active::after {
    content: "-";
}

.faq-answer {
    display: none;
    padding-bottom: 1.5rem;
}

.faq-answer.show {
    display: block;
}

/* Related Products */
.related-products {
    padding: 3rem 0;
    background: #f8f9fa;
}

.related-products-title {
    text-align: center;
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-details h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.stars {
    color: #ffbd00;
    margin-right: 0.5rem;
}

.count {
    color: #777;
    font-size: 0.9rem;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex: 1;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #091e5b;
    margin-bottom: 1rem;
}

.btn-product {
    background: linear-gradient(to bottom, #0056b3 0%, #003580 100%);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-product:hover {
    background: linear-gradient(to bottom, #004494 0%, #002a66 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 53, 128, 0.3);
    text-decoration: none;
    color: white;
}

/* Recently Viewed */
.recently-viewed {
    padding: 3rem 0;
    background: white;
}

.recently-viewed h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.empty-message {
    text-align: center;
    padding: 3rem 0;
    color: #666;
}

/* Product Schema Review Stars */
.schema-rating {
    display: inline-block;
    position: relative;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.schema-rating-background {
    color: #e0e0e0;
}

.schema-rating-value {
    color: #ffb800;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .reviews-summary {
        flex-direction: column;
        gap: 2rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .product-id {
        border-left: none;
        padding-left: 0;
    }
    
    .product-availability {
        margin-left: 0;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 1rem;
    }
    
    .tab-btn {
        padding: 0.8rem 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .reviews-filter {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

@media (max-width: 480px) {
    .product-thumbnails {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .thumbnail {
        width: 100%;
        height: 0;
        padding-bottom: 67%; /* Maintain aspect ratio */
    }
    
    .thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
    }
    
    .share-icons {
        flex-wrap: wrap;
    }
    
    .rating-input {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}