/* ========================================================
   SISTEMA DE DESIGN - VITRINE PREMIUM MOBILE
   ======================================================== */

:root {
    /* Paleta de Cores Premium */
    --bg-color: #f4f6f8;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent-color: #ffe600; /* Amarelo Mercado Livre */
    --btn-text: #2d3277;
    --price-color: #059669; /* Verde padrão preço */
    --free-shipping: #059669;
    --discount-bg: #ef4444;
    
    /* Variáveis base */
    --header-height: 70px;
    --border-radius-sm: 10px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
}

/* ========================================================
   HEADER & NAVIGATION
   ======================================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo i {
    font-size: 28px;
}

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

.icon-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: rgba(0,0,0,0.05);
}

/* ========================================================
   HERO BANNER
   ======================================================== */

.hero-banner {
    margin-top: calc(var(--header-height) + 16px);
    margin-left: 20px;
    margin-right: 20px;
    background: linear-gradient(135deg, var(--btn-text) 0%, #43499e 100%);
    border-radius: var(--border-radius-lg);
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: var(--shadow-md);
    max-width: 1160px;
}

@media (min-width: 1200px) {
    .hero-banner { margin-left: auto; margin-right: auto; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-banner h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.hero-banner p {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
    max-width: 280px;
}

.hero-pattern {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

/* ========================================================
   MAIN CONTENT & PRODUCTS
   ======================================================== */

.products-section {
    padding: 32px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.results-count {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.08);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.filter-btn:active {
    transform: scale(0.95);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease backwards;
}

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

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

.product-card:active {
    transform: scale(0.96);
}

.product-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius-sm);
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 12px;
    overflow: hidden;
}

.product-img-container img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s ease;
}

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

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--discount-bg);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.product-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.pricing {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.current-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.shipping {
    font-size: 11px;
    color: var(--free-shipping);
    font-weight: 700;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.shipping i {
    font-size: 14px;
}

.buy-btn {
    background: var(--btn-text);
    color: white;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.buy-btn i {
    font-size: 16px;
}

.product-card:hover .buy-btn {
    background: #1e2259;
}

/* ========================================================
   SKELETON LOADER
   ======================================================== */

.skeleton {
    background: var(--card-bg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    padding: 12px;
    height: 280px;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius-sm);
    background: #e2e8f0;
    animation: pulse 1.5s infinite ease-in-out;
    margin-bottom: 12px;
}

.skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.skeleton-text {
    height: 12px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 8px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-text.short {
    width: 70%;
    margin-bottom: 16px;
}

.skeleton-price {
    height: 24px;
    width: 50%;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: auto;
    margin-bottom: 12px;
    animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-btn {
    height: 36px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 8px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* ========================================================
   TOAST
   ======================================================== */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-hover);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    white-space: nowrap;
}

.toast.show {
    bottom: 30px;
}
