body[data-brand-page="p3"] {
    --p3-wine: #421228;
    --p3-accent: #762948;
    --p3-rose: #ecdfef;
    --bg: #f4edf6;
    --surface: #fffafd;
    --surface-light: #f0e5f2;
    --text: #382339;
    --muted: #66536c;
    --gold: var(--p3-accent);
    --gold-light: var(--p3-wine);
    --border: #dfcee4;
    background: radial-gradient(ellipse at 88% 0%, #ebdaef 0%, transparent 46rem), var(--bg);
}

.site-header, .bottom-nav { background: #fcf7fdef; }

.announcement {
    background: var(--p3-wine);
    color: #fff5f8;
}

.site-header, .bottom-nav, .product-card, .site-footer, .footer-bottom,
.header-search, .mobile-menu, .avatar-link, .card-spin-toolbar button,
.button-secondary, .filters, .gallery-thumbs button, .p3-store-visual {
    border-color: var(--border);
}

.brand-name, .main-nav, .mobile-menu, .avatar-link, .cart-icon-link,
.header-search input, .product-details h3, .section-heading h2,
.filters input, .filters select, .site-footer, .footer-brand,
.card-spin-toolbar button, .p3-home-heading h1, .p3-home-partners h2 {
    color: var(--p3-wine);
}

.brand-name small, .footer-grid p, .footer-bottom, .product-details p,
.card-angle-label small, .bottom-nav a, .bottom-nav button,
.filters label, .catalog-summary, .p3-home-heading p {
    color: var(--muted);
}

.header-search, .avatar-link, .filters, .catalog-dream,
.p3-store-visual {
    background: var(--surface-light);
}

.eyebrow, .text-link, .text-link:hover, .main-nav a:hover,
.main-nav a.active, .product-tag, .product-bottom strong, .product-bottom a,
.product-price, .cart-line strong, .header-search button {
    color: var(--p3-accent);
}

.main-nav a.active { border-color: var(--p3-accent); }

.button-primary, .cart-icon-link .count-badge, .bottom-nav .count-badge {
    background: var(--p3-accent);
    border-color: var(--p3-accent);
    color: white;
}

.button-primary:hover { background: var(--p3-wine); }

.button-secondary { background: white; color: var(--p3-wine); }

.button-secondary:hover, .header-search button, .bottom-nav .active,
.bottom-nav button[aria-pressed="true"], .bottom-nav a:active,
.bottom-nav button:active, .card-spin-toolbar button:hover {
    background: var(--p3-rose);
    color: var(--p3-wine);
}

.bottom-nav .active, .bottom-nav button[aria-pressed="true"] {
    box-shadow: inset 0 3px var(--p3-accent);
}

.bottom-nav a:focus-visible, .bottom-nav button:focus-visible,
.card-spin-toolbar button:focus-visible, .p3-promo:focus-visible {
    outline: 3px solid var(--p3-accent);
    outline-offset: 3px;
}

.product-card:hover {
    border-color: #c7a5cd;
    box-shadow: 0 12px 30px #42122812;
}

.product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}

.product-image, .product-image img, .product-large-image, .gallery-thumbs button {
    background: #f4eaf5;
}

.product-image img, .product-large-image img, .gallery-thumbs img {
    display: block;
    object-fit: contain;
    object-position: center;
}

.product-image img { width: 100%; height: 100%; }

.p3-home-products { padding-block: clamp(20px, 3vw, 40px) 0; }

.p3-home-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 12px 24px;
    margin-bottom: 20px;
}

.p3-home-heading h1 {
    margin: 0;
    font-size: clamp(27px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.p3-home-heading h2, .p3-home-heading p { margin: 0; }
.p3-home-heading p { margin-top: 7px; }

.p3-home-partners, .p3-home-campaign { padding-block: 42px 0; }
.p3-home-partners { scroll-margin-top: 120px; }
.p3-home-partners h2 { margin: 0 0 15px; font-size: clamp(22px, 3vw, 30px); }

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

.p3-promo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(80px, 18vw, 180px);
    align-items: stretch;
    min-width: 0;
    overflow: hidden;
    border-radius: 16px;
    color: white;
    text-decoration: none;
}

.p3-promo-dream { background: #111d2a; }
.p3-promo-nucleo { background: #2a183b; }
.p3-promo-copy { padding: clamp(14px, 2.2vw, 26px); }
.p3-promo h3 { margin: 0; font-size: clamp(19px, 2.5vw, 28px); }
.p3-promo p { margin: 4px 0 14px; color: #f2eaf5; font-size: .88rem; }
.p3-promo-copy > span { font-size: .84rem; font-weight: 700; }
.p3-promo:hover .p3-promo-copy > span { text-decoration: underline; }

.p3-promo img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 180px;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 700px) {
    .p3-partner-grid { grid-template-columns: minmax(0, 1fr); }
    .p3-promo { grid-template-columns: minmax(0, 1fr) 30%; }
    .p3-home-heading .button { padding: 8px 12px; }
}

.p3-home-partners:last-child, .p3-home-campaign:last-child { padding-bottom: 42px; }

@media (max-width: 850px) {
    .main-nav a.active { background: var(--p3-rose); }
}


.product-card, .p3-account .admin-panel, .customer-order, .install-dialog {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.empty-state, .card-spin-toolbar button:disabled, .cart-summary, .custom-total {
    background: var(--surface-light);
    color: var(--text);
}

.spin-chip, .angle-notice, .install-hint { color: var(--muted); }

.p3-account .admin-form input, .p3-account .admin-form select,
.p3-account .admin-form textarea, .custom-form input, .custom-form select,
.custom-form textarea {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.cart-page .notice {
    color: var(--text) !important;
    background: var(--surface-light);
    border-color: var(--border);
}

.site-footer {
    background: var(--p3-wine);
    color: #fff8fc;
    border-color: #674061;
}

.site-footer .footer-brand, .site-footer a { color: #fff8fc; }
.site-footer .footer-grid p, .site-footer .footer-bottom { color: #efdce9; }
.site-footer .footer-bottom { border-color: #875575; }

.footer-install {
    margin-top: 12px;
    background: transparent;
    border-color: #c49eb8;
    color: #fff8fc;
}

.cart-line {
    --purchase-thumb-size: clamp(72px, 13vw, 112px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px 18px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.cart-line h2 { margin-top: 0; }
.cart-line-product { overflow-wrap: anywhere; }
.cart-line-controls { display: grid; justify-items: end; gap: 4px; }
.cart-line-controls strong { white-space: nowrap; }
.cart-line-controls .remove-button { color: var(--p3-accent); padding: 6px 0; }

.account-orders { max-width: 880px; }
.account-orders > h1 { margin-top: 0; color: var(--p3-wine); }

.customer-order {
    display: grid;
    gap: 14px;
    padding: clamp(14px, 3vw, 25px);
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.customer-order-heading, .customer-order-total, .order-pages {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.customer-order-heading h2 { margin: 0; font-size: 1.2rem; }
.customer-order-heading p { margin: 4px 0 0; color: var(--muted); }

.customer-order-status {
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--surface-light);
    color: var(--p3-wine);
    font-size: .875rem;
}

.customer-order-total { padding-top: 8px; }
.order-pages { justify-content: center; margin-top: 24px; }

@media (max-width: 530px) {
    .cart-line { grid-template-columns: auto minmax(0, 1fr); }
    .cart-line-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        grid-column: 1 / -1;
        border-top: 1px solid var(--border);
        padding-top: 5px;
    }
}
