/* Catalog4All - Catálogo Público */

/* Variables */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #25d366;
    --danger-color: #ef4444;
    
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #1e293b;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== LOADING ==================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== HEADER ==================== */
.catalog-header {
    background: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
}

.brand-text h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.brand-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==================== SEARCH BAR ==================== */
.search-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-size: 18px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 15px 50px 15px 50px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-clear {
    position: absolute;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    color: var(--text-secondary);
}

/* ==================== CATEGORIES ==================== */
.categories-section {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex-shrink: 0;
    padding: 12px 20px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
    background: white;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-chip.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
}

.category-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* ==================== MAIN CONTENT ==================== */
.catalog-main {
    padding: 30px 0;
    min-height: 60vh;
}

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

/* ==================== PRODUCT CARD ==================== */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

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

.product-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
}

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

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--danger-color);
    color: white;
    z-index: 1;
}

.product-featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.product-body {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-compare-price {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-discount {
    padding: 4px 8px;
    background: var(--danger-color);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.product-footer {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #20bd5f;
}

.btn-secondary {
    background: var(--text-light);
    color: white;
}

.btn-secondary:hover {
    background: var(--text-secondary);
}

.btn-outline {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

.btn-whatsapp {
    background: #25d366 !important;
}

.btn-whatsapp:hover {
    background: #20bd5f !important;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 80px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
}

/* ==================== LOAD MORE ==================== */
.load-more-container {
    text-align: center;
    padding: 30px 0;
}

.loading-more {
    text-align: center;
    padding: 40px 0;
}

/* ==================== FOOTER ==================== */
.catalog-footer {
    background: var(--bg-dark);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info > div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
    width: 20px;
    color: var(--primary-color);
}

.contact-info a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.quick-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.footer-bottom p {
    margin: 5px 0;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.powered-by i {
    color: var(--primary-color);
}

/* ==================== PRODUCT MODAL ==================== */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 1200px;
    margin: 50px auto;
    z-index: 1001;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: var(--shadow-lg);
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.modal-close:hover {
    transform: rotate(90deg);
    background: var(--danger-color);
    color: white;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* Gallery */
.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--bg-light);
    border-radius: 15px;
    overflow: hidden;
}

.modal-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
    cursor: zoom-in;
}

.modal-main-image.zoomed {
    cursor: zoom-out;
}

.image-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.zoom-btn {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: none;
    background: white;
    box-shadow: var(--shadow-lg);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.zoom-btn:hover {
    background: var(--primary-color);
    color: white;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

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

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

/* Modal Details */
.modal-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.modal-header-info {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 15px;
}

.modal-header-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.modal-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 15px;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-price {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 24px;
    color: var(--text-light);
    text-decoration: line-through;
}

.discount-badge {
    padding: 8px 15px;
    background: var(--danger-color);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
}

.modal-description h3,
.modal-attributes h3 {
    font-size: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.modal-description p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.attribute-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.attribute-item:last-child {
    border-bottom: none;
}

.attribute-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.attribute-value {
    flex: 1;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--danger-color);
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .brand-text h1 {
        font-size: 20px;
    }
    
    .brand-text p {
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .modal-content {
        margin: 20px;
        border-radius: 15px;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .main-image-container {
        height: 350px;
    }
    
    .modal-header-info h2 {
        font-size: 24px;
    }
    
    .current-price {
        font-size: 32px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

