/* ===== Casa do Almanaque — componentes complementares (páginas internas) ===== */
/* Usa as mesmas custom properties definidas em site.css */

.page-hero { background: var(--paper-2); padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-top: 10px; font-size: clamp(32px, 4.5vw, 50px); letter-spacing: -.03em; line-height: 1.05; }
.page-hero p { max-width: 520px; margin-top: 14px; color: #69716a; font-size: 14px; line-height: 1.7; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9aa19a; margin: 26px 0; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--ink); }

.alert { border-radius: 4px; padding: 14px 18px; font-size: 13px; margin-bottom: 22px; border: 1px solid transparent; }
.alert-success { background: #eef4ee; border-color: #cfe0cf; color: #2f5233; }
.alert-error { background: #fbeceb; border-color: #eecac6; color: var(--red-deep); }

/* Padronização de imagens de produtos */
.product-visual,
.pdp-media,
.cart-line img,
.drawer .cart-item img {
    aspect-ratio: 2 / 3;
}

.product-visual img,
.pdp-media img,
.cart-line img,
.drawer .cart-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.product-visual,
.pdp-media {
    background: var(--paper-2);
    border-radius: 4px;
    overflow: hidden;
}

.cart-line img,
.drawer .cart-item img {
    border-radius: 2px;
}

/* Product detail */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 10px 0 90px; align-items: start; }
.pdp-media { position: relative; }
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info .eyebrow { margin-bottom: 12px; }
.pdp-info h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.05; letter-spacing: -.02em; }
.pdp-subtitle { margin-top: 8px; color: #69716a; font-size: 15px; font-style: italic; font-family: 'Playfair Display'; }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin: 22px 0; }
.pdp-price strong { font-family: 'Playfair Display'; font-size: 30px; color: var(--ink); }
.pdp-price del { color: #9aa19a; font-size: 15px; }
.pdp-desc { color: #4a504a; font-size: 14px; line-height: 1.8; margin-bottom: 26px; }
.pdp-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 34px; flex-wrap: wrap; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-stepper button { width: 40px; height: 46px; background: transparent; color: var(--forest); font-size: 16px; }
.qty-stepper button:hover { background: var(--paper-2); }
.qty-stepper input { width: 46px; height: 46px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 14px; background: transparent; }
.stock-note { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #8b928b; margin-bottom: 20px; }
.stock-note.in-stock { color: #3d6b46; }
.spec-list { border-top: 1px solid var(--line); padding-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; font-size: 13px; }
.spec-list dt { color: #8b928b; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; }
.spec-list dd { color: var(--ink); font-weight: 600; margin: 2px 0 0; }
.pdp-about { max-width: 760px; padding-bottom: 30px; }
.pdp-about h2, .related-title { font-size: clamp(26px, 3vw, 36px); margin-bottom: 22px; }
.prose { color: #4a504a; font-size: 14px; line-height: 1.85; }
.prose p + p { margin-top: 14px; }

/* Layout with sidebar (shop) */
.layout-2col { display: grid; grid-template-columns: 240px 1fr; gap: 46px; align-items: start; padding: 44px 0 90px; }
.sidebar-card { background: var(--paper-2); border-radius: 4px; padding: 26px; position: sticky; top: 100px; }
.sidebar-title { font-family: 'Playfair Display'; font-size: 17px; margin-bottom: 16px; }
.sidebar-links { display: flex; flex-direction: column; gap: 2px; }
.sidebar-links a { padding: 9px 0; font-size: 12.5px; color: #5a625b; border-bottom: 1px solid rgba(28,33,29,.06); }
.sidebar-links a:hover, .sidebar-links a.active { color: var(--red); }
.sidebar-links .child { padding-left: 14px; font-size: 12px; }
.sidebar-divider { height: 1px; background: var(--line); margin: 22px 0; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.toolbar-count { font-size: 12px; color: #8b928b; text-transform: uppercase; letter-spacing: .08em; }
.select-sort { border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 12px; background: var(--paper); color: var(--ink); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 54px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; border: 1px solid var(--line); color: #5a625b; }
.pagination a:hover { border-color: var(--forest); color: var(--forest); }
.pagination .active { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.pagination .disabled { opacity: .35; }

.empty-state { padding: 90px 20px; text-align: center; color: #747b74; }
.empty-state strong { display: block; font-family: 'Playfair Display'; font-size: 26px; color: var(--forest); margin-bottom: 10px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #69716a; font-weight: 700; }
.field input, .field select, .field textarea { border: 1px solid var(--line); border-radius: 4px; padding: 13px 15px; font-family: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--forest); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Cart page */
.cart-page { display: grid; grid-template-columns: 1.6fr 1fr; gap: 50px; align-items: start; padding: 10px 0 90px; }
.cart-line { display: grid; grid-template-columns: 84px 1fr auto auto; gap: 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 84px; height: 104px; object-fit: cover; border-radius: 2px; }
.cart-line h3 { font-family: 'Playfair Display'; font-size: 18px; }
.cart-line .unit-price { color: #8b928b; font-size: 12px; margin-top: 4px; }
.cart-line .line-total { font-weight: 700; font-size: 15px; white-space: nowrap; }
.summary-box { background: var(--paper-2); border-radius: 4px; padding: 30px; position: sticky; top: 100px; }
.summary-box h3 { font-size: 20px; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; color: #5a625b; padding: 8px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; font-size: 17px; color: var(--ink); font-weight: 700; }
.summary-box .btn { width: 100%; margin-top: 18px; }

/* Checkout */
.checkout-steps { display: flex; gap: 10px; justify-content: center; margin: 30px 0 10px; flex-wrap: wrap; }
.checkout-steps span { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: #9aa19a; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; }
.checkout-steps span.current { background: var(--forest); color: var(--paper); border-color: var(--forest); }
.checkout-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: start; padding: 20px 0 90px; }
.checkout-section { border: 1px solid var(--line); border-radius: 4px; padding: 28px; margin-bottom: 24px; background: #fff; }
.checkout-section h3 { font-size: 18px; margin-bottom: 18px; }
.mini-line { display: flex; justify-content: space-between; font-size: 13px; color: #5a625b; padding: 9px 0; border-bottom: 1px solid rgba(28,33,29,.06); }

/* Generic content page */
.content-page { padding: 50px 0 90px; max-width: 820px; }
.content-page h2 { font-size: 26px; margin: 34px 0 14px; }

/* Timeline (order tracking) */
.timeline { display: flex; flex-direction: column; gap: 0; margin: 30px 0; }
.timeline-step { display: flex; gap: 16px; padding-bottom: 26px; position: relative; }
.timeline-step:before { content: ""; position: absolute; left: 10px; top: 26px; bottom: 0; width: 1px; background: var(--line); }
.timeline-step:last-child:before { display: none; }
.timeline-dot { width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex-shrink: 0; z-index: 1; }
.timeline-step.done .timeline-dot { background: var(--forest); border-color: var(--forest); }
.timeline-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.timeline-step:not(.done) .timeline-label { color: #9aa19a; font-weight: 500; }
.timeline-date { font-size: 11px; color: #9aa19a; margin-top: 2px; }

/* ============================================================
   Páginas de autenticação
   ============================================================ */
.auth-section {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(154,61,46,.18) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(176,137,76,.14) 0%, transparent 40%),
        linear-gradient(135deg, #1c211d 0%, #2b3e34 100%);
    padding: 60px 20px;
    --muted: #5a625b;
    --brick: var(--red);
    --gold-soft: #dfbd86;
}
@media (min-width: 1024px) {
    .auth-section {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }
    .auth-visual {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 80px;
        color: var(--paper);
    }
    .auth-visual .eyebrow { color: var(--gold-soft); }
    .auth-visual h2 {
        font-family: 'Playfair Display', 'Cormorant Garamond', serif;
        font-size: clamp(36px, 4vw, 64px);
        line-height: 1.1;
        margin: 20px 0 22px;
    }
    .auth-visual p {
        max-width: 440px;
        color: rgba(246,242,232,.72);
        line-height: 1.75;
    }
}

.auth-panel {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 40px 34px;
    box-shadow: 0 24px 70px rgba(28,33,29,.12);
}
@media (min-width: 1024px) {
    .auth-panel {
        margin: 40px auto;
    }
}

.auth-panel .auth-head {
    text-align: center;
    margin-bottom: 28px;
}
.auth-panel .auth-head h1 {
    font-family: 'Playfair Display', 'Cormorant Garamond', serif;
    font-size: 28px;
    color: var(--ink);
    margin-bottom: 6px;
}
.auth-panel .auth-head p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55;
}

.auth-card form .field { margin-bottom: 18px; }
.auth-card form .field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 6px;
}
.auth-card form .field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fff;
    font-size: 15px;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.auth-card form .field input:focus {
    outline: none;
    border-color: var(--forest);
    box-shadow: 0 0 0 3px rgba(43,92,76,.12);
}
.auth-card form .field input.is-invalid { border-color: var(--brick); }

.auth-card .field-error {
    color: var(--brick);
    font-size: 12px;
    margin-top: 5px;
}

.auth-card .options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    font-size: 13px;
}
.auth-card .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    cursor: pointer;
}
.auth-card .remember input {
    width: auto;
    accent-color: var(--forest);
}
.auth-card .forgot-link { color: var(--brick); }
.auth-card .forgot-link:hover { text-decoration: underline; }

.auth-card .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    border-radius: 5px;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}
.auth-card .auth-footer a {
    color: var(--forest);
    font-weight: 500;
}
.auth-card .auth-footer a:hover { text-decoration: underline; }

.auth-card .status-message {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 5px;
    background: rgba(43,92,76,.08);
    border: 1px solid rgba(43,92,76,.18);
    color: var(--forest);
    font-size: 14px;
}

/* Página de verificação de e-mail */
.verify-card {
    text-align: center;
    padding: 34px;
}
.verify-card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
    margin: 14px 0 24px;
}
.verify-card .actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.verify-card .actions .btn {
    width: 100%;
    justify-content: center;
}
.verify-card .actions form { width: 100%; }
.verify-card .logout-link {
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; gap: 34px; }
  .layout-2col { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .cart-page, .checkout-grid { grid-template-columns: 1fr; }
  .summary-box { position: static; }
}
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 64px 1fr; grid-template-areas: "img title" "img price" "img actions"; }
  .cart-line img { width: 64px; height: 80px; }
  .spec-list { grid-template-columns: 1fr; }
}
