/*
Theme Name: Ponto Doce Gourmet
Theme URI: https://example.com/ponto-doce-gourmet
Author: Copilot
Description: Tema responsivo para o delivery da confeitaria.
Version: 1.0.0
Text Domain: ponto-doce-gourmet
*/

:root {
    --bg: #fffaf6;
    --panel: #ffffff;
    --panel-soft: #fff4ee;
    --primary: #b86845;
    --primary-dark: #7a3b2a;
    --accent: #f5d7c2;
    --text: #231915;
    --muted: #5a433c;
    --border: #f0e3db;
    --green: #237a4d;
    --shadow: 0 16px 34px rgba(84, 46, 37, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button, input, select, textarea {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.delivery-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.delivery-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
}

.delivery-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-dark);
    font-weight: 800;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.9rem;
}

.delivery-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--muted);
    font-weight: 600;
}

.delivery-nav a:hover {
    color: var(--primary-dark);
}

.delivery-menu-toggle,
.delivery-nav-backdrop {
    display: none;
}

.delivery-cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(71, 39, 29, 0.06);
}

.delivery-main {
    padding-bottom: 80px;
}

.delivery-elementor-content,
.delivery-page {
    min-height: 40vh;
    padding: 48px 0;
    background: var(--panel);
}

.delivery-page-content {
    max-width: 900px;
    margin: 0 auto;
}

.delivery-page-content h1 {
    margin-top: 0;
}

.delivery-hero {
    background: linear-gradient(135deg, #fffaf7 0%, #fff2ec 100%);
    padding: 72px 0 32px;
}

.delivery-hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
}

