/* ============================================
   Detay Sayfası - Ürün Detay CSS
   ============================================ */

/* Hero Image */
.hero-image {
    height: 70vh;
    min-height: 500px;
    background: var(--primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    z-index: 1;
}
.hero-image .no-image {
    font-size: 120px;
    color: rgba(255,255,255,0.1);
}
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(17,24,39,1), transparent);
    z-index: 2;
}
.hero-thumbs {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}
.hero-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.2s;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb.active, .hero-thumb:hover { border-color: var(--white); transform: scale(1.1); }

/* Gallery Thumbs (under title) */
.gallery-thumbs { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.gallery-thumb { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; border: 2px solid var(--border); cursor: pointer; transition: all 0.2s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* Main Gallery */
.main-gallery { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 24px; }
.gallery-main {
    background: var(--bg);
    border-radius: 12px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
}
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.no-image-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999; }
.no-image-placeholder i { font-size: 60px; margin-bottom: 12px; }
.no-image-placeholder span { font-size: 14px; }

/* Content Area */
.content-section {
    margin-top: 100px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}
.content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    position: relative;
}

/* Main Content */
.main-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}
.main-header {
    padding: 32px;
}
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--accent); }
.main-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 16px;
}
.main-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    background: var(--bg);
    padding: 8px 14px;
    border-radius: 8px;
}
.meta-item i { color: var(--accent); }

