:root {
    --preto: #160006;
    --vinho: #2a0610;
    --vinho-card: #3a101b;
    --vinho-borda: #6f2939;
    --vermelho: #7c1024;
    --dourado: #d6a84f;
    --dourado-claro: #f3d17a;
    --texto: #fff6e5;
}

* {
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texto);
    background:
        radial-gradient(circle at top left, rgba(111, 41, 57, 0.20), transparent 34%),
        linear-gradient(180deg, #2a0610 0%, #26050d 48%, #1b0208 100%);
    min-height: 100vh;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: 72px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(38, 5, 13, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(111, 41, 57, 0.65);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 800;
    color: var(--dourado-claro);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.category-form select {
    max-width: 190px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(111, 41, 57, 0.95);
    background: #2a0610;
    color: var(--dourado-claro);
    font-weight: 700;
    outline: none;
}

.feed {
    width: 100%;
}

.product-post,
.empty-state {
    min-height: 100vh;
    padding: 92px 14px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
}

.product-card {
    width: min(92vw, 520px);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(58, 16, 27, 0.96), rgba(42, 6, 16, 0.96));
    border: 1px solid rgba(111, 41, 57, 0.85);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
    position: relative;
}

.image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #22040b;
    display: grid;
    place-items: center;
    padding: 16px;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.product-info {
    padding: 15px 16px 8px;
}

.product-info h2 {
    margin: 0 0 6px;
    color: var(--dourado-claro);
    font-size: 22px;
}

.product-info p {
    margin: 0;
    color: rgba(255, 246, 229, 0.82);
    line-height: 1.35;
}

.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 18px;
}

.price {
    color: var(--dourado-claro);
    font-size: 24px;
}

.buy-button {
    text-decoration: none;
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--dourado-claro), var(--dourado));
    color: #240006;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(214, 168, 79, 0.35);
}

.comments-box {
    width: min(92vw, 520px);
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(58, 16, 27, 0.92), rgba(42, 6, 16, 0.92));
    border: 1px solid rgba(111, 41, 57, 0.75);
}

.comments-box summary {
    cursor: pointer;
    color: var(--dourado-claro);
    font-weight: 800;
}

.details-content {
    margin-top: 12px;
    color: rgba(255, 246, 229, 0.9);
    line-height: 1.5;
}

.empty-state {
    text-align: center;
}

@media (max-width: 520px) {
    .topbar {
        height: 66px;
        padding: 8px 10px;
    }

    .logo {
        width: 36px;
        height: 36px;
    }

    .category-form select {
        max-width: 145px;
        font-size: 12px;
    }

    .product-post {
        padding-top: 78px;
    }

    .price {
        font-size: 20px;
    }

    .buy-button {
        padding: 11px 14px;
        font-size: 14px;
    }
}

/* Galeria de fotos do produto */
.product-gallery {
    position: relative;
    overflow: hidden;
}

.product-gallery .gallery-image {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.product-gallery .gallery-image.active {
    opacity: 1;
    visibility: visible;
    position: absolute;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(243, 209, 122, 0.75);
    background: rgba(0, 0, 0, 0.52);
    color: var(--dourado-claro);
    font-size: 34px;
    line-height: 34px;
    cursor: pointer;
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

.gallery-arrow:hover {
    background: rgba(93, 0, 21, 0.85);
}

.gallery-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    border: 1px solid rgba(243, 209, 122, 0.45);
    color: var(--dourado-claro);
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 520px) {
    .gallery-arrow {
        width: 36px;
        height: 36px;
        font-size: 30px;
    }
}