.delivery-kicker {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(184, 104, 69, 0.12);
    color: var(--primary-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delivery-hero-copy h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.delivery-hero-copy p {
    color: var(--muted);
    font-size: 1.12rem;
    max-width: 560px;
}

.delivery-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.delivery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.delivery-btn:hover {
    transform: translateY(-1px);
}

.delivery-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.delivery-btn.secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.delivery-hero-panel {
    display: flex;
    justify-content: center;
}

.delivery-panel-card {
    width: min(100%, 420px);
    background: linear-gradient(180deg, #fff 0%, #fff7f3 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 26px;
}

.delivery-pill {
    display: inline-block;
    background: rgba(35, 122, 77, 0.12);
    color: var(--green);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.delivery-panel-card h2 {
    margin: 18px 0 10px;
    font-size: 2rem;
}

.delivery-panel-card p {
    color: var(--muted);
    margin: 0;
}

.delivery-panel-price {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.delivery-panel-price strong {
    font-size: 1.8rem;
}

.delivery-panel-price span {
    color: var(--muted);
    font-size: 0.8rem;
}

.delivery-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 30px;
}

.delivery-highlights article {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 0 10px 24px rgba(76, 42, 31, 0.04);
}

.delivery-highlights article span {
    font-size: 1.8rem;
}

.delivery-highlights h3 {
    margin: 0;
    font-size: 1.05rem;
}

.delivery-section {
    margin-top: 42px;
}

.delivery-section.alt {
    padding-top: 18px;
}

.delivery-section-head {
    margin-bottom: 18px;
}

.delivery-section-head h2 {
    margin: 12px 0 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.delivery-cart-box,
.delivery-checkout-box,
.delivery-auth-card,
.delivery-auth-box,
.delivery-product-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(58, 35, 28, 0.05);
}

.delivery-product-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.delivery-product-card,
.delivery-product-card * {
    overflow-wrap: anywhere;
}

.delivery-product-card .delivery-product-body {
    min-width: 0;
    min-height: 238px;
    display: flex;
    flex-direction: column;
}

.delivery-product-card .delivery-tag {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
}

.delivery-product-card .delivery-product-body h3 {
    display: -webkit-box;
    min-height: 2.5em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.delivery-product-card .delivery-product-body p {
    min-height: 0;
    margin-bottom: 0;
}

.delivery-product-card .delivery-price-row {
    min-width: 0;
    flex-wrap: wrap;
}

.delivery-product-card .delivery-price-row strong,
.delivery-product-card .delivery-price-row span {
    min-width: 0;
    max-width: 100%;
}

.delivery-product-card .delivery-product-form {
    margin-top: 0;
}

.delivery-product-purchase-row {
    margin-top: 0;
}

.delivery-product-card .delivery-form-inline {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 8px;
}

.delivery-product-card .delivery-form-inline input,
.delivery-product-card .delivery-form-inline button {
    min-width: 0;
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.delivery-product-card .delivery-form-inline input {
    text-align: center;
}

.delivery-product-body {
    padding: 18px;
}

.delivery-product-body h3 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.delivery-product-body p {
    color: var(--muted);
    margin: 0;
}

.delivery-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-weight: 700;
}

.delivery-form,
.delivery-product-form,
.delivery-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-form input,
.delivery-form textarea,
.delivery-form select,
.delivery-search-form input,
.delivery-product-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 0 14px;
    color: var(--text);
}

.delivery-form label:has(input[required])::before,
.delivery-form label:has(textarea[required])::before,
.delivery-form label:has(select[required])::before {
    content: '* ';
    color: #b42318;
    font-weight: 800;
}

.delivery-password-field {
    position: relative;
    display: block;
}

.delivery-password-field input {
    padding-right: 48px;
}

.delivery-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #171717;
    font-size: 0.95rem;
    cursor: pointer;
    transform: translateY(-50%);
}

.delivery-password-toggle.is-visible {
    color: #8a8a8a;
}

.delivery-password-toggle:hover,
.delivery-password-toggle:focus-visible {
    background: var(--panel-soft);
    color: #171717;
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.delivery-form textarea {
    min-height: 110px;
    padding-top: 12px;
}

.delivery-form button,
.delivery-search-form button,
.delivery-product-form button,
.delivery-inline-form button,
.delivery-submit-button {
    min-height: 48px;
    border: none;
    border-radius: 12px;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.delivery-search-form {
    flex-direction: row;
    max-width: 500px;
    margin-bottom: 24px;
}

.delivery-products-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.delivery-product-image {
    aspect-ratio: 1 / 1;
    min-height: 0;
    background: linear-gradient(135deg, #fbeee4, #f5f5f5);
    display: grid;
    place-items: center;
    font-size: 3rem;
}

.delivery-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.delivery-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(184, 104, 69, 0.12);
    color: var(--primary-dark);
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.delivery-product-body {
    padding: 14px;
}

.delivery-product-body h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.25;
}

.delivery-product-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.delivery-product-purchase-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: auto;
}

.delivery-product-purchase-row .delivery-price-row {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
}

.delivery-product-purchase-row .delivery-price-row strong,
.delivery-product-purchase-row .delivery-price-row span {
    overflow-wrap: normal;
    white-space: nowrap;
}

.delivery-product-quantity {
    display: grid;
    min-width: 28px;
    min-height: 36px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fffaf6;
    color: var(--text);
    font-weight: 800;
}

.delivery-product-quantity-buttons {
    display: grid;
    grid-template-rows: repeat(2, 20px);
    gap: 2px;
}

.delivery-product-quantity-buttons button {
    display: grid;
    width: 24px;
    height: 20px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: var(--primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.delivery-price-row {
    gap: 8px;
    font-size: 0.88rem;
}

.delivery-form-inline input,
.delivery-form-inline button {
    min-width: 0;
}

.delivery-form-inline {
    display: flex;
    gap: 10px;
}

.delivery-inline-form {
    display: inline-block;
}

.delivery-cart-box,
.delivery-checkout-box,
.delivery-auth-box {
    padding: 24px;
}

.delivery-cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.delivery-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.delivery-cart-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--muted);
}

.delivery-cart-total {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.06rem;
}

.delivery-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.delivery-auth-card {
    padding: 24px;
}

.delivery-warning,
.delivery-notice {
    margin: 20px auto 0;
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 700;
}

.delivery-warning {
    background: #fff3d9;
    color: #7a5300;
    border: 1px solid #f2d585;
}

.delivery-notice {
    background: #ebf9f0;
    color: #1d7447;
    border: 1px solid #bfe4ca;
}

.delivery-empty {
    color: var(--muted);
}

.delivery-checkout-summary {
    margin-top: 18px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.delivery-checkout-summary ul {
    padding-left: 18px;
    color: var(--muted);
}

.delivery-footer {
    background: #261915;
    color: rgba(255, 255, 255, 0.8);
    padding: 22px 0;
}

.delivery-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

@media (max-width: 1100px) {
    .delivery-header-inner,
    .delivery-footer-inner,
    .two-col,
    .delivery-hero-inner,
    .delivery-auth-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .delivery-header-inner {
        justify-items: center;
        padding: 18px 0;
    }

    .delivery-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .delivery-cart-badge {
        width: 100%;
        justify-content: center;
    }

    .delivery-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }

    .delivery-product-purchase-row {
        gap: 5px;
    }

    .delivery-product-purchase-row .delivery-price-row strong {
        font-size: 0.86rem;
    }

    .delivery-product-purchase-row .delivery-price-row span {
        font-size: 0.7rem;
    }

    .delivery-product-form .delivery-form-inline {
        flex-direction: column;
    }

    .delivery-product-form .delivery-form-inline input,
    .delivery-product-form .delivery-form-inline button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .delivery-search-form,
    .delivery-form-inline,
    .delivery-cart-item {
        flex-direction: column;
    }

    .delivery-cart-meta {
        align-items: flex-start;
    }

    .delivery-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .delivery-product-body {
        padding: 12px;
    }

    .delivery-product-card .delivery-product-body {
        min-height: 250px;
    }

    .delivery-product-card .delivery-product-body h3 {
        font-size: 0.92rem;
    }

    .delivery-product-card .delivery-product-body p {
        font-size: 0.8rem;
    }

    .delivery-product-image {
        font-size: 2rem;
    }

    .delivery-price-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}
