* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #f3f6f9;
    color: #1f2937;
}

.store-header {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.22), transparent 36%),
        radial-gradient(circle at 80% 15%, rgba(0,168,232,0.22), transparent 28%),
        linear-gradient(135deg, #08111d 0%, #0d2234 48%, #0a7bb0 100%);
    color: white;
    padding: 40px 20px 36px;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08), 0 14px 40px rgba(8,17,29,0.2);
}

.store-header-content {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.back-link {
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.back-link:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
    transform: translateY(-1px);
}

.store-header-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.88);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.store-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.store-title-wrap > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.store-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.store-title-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.22));
}

.store-header p {
    margin: 0;
    max-width: 700px;
    color: rgba(255,255,255,0.82);
    font-size: 1.03rem;
    line-height: 1.6;
}

.store-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    color: rgba(255,255,255,0.72);
    font-size: 0.86rem;
    margin-top: 20px;
}

.store-header-meta span:nth-child(odd) {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}

.store-main {
    max-width: 1100px;
    margin: 24px auto 40px;
    padding: 0 20px;
}

.store-controls {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 12px;
    margin-bottom: 20px;
}

.store-input {
    width: 100%;
    border: 2px solid #dbe3ea;
    border-radius: 12px;
    background: white;
    color: #1f2937;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
}

.store-input:focus {
    outline: none;
    border-color: #00A8E8;
}

.store-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.store-btn-primary {
    background: #00A8E8;
    color: white;
}

.store-btn-primary:hover {
    background: #008ac1;
}

.store-btn-secondary {
    background: #e7edf2;
    color: #1f2937;
}

.store-btn-secondary:hover {
    background: #d7e1e8;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.store-card {
    position: relative;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e3e8ef;
    box-shadow: 0 8px 22px rgba(13, 38, 76, 0.08);
}

.store-card-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    object-position: center;
    display: block;
    padding: 10px;
    background: linear-gradient(145deg, rgba(0,168,232,0.10), rgba(255,255,255,0.95));
}

.store-card-image-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf3f8;
}

.store-placeholder-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: rgba(0, 168, 232, 0.12);
    color: #00A8E8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.store-card-content {
    padding: 15px;
}

.store-card-category {
    margin: 0 0 6px;
    color: #00A8E8;
    font-size: 0.82rem;
    font-weight: 700;
}

.store-card h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.store-card-description {
    margin: 0 0 10px;
    color: #6b7280;
    min-height: 42px;
    font-size: 0.92rem;
}

.store-card-price {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00A8E8;
}

.store-price-old {
    color: #8b95a1;
    text-decoration: line-through;
    margin-right: 6px;
    font-size: 0.95rem;
}

.store-price-new {
    color: #dc2626;
}

.store-card-stock {
    margin: 0 0 12px;
    color: #6b7280;
    font-size: 0.85rem;
}

.store-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.store-buy-btn {
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 6px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.store-buy-btn:hover {
    background: #1ebe5a;
    transform: translateY(-1px);
}

.store-pix-btn {
    background: #00BDAE;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 6px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.store-pix-btn:hover {
    background: #009e91;
    transform: translateY(-1px);
}

.store-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
}

.store-empty {
    text-align: center;
    color: #6b7280;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .store-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .store-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .store-grid {
        grid-template-columns: 1fr;
    }

    .store-header {
        padding: 26px 16px 24px;
    }

    .store-title-wrap {
        align-items: flex-start;
        gap: 12px;
    }

    .store-title-logo {
        width: 48px;
        height: 48px;
    }

    .store-title {
        font-size: 1.8rem;
    }

    .store-header p {
        font-size: 0.98rem;
    }

    .store-header-meta {
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .store-featured-grid { grid-template-columns: 1fr; gap: 14px; }
    .store-featured-section { padding: 16px; }
    .store-featured-title { font-size: 1.3rem; }
}

/* ── Estoque ──────────────────────────────────────────────────────────────── */

