.pesquisa-body {
    background: linear-gradient(135deg, var(--creme) 0%, var(--creme-escuro) 100%);
    color: var(--texto-escuro);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    min-height: calc(100vh - 80px);
    padding-top: 85px;
    padding-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body:not(.page-hidden) .content-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.search-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.loja-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(245, 234, 224, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(92, 48, 32, 0.08);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(92, 48, 32, 0.1);
    z-index: 1100;
    height: 65px;
    animation: slideDown 0.6s ease;
    gap: 12px;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 40px;
}

.header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.header-center h1 {
    margin: 0;
    color: var(--marrom);
    font-family: var(--fonte-titulo);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(18px, 4vw, 22px);
    text-align: center;
}

.icon-btn,
.hamburger-btn {
    background: var(--creme-escuro);
    border: 1px solid rgba(92, 48, 32, 0.05);
    color: var(--marrom);
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 2px 6px rgba(92, 48, 32, 0.1);
}

.icon-btn:hover,
.hamburger-btn:hover {
    background: var(--marrom);
    color: var(--creme);
    transform: translateY(-2px);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 24, 16, 0.45);
    backdrop-filter: blur(5px);
    z-index: 1450;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transicao-lenta);
}

.drawer-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    z-index: 1500;
    background: var(--creme-claro);
    box-shadow: var(--sombra-xl);
    padding: var(--space-12) var(--space-6);
    transition: left var(--transicao-lenta);
    border-right: 1px solid rgba(92, 48, 32, 0.12);
}

.nav-drawer.aberto {
    left: 0;
}

.drawer-brand {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: var(--space-10);
}

.drawer-brand .logo-tua {
    font-size: 2.5rem;
}

.drawer-brand .logo-pele {
    font-size: 1.8rem;
}

.logo-tua {
    font-family: var(--fonte-script), cursive;
    color: var(--marrom);
    line-height: 1;
    font-weight: 300;
    position: relative;
    z-index: 2;
}

.logo-pele {
    font-family: var(--fonte-titulo), serif;
    font-weight: 900;
    color: var(--marrom);
    letter-spacing: -0.04em;
    line-height: 1;
    position: relative;
    z-index: 1;
    -webkit-text-stroke: 0.03em var(--marrom);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.drawer-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-full);
    color: var(--marrom);
    font-family: var(--fonte-corpo);
    font-size: var(--texto-md);
    font-weight: 700;
    transition: all var(--transicao-normal);
    text-decoration: none;
}

.drawer-nav a:hover,
.drawer-nav a.active {
    background: var(--marrom);
    color: var(--creme);
    transform: translateX(4px);
}

.search-bar-main {
    position: relative;
    width: 100%;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--branco);
    border: 1.5px solid var(--marrom-palido);
    border-radius: 999px;
    height: 54px;
    box-shadow: 0 8px 24px rgba(92, 48, 32, 0.06);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--marrom);
    box-shadow: 0 8px 24px rgba(92, 48, 32, 0.12);
}

.input-wrapper.shake {
    animation: shakeInput 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: var(--erro);
}

@keyframes shakeInput {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.search-prefix-icon {
    position: absolute;
    left: 20px;
    color: var(--texto-suave);
    font-size: 16px;
}

.search-input-field {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 60px 0 45px;
    color: var(--texto-escuro);
    font-size: 16px;
    font-family: var(--fonte-corpo);
    outline: none;
    border-radius: 999px;
}

.search-input-field::placeholder {
    color: var(--texto-suave);
    font-weight: 500;
}

.search-submit-btn {
    position: absolute;
    right: 8px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--marrom);
    color: var(--creme);
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(92, 48, 32, 0.2);
}

.search-submit-btn:hover {
    background: var(--marrom-medio);
    transform: scale(1.05);
}

.autocomplete-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--branco);
    border: 1px solid rgba(92, 48, 32, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(92, 48, 32, 0.15);
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    padding: 8px;
}

