﻿/* --- Base & Container --- */
.details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    color: var(--text-primary);
    animation: fadeIn 0.5s ease-out;
    margin-top: 90px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.feature i {
    color: var(--green-2);
    font-size: 0.9rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

    .breadcrumb a {
        color: var(--text-secondary);
        text-decoration: none;
        transition: color 0.3s;
    }

        .breadcrumb a:hover {
            color: var(--green-1);
        }

    .breadcrumb .separator {
        opacity: 0.5;
    }

    .breadcrumb .current {
        color: var(--text-primary);
        font-weight: 600;
    }

/* --- Main Product Grid --- */
.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* --- Gallery --- */
.product-gallery {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.main-image-wrapper {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

    .main-image:hover {
        transform: scale(1.05);
    }

.thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: var(--dark-card);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .thumb:hover, .thumb.active {
        border-color: var(--green-1);
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
    }

    .thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

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

.product-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.product-meta {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.meta-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 600;
}

.code-badge {
    background: var(--gradient-soft);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-family: monospace;
    letter-spacing: 1px;
}

/* --- Buttons --- */
.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-add-to-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--gradient-main);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

    .btn-add-to-cart:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4);
    }

.btn-favorite {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-favorite:hover {
        background: rgba(239, 68, 68, 0.1);
        border-color: #ef4444;
        color: #ef4444;
    }

/* --- Details Tabs (Desc & Attrs) --- */
.product-details-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.detail-card {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-right: 1rem;
}

    .section-title::before {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: var(--gradient-accent);
        border-radius: 4px;
    }

.description-content, .attributes-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    text-align: justify;
}

/* --- Similar Products --- */
.similar-products {
    margin-top: 2rem;
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.similar-card {
    background: var(--dark-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

    .similar-card:hover {
        transform: translateY(-8px);
        border-color: var(--green-2);
        box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    }

.similar-image {
    aspect-ratio: 1 / 1;
    background: var(--gradient-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

    .similar-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.4s ease;
    }

.similar-card:hover .similar-image img {
    transform: scale(1.08);
}

.similar-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.similar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    height: 2.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.similar-brand {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.btn-view-details {
    margin-top: 0.5rem;
    padding: 0.6rem;
    text-align: center;
    background: var(--gradient-soft);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--green-1);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .btn-view-details:hover {
        background: var(--gradient-main);
        color: #fff;
        border-color: transparent;
    }

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        position: static;
    }

    .product-details-tabs {
        grid-template-columns: 1fr;
    }

    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .details-container {
        padding: 1rem;
    }

    .product-title {
        font-size: 1.5rem;
    }

    .similar-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-favorite {
        width: 100%;
        height: 50px;
    }
}