.stock-empty { color: #dc2626; font-weight: 600; }
.stock-low { color: #ea580c; font-weight: 600; }
.stock-ok { color: #6b7280; }
.store-card--out-of-stock { opacity: 0.55; pointer-events: none; }
.store-card--out-of-stock .store-buy-btn,
.store-card--out-of-stock .store-pix-btn { background: #9ca3af; cursor: not-allowed; }
.store-badge-out-of-stock { background: #6b7280 !important; }
.store-badge-featured { background: #f59e0b !important; color: #1f2937 !important; }

/* ── Seção Promoções do Dia ──────────────────────────────────────────────── */

.store-featured-section { margin-bottom: 28px; padding: 24px; border-radius: 16px; background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 50%, #fef9c3 100%); border: 2px solid #fbbf24; }
.store-featured-header { text-align: center; margin-bottom: 20px; }
.store-featured-eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #f59e0b; color: #1f2937; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; }
.store-featured-title { margin: 0 0 4px; font-size: 1.6rem; color: #92400e; }
.store-featured-subtitle { margin: 0; color: #a16207; font-size: 0.92rem; }
.store-featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.store-card--featured { border: 2px solid #f59e0b; }


/* ── PIX Modal ─────────────────────────────────────────────────────────────── */

.pix-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 17, 29, 0.72);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: pixFadeIn 0.2s ease;
}

.pix-modal-overlay[hidden] {
    display: none;
}

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

.pix-modal {
    background: #fff;
    border-radius: 24px;
    padding: 32px 28px 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 32px 80px rgba(8, 17, 29, 0.28), 0 0 0 1px rgba(0,189,174,0.18);
    animation: pixSlideUp 0.25s ease;
}

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

.pix-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f6f9;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4b5563;
    transition: background 0.2s;
}

.pix-modal-close:hover {
    background: #e3eaf0;
    color: #111;
}

.pix-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.pix-logo-badge {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, rgba(0,189,174,0.12), rgba(0,189,174,0.22));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pix-modal-title {
    margin: 0 0 4px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #0d2234;
}

.pix-modal-subtitle {
    margin: 0;
    font-size: 0.88rem;
    color: #6b7280;
}

.pix-product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f6f9;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 22px;
    gap: 12px;
}

.pix-product-name {
    font-size: 0.93rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pix-product-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #00BDAE;
    white-space: nowrap;
}

.pix-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pix-qr-box {
    width: 228px;
    height: 228px;
    border-radius: 16px;
    border: 3px solid rgba(0,189,174,0.25);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.pix-qr-img {
    width: 220px;
    height: 220px;
    display: block;
}

.pix-qr-loading {
    font-size: 0.88rem;
    color: #9ca3af;
    text-align: center;
    padding: 16px;
}

.pix-qr-fallback {
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    padding: 16px;
    line-height: 1.6;
}

.pix-qr-hint {
    margin: 0;
    font-size: 0.82rem;
    color: #9ca3af;
    text-align: center;
}

.pix-key-row {
    margin-bottom: 22px;
}

.pix-proof-note {
    margin: -6px 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef6ff;
    border: 1px solid #d9e9ff;
    color: #4b5563;
    font-size: 0.84rem;
    line-height: 1.45;
}

.pix-key-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.pix-key-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f3f6f9;
    border-radius: 10px;
    padding: 10px 14px;
}

.pix-key-value {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.97rem;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: 0.04em;
}

.pix-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #00BDAE;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.pix-copy-btn:hover {
    background: #009e91;
}

.pix-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pix-btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 14px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: inherit;
}

.pix-btn-whatsapp:hover {
    background: #1ebe5a;
    transform: translateY(-1px);
}

.pix-btn-close {
    background: transparent;
    border: 2px solid #e3eaf0;
    color: #6b7280;
    border-radius: 14px;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.pix-btn-close:hover {
    border-color: #c0cad4;
    color: #374151;
}

@media (max-width: 460px) {
    .pix-modal {
        padding: 24px 18px 20px;
    }

    .pix-modal-title {
        font-size: 1.15rem;
    }
}
