/* -------------------------------------------------------------
 * ESTILIZAÇÃO PREMIUM - VITRINE LOMADEE
 * Tema: Dark Glassmorphism / Sleek Modern eCommerce
 * ------------------------------------------------------------- */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --bg-dark: #0B0F19;
    --bg-card: rgba(22, 28, 45, 0.65);
    --bg-card-hover: rgba(26, 35, 58, 0.85);
    --bg-header: rgba(11, 15, 25, 0.75);
    
    --primary-color: #6366F1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --primary-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    --accent-gradient: linear-gradient(135deg, #A855F7 0%, #6366F1 100%);
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    --success-color: #10B981;
    --danger-color: #EF4444;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header & Navigation */
.app-header {
    background-color: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.2rem 2rem;
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-icon {
    font-size: 2.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.brand-text h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.brand-text h1 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Search Bar */
.search-area {
    flex: 1;
    max-width: 480px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px var(--primary-glow);
}

.search-box input:focus + .search-icon {
    color: var(--primary-color);
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.2rem;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.clear-search-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Main Layout */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* Categories Filter Scroll */
.filters-section {
    margin-bottom: 2rem;
}

.categories-scroll {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.6rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.categories-scroll::-webkit-scrollbar {
    height: 4px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.category-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.category-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.category-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #FFF;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Metadata summary */
.results-meta {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

/* Product Card */
.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius-md);
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.card-gallery {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #FFF;
    overflow: hidden;
}

.card-gallery img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.2rem;
    transition: transform 0.5s ease;
}

.product-card:hover .card-gallery img {
    transform: scale(1.08);
}

/* Badge Desconto */
.discount-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--danger-color);
    color: #FFF;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius-sm);
    z-index: 2;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Card Body */
.card-body {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

.card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4rem;
}

.card-pricing {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.price-list {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 0.1rem;
}

.price-sale {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--success-color);
}

.btn {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.7rem 1.2rem;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #FFF;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    border-radius: var(--border-radius-md);
}

/* Empty State / Not Found */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Pagination */
.pagination-section {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-lg);
}

.pagination-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.pagination-btn:hover:not(:disabled) {
    color: var(--primary-color);
}

.pagination-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

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

/* Modal detail styling */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #111827;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-backdrop.open .modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-content {
    display: flex;
    flex-wrap: wrap;
}

.modal-gallery {
    flex: 1 1 350px;
    background: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    min-height: 350px;
}

.modal-gallery img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
}

.modal-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--danger-color);
    color: #FFF;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.modal-details {
    flex: 1 1 400px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.modal-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.modal-pricing {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.modal-price-list {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.modal-price-sale {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--success-color);
}

.modal-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 1.5rem;
}

.modal-details h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.modal-description::-webkit-scrollbar {
    width: 4px;
}

.modal-description::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.modal-description p {
    margin-bottom: 1rem;
}

.modal-description ul, .modal-description ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Loading Skeletons animation */
.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    height: 380px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.03) 20%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Footer styling */
.app-footer {
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 2rem;
    background: rgba(7, 10, 18, 0.85);
    text-align: center;
    margin-top: auto;
}

.footer-container p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.footer-container .footer-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

/* Responsive adjustments */
@media(max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .search-area {
        max-width: 100%;
    }
    .modal-content {
        flex-direction: column;
    }
    .modal-gallery {
        min-height: 250px;
        padding: 2rem;
    }
    .modal-gallery img {
        max-height: 250px;
    }
    .modal-details {
        padding: 2rem;
    }
}