.autocomplete-suggestions.visible {
    display: block;
    animation: fadeInDropdown 0.2s ease forwards;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 12px 16px;
    color: var(--texto-escuro);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--creme);
    color: var(--marrom);
}

.suggestion-item i {
    color: var(--marrom-claro);
    font-size: 14px;
}

.section-title {
    font-family: var(--fonte-titulo);
    font-size: 18px;
    font-weight: 700;
    color: var(--marrom);
    text-align: center;
    background: var(--branco);
    border-radius: 999px;
    padding: 8px 24px;
    width: max-content;
    max-width: 90%;
    margin: 0 auto 15px auto;
    display: block;
    border: 1px solid rgba(92, 48, 32, 0.08);
    box-shadow: 0 4px 10px rgba(92, 48, 32, 0.04);
}

.history-list,
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.history-item,
.category-item {
    background: var(--branco);
    color: var(--marrom);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid rgba(92, 48, 32, 0.1);
    box-shadow: 0 2px 6px rgba(92, 48, 32, 0.04);
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-item:hover,
.category-item:hover {
    background: var(--marrom);
    color: var(--creme);
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: 0 6px 12px rgba(92, 48, 32, 0.15);
}

#noHistoryMessage,
#loadingCategories,
.message {
    color: var(--texto-suave);
    font-size: 14px;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 768px) {

    .category-list,
    .history-list {
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 5px 24px 15px 24px;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .category-list::-webkit-scrollbar,
    .history-list::-webkit-scrollbar {
        display: none;
    }

    .category-item,
    .history-item {
        flex-shrink: 0;
    }
}

.recommended-products-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 10px 0;
}

.products-horizontal-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 16px;
    padding: 10px 24px 20px 24px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
}

.products-horizontal-grid::-webkit-scrollbar {
    display: none;
}

.products-horizontal-grid .product-card {
    flex: 0 0 240px;
    width: 240px;
    min-width: 240px;
    margin-bottom: 0;
    height: auto;
}

@media (max-width: 768px) {
    .products-horizontal-grid .product-card {
        flex: 0 0 190px;
        width: 190px;
        min-width: 190px;
    }
}

.product-card {
    background: var(--branco);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(92, 48, 32, 0.06);
    border: 1px solid rgba(92, 48, 32, 0.05);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.6s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    opacity: 1;
    transform: translateY(0);
    min-width: 0;
    box-sizing: border-box;
}

