r/* Product Detail Page Styles */

/* Mobile First Approach */

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

.product-detail-main {
    padding: 2rem 0;
    background-color: #f8f9fa;
}

/* Dark Header Styling */
.breadcrumb {
    background-color: #000000;
    color: white;
    padding: 1.5rem 0;
    margin: 0;
    text-align: center;
}

/* Stock Status */
.stock-status {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    font-weight: 600;
    color: #28a745; /* Green color for in stock */
}

.stock-status i {
    font-size: 1.1rem;
    margin-right: 8px;
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh; /* Adjust as needed */
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background-color: #eee;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover,
.breadcrumb-list a:focus {
    color: white;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.breadcrumb-list span {
    color: #7f8c8d;
}

.breadcrumb-list li:last-child span {
    color: white;
    font-weight: 500;
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Product Images */
.product-images {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-start;
}

.product-gallery {
    display: flex;
    gap: 15px;
    width: 100%;
}

.product-gallery .thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100px;
    flex-shrink: 0;
    height: 100%;
    overflow-y: hidden;
    padding-right: 0;
}

.product-gallery .thumbnails .thumbnail {
    width: 100px;
    height: 100px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-gallery .thumbnails .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery .thumbnails .thumbnail.active,
.product-gallery .thumbnails .thumbnail:hover {
    border-color: #e74c3c;
}

.product-gallery .main-image {
    position: relative;
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.product-gallery .main-image img {
    width: 100%;
    height: 400px;
    object-fit: contain; /* Tüm boyutları koruyarak sığdır */
    border-radius: 10px;
}

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}



/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}


.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin: 0.5rem 0;
    line-height: 1.3;
}

/* Star Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 1rem;
}

.star.filled {
    color: #ffc107;
}

.rating-text {
    color: #666;
    font-size: 0.9rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
}

.old-price {
    font-size: 1.2rem;
    color: #999;
    text-decoration: line-through;
}

.discount-info {
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.kdv-info {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Product Description */
.product-description {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    line-height: 1.6;
    white-space: pre-line;
}

.product-description h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.product-description p {
    color: #666;
    margin-bottom: 0.5rem;
}

/* Quantity Selector */
.quantity-section {
    margin: 1.5rem 0;
}

.quantity-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #666;
}

.quantity-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.quantity-input:focus {
    outline: none;
    border-color: #007bff;
}

.product-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0;
}

.btn-whatsapp,
.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    min-width: 200px;
    border: none;
    cursor: pointer;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1ea952;
    transform: translateY(-2px);
    color: white;
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.btn-instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(188, 24, 136, 0.3);
    color: white;
}


/* Product Tabs */
.product-tabs {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 1rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tab-button:hover {
    color: #007bff;
}

.tab-content {
    display: none;
    padding: 1rem 0;
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    color: #333;
    margin-bottom: 1rem;
}

.tab-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Similar Products Section */
.similar-products-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.similar-products-section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Show 4 products in a row */
    gap: 20px; /* Consistent gap with other product grids */
}

/* Reusing .product-card styles from home.css for consistency */
/* No need for .similar-product-card specific styles if .product-card is used */
/* The .product-card class is already applied in the JS, so these specific styles are not needed */
/* .similar-product-card {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.similar-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.similar-product-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background-color: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
}

.similar-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.similar-product-image:hover img {
    transform: scale(1.05);
}

.similar-product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.similar-product-info .product-title {
    font-size: 1.1em;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 600;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.similar-product-info .product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 15px;
}

.similar-product-info .current-price {
    font-size: 1.4em;
    color: var(--primary-color);
    font-weight: bold;
} */

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #25d366;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.contact-btn:hover {
    background: #1ea952;
    transform: translateY(-1px);
    color: white;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
}

.error-message {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-message .btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.error-message .btn-primary:hover {
    background: #0056b3;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.thumbnail:focus {
    border-color: #007bff;
    transform: scale(1.05);
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .main-image img {
        height: 300px;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-whatsapp,
    .btn-instagram {
        min-width: auto;
    }
    
    .similar-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Adjusted for tablet */
        gap: 15px;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .image-thumbnails {
        justify-content: center;
    }
    
    .quantity-selector {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .product-images {
        flex-direction: column; /* Stack thumbnails and main image vertically */
        align-items: center;
    }

    .product-gallery {
        flex-direction: column; /* Stack thumbnails and main image vertically */
        gap: 1rem;
        width: 100%;
    }

    .product-gallery .thumbnails {
        flex-direction: row; /* Arrange thumbnails horizontally */
        justify-content: center;
        width: 100%;
        height: auto;
        overflow-x: auto; /* Allow horizontal scrolling if many thumbnails */
        padding-bottom: 10px; /* Space for scrollbar */
    }

    .product-gallery .thumbnails .thumbnail {
        width: 80px;
        height: 80px;
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .main-image {
        width: 100%;
    }

    .main-image img {
        height: 300px;
        object-fit: contain;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .btn-whatsapp,
    .btn-instagram {
        min-width: auto;
    }
    
    .similar-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .similar-product-image {
        height: 150px;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .quantity-selector {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .product-detail-main {
        padding: 1rem 0;
    }
    
    .similar-products-section {
        padding: 1rem;
    }
    
    .similar-products-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 10px;
    }

    .similar-products-grid .product-card {
        width: 100%; /* Make cards take full width */
        max-width: 250px; /* Adjusted for smaller mobile */
        margin: 0 auto; /* Center the cards */
    }
    
    .breadcrumb .container {
        padding: 0 0.5rem;
    }
    
    .breadcrumb-list {
        font-size: 0.8rem;
    }
    
    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
        margin: 1rem;
    }
    
    .product-gallery .thumbnails {
        gap: 8px;
    }
    
    .product-gallery .thumbnails .thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .main-image img {
        max-width: 100%;
        height: auto;
    }
    
    .product-header h1 {
        font-size: 1.5em;
    }
    
    .product-rating .stars {
        font-size: 1.2em;
    }
    
    .current-price {
        font-size: 1.8em;
    }
    
    .old-price {
        font-size: 1.2em;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-whatsapp,
    .btn-instagram {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }
    
    .contact-btn {
        width: 100%;
        padding: 12px;
        font-size: 1em;
    }
    
    .product-tabs {
        margin: 1rem;
    }
    
    .tab-buttons {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .product-detail {
        margin: 0.5rem;
        padding: 0.8rem;
    }
    
    .breadcrumb {
        padding: 1rem 0;
    }
    
    .breadcrumb-list {
        font-size: 0.7rem;
        gap: 0.5rem;
    }
    
    .product-header h1 {
        font-size: 1.3em;
    }
    
    .current-price {
        font-size: 1.6em;
    }
    
    .old-price {
        font-size: 1.1em;
    }
    
    .btn-whatsapp,
    .btn-instagram {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .contact-btn {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
    }
    
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-detail {
        border: 2px solid #000;
    }
    
    .btn-whatsapp,
    .btn-instagram {
        border: 2px solid #000;
    }
    
    .discount-badge {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .thumbnail,
    .similar-product-card,
    .btn-whatsapp,
    .btn-instagram,
    .contact-btn,
    .social-btn {
        transition: none;
    }
    
    .thumbnail:hover,
    .thumbnail.active {
        transform: none;
    }
    
    .similar-product-card:hover {
        transform: none;
    }
    
    .btn-whatsapp:hover,
    .btn-instagram:hover,
    .contact-btn:hover {
        transform: none;
    }
    
    .social-btn:hover {
        transform: none;
    }
}
