/**
 * ROY KAPAK - Ürün Detay Sayfası CSS
 * Modern ve Responsive Tasarım
 */

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    margin: 20px 0;
    padding: 15px 0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--gray);
}

.breadcrumb-item a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--link-hover);
}

.breadcrumb-item.active a {
    color: var(--dark);
    font-weight: 600;
}

/* Product Main Section */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
    align-items: start;
}

@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    /* Mobile: galeriyi yapışkan olmaktan çıkar ve kayma sorununu önle */
    .product-gallery {
        position: relative;
        top: 0;
    }
    .product-image-main {
        position: relative;
    }
    .product-image-main img {
        max-height: 60vh;
        transform: none !important; /* olası hover etkilerini iptal et */
    }
    /* Başlığın sabit header altında kalmasını önle */
    .product-title {
        margin-top: 30px;
    }
}

/* Tablet ve daha küçük ekranlarda yapışkan galeri kapatılsın */
@media (max-width: 1024px) {
    .product-gallery {
        position: static !important;
        top: auto !important;
        z-index: 1;
    }
    .product-info {
        position: relative;
        z-index: 2;
    }
    .product-image-main {
        overflow: hidden;
    }
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 120px;
}

.product-image-main {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 20px;
}

.product-image-main img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
    object-fit: contain;
    background: #ffffff;
    padding: 10px;
}

.product-image-main img:hover {
    transform: scale(1.02);
}

/* Ek mobil/touch düzeltmeleri (telefonlar ve küçük tabletler) */
@media (max-width: 900px) {
    .product-detail-page {
        padding-top: 30px; /* header altında kaybolmayı engelle */
    }
    .product-gallery {
        position: static !important;
        top: auto !important;
    }
    .product-image-main img {
        max-height: 55vh;
    }
    .product-image-main img:hover {
        transform: none !important;
    }
}

.product-image-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    opacity: 0.7;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    opacity: 1;
    border-color: var(--primary-color);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

/* Product Info */
.product-info {
    padding: 20px 0;
}

.product-title {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .product-title {
        font-size: 2rem;
    }
}

.product-category {
    margin-bottom: 20px;
}

.product-category a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.product-category a:hover {
    color: var(--primary-dark);
}

.product-price {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.price-old {
    font-size: 1.2rem;
    color: var(--gray);
    text-decoration: line-through;
}

.price-current,
.price-sale {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.discount-badge {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.9rem;
    font-weight: 600;
}

.product-short-desc {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Product Actions */
.product-actions {
    margin-bottom: 30px;
}


.quantity-selector {
    margin-bottom: 20px;
}

.quantity-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    background: var(--secondary-color);
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--secondary-dark);
}

#quantity {
    border: none;
    padding: 12px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    width: 80px;
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 15px;
    margin-bottom: 15px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.btn-whatsapp:hover {
    background: #128C7E;
    border-color: #128C7E;
}

/* Product Meta */
.product-meta {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: var(--border-radius);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--secondary-dark);
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: var(--dark);
}

.meta-value {
    color: var(--text-color);
}

.in-stock {
    color: #059669;
    font-weight: 600;
}

.out-of-stock {
    color: #DC2626;
    font-weight: 600;
}

/* Product Tabs */
.product-tabs {
    margin: 50px 0;
}

.tab-navigation {
    display: flex;
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 30px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    min-height: 300px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.product-description,
.product-specifications,
.product-reviews {
    line-height: 1.8;
    color: var(--text-color);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--secondary-color);
}

.specs-table td {
    padding: 15px 0;
}

.spec-label {
    font-weight: 600;
    color: var(--dark);
    width: 30%;
}

.spec-value {
    color: var(--text-color);
}

/* Related Products */
.related-products {
    margin: 60px 0;
}

.section-title {
    font-family: var(--font-secondary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.product-card .product-image {
    height: 200px;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    padding: 10px;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-card .product-info {
    padding: 20px;
}

.product-card .product-name {
    margin-bottom: 15px;
}

.product-card .product-name a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.product-card .product-name a:hover {
    color: var(--primary-color);
}

.product-card .product-price {
    margin-bottom: 0;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    color: var(--dark);
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    transform: translateX(100%);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #059669;
}

.notification-error {
    border-left-color: #DC2626;
}

.notification-info {
    border-left-color: #2563EB;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-main {
        gap: 30px;
    }
    
    .product-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .product-main {
        margin: 20px 0;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .price-current,
    .price-sale {
        font-size: 1.6rem;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 1.6rem;
    }
    
    .price-current,
    .price-sale {
        font-size: 1.4rem;
    }
    
    .product-meta {
        padding: 15px;
    }
    
    .meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Price Contact Section */
.price-contact-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-lg);
    padding: 25px;
    text-align: center;
    margin: 20px 0;
}

.price-contact-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.price-contact-text i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

.price-contact-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-call {
    background: var(--success-color);
    color: white;
    border: 2px solid var(--success-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-call:hover {
    background: var(--success-dark);
    border-color: var(--success-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: 2px solid #25D366;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    background: #128C7E;
    border-color: #128C7E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .price-contact-section {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .price-contact-text {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .price-contact-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-call,
    .btn-whatsapp {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }
}