.product-card * {
    min-width: 0;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(92, 48, 32, 0.12);
    border-color: rgba(92, 48, 32, 0.15);
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--creme-escuro);
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-badge.destaque {
    background: linear-gradient(135deg, var(--marrom), #3a1e14);
    color: var(--creme);
}

.card-badge.promo {
    background: var(--erro);
    color: var(--branco);
}

.card-badge.erro {
    background: #666;
    color: #fff;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.product-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
    min-width: 0;
}

.product-title {
    font-family: var(--fonte-titulo);
    font-size: 22px;
    font-weight: 600;
    color: var(--marrom);
    line-height: 1.25;
    margin-bottom: 0;
    min-width: 0;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.stock-info {
    font-family: var(--fonte-corpo);
    font-size: 12px;
    font-weight: 700;
    color: var(--texto-suave);
    background: var(--creme-escuro);
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.product-meta {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-bottom: 12px;
    width: 100%;
    overflow: hidden;
    align-items: center;
}

.meta-item {
    background: rgba(92, 48, 32, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--marrom-claro);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.product-description {
    font-size: 13px !important;
    color: var(--texto-medio) !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    margin-bottom: 12px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.5 !important;
    min-width: 0;
    overflow-wrap: anywhere;
}

.price-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    gap: 2px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--sucesso);
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.old-price-line {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    overflow: hidden;
}

.old-price {
    color: var(--texto-suave);
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 600;
    display: block;
    flex: 0 1 auto;
    
    min-width: 0;
    
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discount-badge {
    background: var(--erro);
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    flex: 0 0 auto;
    
    white-space: nowrap;
    border-radius: 30px !important;
    
}

.promo-anim-container {
    position: relative;
    height: 20px;
    width: 100%;
    margin-bottom: 2px;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.promo-anim-container .old-price-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.promo-anim-container .promo-countdown {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--erro);
    font-size: 11px;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.1);
    padding: 0 6px;
    border-radius: 4px;
    width: max-content;
    opacity: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.promo-anim-container .time-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.promo-anim-container.animate .old-price-line {
    animation: fadeOutUp 8s infinite;
}

.promo-anim-container.animate .promo-countdown {
    animation: fadeInUp 8s infinite;
}

@keyframes fadeOutUp {

    0%,
    45% {
        opacity: 1;
        transform: translateY(0);
    }

    50%,
    95% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {

    0%,
    45% {
        opacity: 0;
        transform: translateY(10px);
    }

    50%,
    95% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

@media (max-width: 768px) {
    .search-page-container {
        padding: 0 16px;
        gap: 25px;
    }

    .product-info {
        padding: 12px;
    }

    .product-title {
        font-size: 18px;
    }

    .product-price {
        font-size: 17px;
    }

    .product-meta {
        gap: 4px;
    }

    .meta-item {
        font-size: 9px;
        padding: 3px 6px;
        letter-spacing: 0.03em;
    }
}

body.page-hidden {
    opacity: 0;
    visibility: hidden;
}

.header-center {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

.recent-history-section button,
.quick-access-section button {
    border: none;
    font-family: inherit;
}

.product-card {
    isolation: isolate;
}

.product-card.disabled-product {
    opacity: 0.72;
}

.product-card.disabled-product .product-image {
    filter: grayscale(20%);
}

.product-admin-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.product-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.82);
    background: rgba(253, 248, 244, 0.93);
    color: var(--marrom);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(44, 24, 16, 0.18);
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.product-action-btn:hover {
    transform: translateY(-2px) scale(1.04);
    background: var(--marrom);
    color: var(--creme);
}

.product-action-btn.star-btn.active {
    background: #d9a441;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.8);
}

.product-action-btn.delete-btn:hover {
    background: var(--erro);
    color: #fff;
}

.product-action-btn.toggle-btn.inactive {
    background: rgba(192, 57, 43, 0.95);
    color: #fff;
}

.product-status {
    margin-top: 12px;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.status-active {
    background: rgba(39, 174, 96, 0.12);
    color: var(--sucesso);
}

.status-inactive {
    background: rgba(192, 57, 43, 0.12);
    color: var(--erro);
}

.selection-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(44, 24, 16, 0.45);
    backdrop-filter: blur(6px);
}

.selection-modal.show {
    display: flex;
}

.selection-modal-content {
    width: min(100%, 420px);
    max-height: 85vh;
    overflow-y: auto;
    background: var(--creme-claro);
    border: 1px solid rgba(92, 48, 32, 0.12);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 50px rgba(92, 48, 32, 0.25);
    animation: confirmModalIn 0.22s ease forwards;
}

.selection-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(92, 48, 32, 0.1);
}

.selection-modal-header h3 {
    margin: 0;
    color: var(--marrom);
    font-family: var(--fonte-titulo);
    font-size: 18px;
    font-weight: 800;
}

.close-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--branco);
    color: var(--marrom);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(92, 48, 32, 0.06);
}

.close-btn:hover {
    background: var(--marrom);
    color: var(--creme);
}

@keyframes confirmModalIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.confirm-modal-actions .btn-confirm,
.confirm-modal-actions .btn-cancel {
    flex: 1;
    min-height: 44px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 800;
}

.btn-cancel {
    background: var(--branco);
    color: var(--marrom);
    border: 1px solid rgba(92, 48, 32, 0.1) !important;
}

.btn-confirm {
    background: var(--erro);
    color: #fff;
}

@media (max-width: 768px) {
    .product-admin-actions {
        top: 8px;
        right: 8px;
        gap: 6px;
    }

    .product-action-btn {
        width: 31px;
        height: 31px;
        font-size: 12px;
    }

    .confirm-modal-actions {
        flex-direction: column;
    }
}
