/* Pages CSS - Category and Product Pages */

/* Navigation Override for Pages */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    margin-left: 1rem;
}

.nav-menu {
    margin-right: 1rem;
}

/* Page Hero */
.page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
}

/* Products List Page */
.products-list {
    padding: 60px 0;
    background: var(--light-color);
}

.products-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card-page {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-page:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card-page-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-card-page-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card-page:hover .product-card-page-image img {
    transform: scale(1.1);
}

.product-card-page-content {
    padding: 20px;
}

.product-card-page-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.product-card-page-description {
    color: var(--gray-color);
    font-size: 0.95rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-page-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Product Detail Page */
.product-detail {
    padding: 80px 0 60px;
    background: var(--light-color);
}

.product-detail .breadcrumb {
    margin-bottom: 30px;
}

.product-detail .breadcrumb a,
.product-detail .breadcrumb span {
    color: var(--gray-color);
}

.product-detail .breadcrumb a:hover {
    color: var(--primary-color);
}

.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 60px;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
}

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

.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.thumbnail-image {
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.thumbnail-image:hover,
.thumbnail-image.active {
    border-color: var(--primary-color);
}

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

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

.product-info h1 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.product-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--light-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
    width: fit-content;
}

.product-description h3,
.product-details h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.product-description p {
    color: var(--gray-color);
    line-height: 1.8;
    font-size: 1.05rem;
}

.product-details ul {
    list-style: none;
    padding: 0;
}

.product-details li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-details li:last-child {
    border-bottom: none;
}

.product-details li i {
    color: var(--primary-color);
}

.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-large {
    padding: 18px 35px;
    font-size: 1.1rem;
}

/* Related Products */
.related-products {
    margin-top: 60px;
}

.related-products h2 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 30px;
}

/* Lightbox */
.lightbox {
    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;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-close:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: white;
    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%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    color: #333;
    font-weight: 600;
}

.main-image {
    cursor: zoom-in;
}

.thumbnail-image {
    cursor: pointer;
}

/* Responsive */
@media (max-width: 968px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }

    .main-image {
        height: 400px;
    }

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

    .product-actions a,
    .product-actions button {
        width: 100%;
        justify-content: center;
    }

    .page-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        z-index: 999;
        padding: 20px 0;
        gap: 0;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 15px 20px;
        width: 100%;
        display: block;
        border-bottom: 1px solid #e9ecef;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .hamburger {
        display: flex !important;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .products-grid-page {
        grid-template-columns: 1fr;
    }

    .product-detail {
        padding: 60px 0 40px;
    }

    .product-detail-content {
        padding: 25px;
    }

    .product-info h1 {
        font-size: 1.8rem;
    }

    .main-image {
        height: 300px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
        font-size: 1.2rem;
    }

    .lightbox-counter {
        bottom: 10px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}