.main-body { padding: 32px; }
.price-box {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price-amount { font-size: 28px; font-weight: 700; color: var(--accent); }
.price-note { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.price-badge {
    background: var(--success);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.details-table {
    margin-bottom: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.detail-row {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    width: 160px;
    padding: 12px 16px;
    background: var(--bg);
    font-size: 13px;
    color: var(--text-light);
    flex-shrink: 0;
}
.detail-value {
    flex: 1;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--primary);
    background: var(--white);
}
.detail-value a { color: var(--accent); }

.description-title { font-size: 18px; font-weight: 600; color: var(--primary); margin-bottom: 16px; }
.description-text { line-height: 1.8; color: var(--text); }

/* Seller Card */
.seller-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    position: sticky;
    top: 80px;
    border: 1px solid var(--border);
}
.seller-header {
    background: linear-gradient(135deg, #1e3a5f, #2d5a87);
    padding: 20px;
    text-align: center;
}
.seller-logo {
    background: var(--white);
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.seller-logo img { width: 100%; height: 100%; object-fit: cover; }
.seller-name { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 4px; }
.seller-location { font-size: 13px; color: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; gap: 5px; }

.seller-body { padding: 20px; }
.seller-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.stat-box {
    background: var(--bg);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid var(--border);
}
.stat-number { font-size: 18px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 10px; color: var(--text-light); text-transform: uppercase; margin-top: 2px; }

.seller-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-call { background: var(--success); color: var(--white); }
.btn-call:hover { background: #047857; transform: translateY(-1px); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: #1da851; transform: translateY(-1px); }
.btn-fav {
    border: 2px solid var(--border); background: var(--white); color: var(--text-light);
    font-size: 15px; transition: all 0.3s;
}
.btn-fav:hover { border-color: #ef4444; color: #ef4444; }
.btn-fav.active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
@keyframes heartPulse {
    0% { transform: scale(1); } 25% { transform: scale(1.15); }
    50% { transform: scale(1); } 75% { transform: scale(1.1); } 100% { transform: scale(1); }
}
.btn-fav.pulse i.fa-heart { animation: heartPulse 0.5s ease; }

/* Favorite toast */
.fav-toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(80px);
    background: var(--primary); color: white;
    padding: 12px 24px; border-radius: 12px;
    font-size: 14px; font-weight: 600;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 9999; opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex; align-items: center; gap: 8px;
}
.fav-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fav-toast.removed { background: #64748b; }

/* Login Modal */
.login-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(6px);
    z-index: 1001; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.login-modal-overlay.active { opacity: 1; visibility: visible; }
.login-modal {
    background: var(--white); border-radius: 20px;
    width: 95%; max-width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    transform: translateY(30px) scale(0.95); transition: transform 0.3s ease;
}
.login-modal-overlay.active .login-modal { transform: none; }
.login-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 28px 16px; border-bottom: 1px solid var(--border);
}
.login-modal-header h3 { font-size: 20px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.login-modal-header h3 i { color: var(--accent); }
.login-modal-close {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid var(--border); background: #f8fafc;
    color: var(--text-light); cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.login-modal-close:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }
.login-modal-body { padding: 24px 28px; }
.login-modal-footer { padding: 16px 28px 24px; border-top: 1px solid var(--border); }
.login-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: white; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; transition: transform 0.2s, box-shadow 0.2s;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30, 58, 95, 0.3); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.login-error {
    background: #fef2f2; color: #dc2626; border: 1px solid #fecaca;
    border-radius: 10px; padding: 12px 16px; font-size: 13px;
    margin-bottom: 16px; display: none; align-items: center; gap: 8px;
}
.login-error.show { display: flex; }
.login-divider {
    text-align: center; color: var(--text-light); font-size: 13px;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.login-divider a { color: var(--accent); text-decoration: none; font-weight: 600; }
.form-input-login {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; font-family: inherit; color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s; background: #f8fafc;
}
.form-input-login:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); background: white; }
.form-group-login { margin-bottom: 16px; }
.form-group-login label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

/* Similar Products */
.similar-section { margin-top: 60px; }
.section-title { font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 24px; }
.similar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.similar-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: all 0.2s; }
.similar-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.similar-img { height: 140px; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.similar-img img { width: 100%; height: 100%; object-fit: cover; }
.similar-img i { font-size: 36px; color: var(--border); }
.similar-body { padding: 16px; }
.similar-title { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 42px; }
.similar-price { font-size: 18px; font-weight: 700; color: var(--accent); }
.similar-meta { font-size: 12px; color: var(--text-light); margin-top: 6px; }

/* Footer */
.footer { background: var(--primary); color: rgba(255,255,255,0.6); padding: 32px 0; margin-top: 80px; text-align: center; font-size: 14px; }

/* ============================================
   Detay Responsive
   ============================================ */
@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
    .seller-card { position: static; }
    .similar-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-image { height: 50vh; min-height: 300px; }
    .container { padding: 0 16px; }
}
@media (max-width: 768px) {
    .header-nav { display: none; }
    .hero-image { height: 40vh; min-height: 250px; }
    .hero-image .no-image { font-size: 60px; }
    .hero-thumbs { gap: 8px; bottom: 16px; }
    .hero-thumb { width: 46px; height: 46px; }
    .content-section { margin-top: 60px; padding-bottom: 30px; }
    .content-grid { gap: 20px; }
    .main-header { padding: 20px; }
    .main-title { font-size: 20px; margin-bottom: 12px; }
    .main-meta { gap: 8px; }
    .meta-item { padding: 6px 10px; font-size: 13px; }
    .main-body { padding: 20px; }
    .price-box { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
    .price-amount { font-size: 24px; }
    .detail-label { width: 120px; font-size: 12px; padding: 10px 12px; }
    .detail-value { font-size: 12px; padding: 10px 12px; }
    .gallery-main { height: 280px; }
    .gallery-thumb { width: 42px; height: 42px; }
    .similar-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .similar-img { height: 110px; }
    .similar-body { padding: 12px; }
    .similar-title { font-size: 13px; height: auto; }
    .similar-price { font-size: 16px; }
    .section-title { font-size: 20px; margin-bottom: 16px; }
    .similar-section { margin-top: 30px; }
    .footer { padding: 24px 0; margin-top: 40px; font-size: 13px; }
    .seller-header { padding: 16px; }
    .seller-body { padding: 16px; }
    .logo img, .logo-mark { font-size: 16px; }
    .logo img { height: 32px !important; }
}
@media (max-width: 480px) {
    .similar-grid { grid-template-columns: 1fr; }
    .hero-image { height: 35vh; min-height: 200px; }
    .main-title { font-size: 18px; }
    .price-amount { font-size: 22px; }
    .detail-label { width: 100px; }
    .meta-item { font-size: 12px; padding: 5px 8px; }
    .content-section { margin-top: 40px; }
    .main-header { padding: 16px; }
    .main-body { padding: 16px; }
    .gallery-main { height: 220px; }
}

/* ============================================
   Lightbox Modal
   ============================================ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}
@keyframes lightboxZoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10001;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10001;
}
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}
.lightbox-thumbs {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10001;
}
.lightbox-thumb {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.6;
}
.lightbox-thumb.active { border-color: #fff; opacity: 1; transform: scale(1.1); }
.lightbox-thumb:hover { opacity: 1; }
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; }
