@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --wine-dark: #631728;
    --wine-light: #8b253b;
    --bg-color: #f7f5f0;
    --text-main: #333333;
    --text-muted: #777777;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
}

h1, h2, h3, .serif {
    font-family: 'Playfair Display', serif;
    color: var(--wine-dark);
}

/* === Telas de Login e Registro === */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 5px;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.auth-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.auth-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transform: translateY(-50%);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: var(--wine-dark);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--wine-light);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--wine-dark);
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-top: 5px;
}

/* === Tela Home (Web) === */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: var(--bg-color);
}

header .logo {
    flex: 1;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 700;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

nav span {
    margin: 0 15px;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
}

nav span.active {
    color: var(--wine-dark);
    border-bottom: 2px solid var(--wine-dark);
    padding-bottom: 5px;
}

.cart {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    color: var(--wine-dark);
}

.cart svg {
    width: 24px;
    height: 24px;
}

.hero {
    background-image: linear-gradient(rgba(30, 23, 20, 0.24), rgba(30, 23, 20, 0.24)), url('https://images.unsplash.com/photo-1562601579-599dec564e06?auto=format&fit=crop&w=2400&q=90');
    background-size: cover;
    background-position: center;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 50px;
    margin: 0 50px;
    border-radius: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    max-width: 500px;
    margin-bottom: 20px;
}

.hero input {
    width: 100%;
    padding: 15px 20px 15px 48px;
    box-sizing: border-box !important;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-field {
    position: relative;
    display: block;
    width: min(100%, 520px);
}

.search-field input {
    box-sizing: border-box;
}

.search-field svg {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--wine-dark);
    transform: translateY(-50%);
}

.section-title {
    margin: 50px 50px 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1200px;
    padding: 0 32px;
    margin: 0 auto 64px;
    box-sizing: border-box;
}

.product-card {
    background: var(--white);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    box-sizing: border-box;
    justify-self: center;
}

.product-card img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    margin-bottom: 15px;
}

.tags span {
    background: #eee;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    margin: 0 5px;
}

.product-card h3 {
    margin: 15px 0 5px 0;
    font-size: 1.3rem;
}

.product-card .desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.product-card .price {
    font-weight: 600;
    color: #8b6d3b;
    margin-bottom: 15px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--wine-dark);
    color: var(--wine-dark);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: 0.3s;
    box-sizing: border-box;
}

.product-card .btn-primary {
    box-sizing: border-box;
}

.btn-outline:hover {
    background: var(--wine-dark);
    color: var(--white);
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 30px 24px;
    background: #eeeae2;
    color: var(--text-muted);
    text-align: center;
}

