/* Modelos Page Specific Styles */

/* Loading Bar */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background-color: var(--primary-color);
    width: 0%;
    z-index: 2000;
    transition: width 0.3s ease;
}

/* Page Header (Compact) */
.page-header.compact {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 100px 0 30px; /* Reduced padding */
    text-align: center;
}

.page-header.compact .page-title {
    font-size: 2.5rem; /* Smaller font */
    color: var(--white);
    margin-bottom: 5px;
}

.page-header.compact .page-subtitle {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    margin: 0 auto;
}

/* Catalog Section */
.catalog-section {
    padding: 40px 0;
    min-height: 600px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 20px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.quick-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-light);
}

.filter-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-chip.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-filter-toggle {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    font-weight: 600;
}

.btn-filter-toggle:hover {
    background-color: var(--bg-light);
    border-color: var(--text-color);
}

.filter-info {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Mobile adjustments for quick filters */
@media (max-width: 768px) {
    .filter-controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .quick-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-chip {
        flex-shrink: 0;
    }
}

/* Sidebar Styles */
.filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background-color: var(--white);
    z-index: 2001;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.filter-sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-color);
    color: var(--white);
}

.sidebar-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--white);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-group-sidebar {
    margin-bottom: 30px;
}

.filter-group-sidebar h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-weight: 700;
}

/* Checkbox Styles */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
    color: var(--text-color);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #eee;
    border: 1px solid #ddd;
    border-radius: 2px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
    cursor: pointer; /* Indicate clickable */
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-brand {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.product-action {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.product-card:hover .product-action {
    border-bottom-color: var(--primary-color);
}

/* Modal Styles */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white);
    width: 95%;
    max-width: 1200px;
    max-height: 95vh;
    overflow-y: auto;
    border-radius: 4px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    color: var(--secondary-color);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.modal-image-container {
    position: relative;
    background-color: #f9f9f9;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* overflow: hidden; Removed to allow zoom result to show */
}

.modal-image-container img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Zoom Lens & Result */
.zoom-lens {
    position: absolute;
    border: 1px solid #888;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: crosshair;
    display: none; /* Hidden by default */
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.zoom-result {
    position: absolute;
    top: 0;
    left: 100%;
    width: 450px; /* Square to match lens aspect ratio */
    height: 450px; /* Square to match lens aspect ratio */
    background-color: white;
    border: 1px solid #e0e0e0;
    z-index: 100;
    display: none; /* Hidden by default */
    background-repeat: no-repeat;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
    margin-left: 20px; /* Spacing from image */
    border-radius: 4px;
    pointer-events: none; /* Let clicks pass through if needed */
}

.modal-details {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-brand {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.modal-description {
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.8;
}

.modal-specs {
    margin-bottom: 30px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.spec-item:last-child {
    margin-bottom: 0;
}

.spec-item .label {
    font-weight: 600;
    color: var(--secondary-color);
}

.spec-item .value {
    color: var(--text-light);
}

/* Skeleton Loading */
.skeleton-card {
    height: 350px;
    background-color: #f0f0f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .modal-grid {
        grid-template-columns: 1fr;
    }
    .modal-image-container {
        height: 300px;
    }
    .zoom-result {
        display: none !important; /* Disable zoom on smaller screens */
    }
    .zoom-lens {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .page-header.compact .page-title {
        font-size: 2rem;
    }
    .filter-sidebar {
        width: 85%;
    }
}