.site-footer .serif {
    color: var(--wine-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.site-footer p,
.site-footer small {
    margin: 0;
    font-size: 0.85rem;
}

@media (max-width: 760px) {
    header {
        padding: 18px 24px;
    }

    nav span {
        margin: 0 8px;
        font-size: 0.8rem;
    }

    .hero {
        height: 340px;
        padding: 0 28px;
        margin: 0 24px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        margin: 40px 24px 20px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 24px;
    }
}

@media (max-width: 520px) {
    header {
        flex-wrap: wrap;
        gap: 14px;
    }

    header .logo,
    .cart {
        flex: 1 1 30%;
    }

    nav {
        order: 3;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    nav span {
        margin: 0 10px;
    }

    .hero {
        height: 300px;
        padding: 0 20px;
        margin: 0 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        margin-right: 16px;
        margin-left: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
}

:root {
    --wine: #741b31;
    --wine-hover: #571222;
    --ink: #282621;
    --muted: #77746d;
    --paper: #f8f6f1;
    --line: #dedbd3;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
}

.site-header {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 5vw, 72px);
}

.site-header .logo {
    flex: 0 0 auto;
    color: var(--wine);
    font-size: 1.8rem;
    text-decoration: none;
}

.header-login,
.back-home {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 1px solid var(--wine);
    border-radius: 5px;
    color: var(--wine);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.header-login:hover,
.back-home:hover {
    background: var(--wine);
    color: #fff;
}

.hero {
    min-height: 400px;
    height: auto;
    justify-content: center;
    margin: 0 15px 30px;
    padding: 48px clamp(28px, 3vw, 52px);
    border-radius: 20px;
    background-position: center 54%;
}

.hero h1 {
    max-width: 570px;
    margin: 0 0 22px;
    font-size: clamp(2.7rem, 4vw, 3.5rem);
    line-height: 1.22;
}

.search-field {
    width: min(100%, 520px);
}

.search-field input {
    width: 100%;
    height: 48px;
    padding: 0 18px 0 48px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    min-height: calc(100vh - 76px);
    padding: 18px clamp(24px, 5vw, 72px) 48px;
    gap: clamp(36px, 7vw, 100px);
}

.auth-story {
    display: flex;
    min-height: 590px;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: clamp(28px, 5vw, 64px);
    border-radius: 8px;
    background-image: linear-gradient(0deg, rgba(17, 16, 13, 0.77), rgba(17, 16, 13, 0.05) 80%), url('https://images.unsplash.com/photo-1510812431401-41d2bd2722f3?auto=format&fit=crop&w=1500&q=85');
    background-size: cover;
    background-position: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--wine);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-story .eyebrow {
    color: #f4e7d5;
}

.auth-story h1 {
    max-width: 520px;
    margin: 10px 0 0;
    color: #fff;
    font-size: clamp(2.5rem, 4vw, 4rem);
    line-height: 1.15;
}

.auth-form-panel {
    align-self: center;
    width: 100%;
    max-width: 440px;
    padding: 32px 0;
}

.auth-form-panel h2 {
    margin: 0;
    color: var(--wine);
    font-size: 2.35rem;
}

.form-intro {
    margin: 12px 0 30px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.field-label {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
}

.text-field {
    width: 100%;
    height: 50px;
    margin: 0 0 20px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.text-field:focus {
    border-color: var(--wine);
    outline: 2px solid rgba(116, 27, 49, 0.15);
}

.btn-primary {
    width: 100%;
    min-height: 50px;
    margin-top: 4px;
    padding: 0 18px;
    border: 0;
    border-radius: 5px;
    background: var(--wine);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.btn-primary:hover {
    background: var(--wine-hover);
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

.auth-switch a {
    display: inline;
    margin: 0 0 0 4px;
    color: var(--wine);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

@media (max-width: 760px) {
    .site-header {
        min-height: 68px;
        padding: 0 22px;
    }

    .hero {
        min-height: 360px;
        margin: 0 12px 24px;
        padding: 32px 24px;
        background-position: 58% center;
    }

    .hero h1 {
        max-width: 440px;
        font-size: 2.7rem;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 12px 22px 40px;
        gap: 24px;
    }

    .auth-story {
        min-height: 280px;
        padding: 28px;
        background-position: center 58%;
    }

    .auth-story h1 {
        max-width: 420px;
        font-size: 2.6rem;
    }

    .auth-form-panel {
        max-width: none;
        padding: 16px 4px 0;
    }
}

@media (max-width: 520px) {
    .site-header {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .hero h1 {
        font-size: 2.35rem;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-form-panel h2 {
        font-size: 2rem;
    }
}

/* Account flow feedback and compact layouts */
.auth-page { background: #fff8f5; }
.auth-page .site-header { max-width: 1280px; margin: 0 auto; }
.auth-layout { max-width: 1280px; margin: 0 auto; }
.auth-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.auth-steps span { flex: 1 1 auto; padding: 9px 10px; border-bottom: 2px solid #ded4cd; color: #74645d; font-size: .72rem; font-weight: 600; text-align: center; }
.auth-steps .current { border-color: #800020; color: #800020; background: #f9eceb; }
.auth-steps .complete { border-color: #4c775a; color: #375a40; }
.form-message { display: flex; flex-direction: column; gap: 4px; margin: 0 0 22px; padding: 15px 18px; border: 1px solid; border-left-width: 4px; border-radius: 4px; font-size: .9rem; line-height: 1.5; }
.form-message strong { font-size: .93rem; }
.form-message-error { border-color: #b94b4b; background: #fff0ee; color: #762526; }
.form-message-success { border-color: #3f7758; background: #eff8f0; color: #28513a; }
.form-message-info { border-color: #800020; background: #fbefef; color: #570013; }
.auth-page .text-field:focus-visible, .auth-page a:focus-visible, .auth-page button:focus-visible { outline: 3px solid #b45970; outline-offset: 2px; }
@media (max-width: 760px) {
  .auth-layout { gap: 22px; padding: 12px 20px 42px; }
  .auth-story { min-height: 220px; padding: 26px; }
  .auth-story h1 { font-size: clamp(2rem, 7vw, 2.7rem); }
  .auth-form-panel { max-width: 520px; margin: 0 auto; padding: 0; }
}
@media (max-width: 420px) {
  .auth-story { min-height: 170px; }
  .auth-story h1 { font-size: 1.8rem; }
  .auth-steps span { font-size: .63rem; padding: 8px 4px; }
  .auth-form-panel h2 { font-size: 1.8rem; }
}
