.shop-layout {
    width: min(1220px, calc(100% - 32px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
    margin: 44px auto 0;
}

.shop-heading {
    margin-bottom: 22px;
}

.how-buy {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #e9f4f2 100%);
}

.how-buy h2 {
    margin: 8px 0 0;
    color: var(--primary-dark);
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.12;
}

.how-buy-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.how-buy-steps article {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(216, 226, 223, 0.72);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
}

.how-buy-steps strong {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary-color);
    color: #ffffff;
}

.how-buy-steps span {
    color: var(--primary-dark);
    font-weight: 900;
}

.how-buy-steps p {
    margin: 0;
    color: var(--muted-color);
    line-height: 1.42;
}

.shop-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.2fr) repeat(2, minmax(180px, 0.8fr)) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.06);
}

.filter-field {
    display: grid;
    gap: 7px;
}

.search-field input {
    padding-left: 38px;
    background-image: linear-gradient(transparent, transparent);
}

.search-field {
    position: relative;
}

.search-field::after {
    content: "\f002";
    position: absolute;
    left: 13px;
    bottom: 13px;
    color: var(--muted-color);
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    pointer-events: none;
}

.filter-field label {
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 900;
}

.clear-filters {
    min-width: 118px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-chip {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-dark);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--primary-color);
    background: var(--soft-color);
    color: var(--primary-color);
}

.filter-chip.all.active {
    background: var(--primary-color);
    color: #ffffff;
}

.shop-summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0 14px;
    color: var(--muted-color);
}

.shop-summary strong {
    color: var(--primary-dark);
}

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

.shop-card {
    position: relative;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    box-shadow: 0 12px 28px rgba(31, 41, 51, 0.06);
}

.shop-card.featured {
    border-color: rgba(233, 75, 139, 0.42);
    box-shadow: 0 16px 34px rgba(233, 75, 139, 0.12);
}

.product-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #e9f4f2 0%, #ffffff 54%, #fff4dc 100%);
}

.product-media.product-placeholder-geek,
.product-media.product-placeholder-geek-premium {
    background: linear-gradient(135deg, #eef7ff 0%, #ffffff 50%, #ffeaf3 100%);
}

.product-media.product-placeholder-sensorial,
.product-media.product-placeholder-articulado {
    background: linear-gradient(135deg, #e9f4f2 0%, #ffffff 54%, #ecfdf5 100%);
}

.product-media.product-placeholder-kit,
.product-media.product-placeholder-bundle {
    background: linear-gradient(135deg, #fff4dc 0%, #ffffff 52%, #e9f4f2 100%);
}

.product-media.product-placeholder-colecionavel,
.product-media.product-placeholder-display {
    background: linear-gradient(135deg, #f3ecff 0%, #ffffff 54%, #e9f4f2 100%);
}

.product-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.product-image-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--primary-color);
    font-size: 2.4rem;
}

.product-image-fallback i {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 26px rgba(31, 41, 51, 0.08);
}

.product-media img + .product-image-fallback {
    display: none;
}

.product-media img.is-missing {
    display: none;
}

.product-media img.is-missing + .product-image-fallback {
    display: grid;
}

.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 6px;
    background: var(--secondary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 900;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--soft-color);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 900;
}

.product-tag.type {
    background: #fff4dc;
    color: #835a13;
}

.shop-card h2 {
    margin: 0;
    color: var(--primary-dark);
    font-size: 1.22rem;
    line-height: 1.2;
}

.shop-card p {
    margin: 0;
    color: var(--muted-color);
    line-height: 1.45;
}

.product-sku {
    color: var(--muted-color);
    font-size: 0.82rem;
    font-weight: 900;
}

.product-variations {
    font-size: 0.9rem;
}

.product-variation-field {
    display: grid;
    gap: 7px;
}

.product-variation-field label {
    color: var(--primary-dark);
    font-size: 0.84rem;
    font-weight: 900;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.product-price {
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: 900;
}

.product-footer .btn {
    min-width: 118px;
}

.product-empty,
.product-error,
.product-loading {
    min-height: 220px;
    justify-content: center;
    padding: 22px;
}

.product-symbol {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--soft-color);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.cart-panel {
    position: sticky;
    top: 74px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.cart-title,
.cart-total,
.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.cart-title {
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.cart-title h2 {
    margin: 0;
    color: var(--primary-dark);
}

.cart-title span {
    color: var(--muted-color);
    font-weight: 900;
}

.cart-clear {
    width: 100%;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted-color);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.cart-clear:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.cart-clear:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cart-items {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.cart-item {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.cart-item p,
.empty-cart {
    margin: 0;
    color: var(--muted-color);
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-actions button {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    color: var(--primary-color);
    cursor: pointer;
}

.cart-note {
    width: 100%;
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.cart-note label {
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.cart-note input {
    min-height: 38px;
    font-size: 0.92rem;
}

.cart-total {
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    color: var(--muted-color);
}

.cart-total strong {
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.checkout-form {
    display: grid;
    gap: 10px;
}

.checkout-form label {
    font-weight: 900;
}

.checkout-button {
    width: 100%;
    margin-top: 4px;
}

.cart-toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 30;
    width: min(420px, calc(100% - 28px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--primary-dark);
    color: #ffffff;
    box-shadow: 0 18px 42px rgba(31, 41, 51, 0.24);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 14px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cart-toast.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.cart-toast strong {
    display: block;
}

.cart-toast span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.cart-toast a {
    min-width: max-content;
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
}

.mobile-cart-shortcut {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(82px, calc(82px + env(safe-area-inset-bottom)));
    z-index: 25;
    min-height: 52px;
    display: none;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border-radius: 999px;
    background: var(--primary-dark);
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(31, 41, 51, 0.24);
}

.mobile-cart-shortcut strong {
    color: var(--accent-color);
}

.mobile-cart-shortcut[hidden] {
    display: none;
}

@media (max-width: 1080px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .how-buy {
        grid-template-columns: 1fr;
    }

    .how-buy-steps {
        grid-template-columns: 1fr;
    }

    .shop-toolbar {
        grid-template-columns: 1fr;
    }

    .clear-filters {
        width: 100%;
    }

    .shop-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .shop-layout {
        width: min(100% - 24px, 1220px);
        gap: 18px;
        margin-top: 24px;
    }

    .shop-heading {
        margin-bottom: 14px;
    }

    .how-buy {
        gap: 12px;
        margin-bottom: 14px;
        padding: 14px;
    }

    .how-buy h2 {
        font-size: clamp(1.28rem, 6vw, 1.65rem);
    }

    .how-buy-steps {
        gap: 8px;
    }

    .how-buy-steps article {
        min-height: 0;
        display: grid;
        grid-template-columns: 34px 1fr;
        gap: 4px 10px;
        padding: 12px;
    }

    .how-buy-steps strong {
        grid-row: span 2;
    }

    .how-buy-steps p {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .shop-toolbar {
        gap: 9px;
        padding: 12px;
        box-shadow: 0 10px 24px rgba(31, 41, 51, 0.05);
    }

    .filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 2px 2px 8px;
        margin-right: -12px;
        margin-left: -2px;
        scroll-snap-type: x proximity;
    }

    .filter-chip {
        scroll-snap-align: start;
        min-height: 36px;
        padding: 8px 11px;
        font-size: 0.86rem;
    }

    .filter-field {
        gap: 6px;
    }

    .shop-summary {
        gap: 4px;
        margin: 10px 0 10px;
        font-size: 0.9rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .shop-card {
        min-height: 0;
    }

    .shop-card[data-product-card] {
        display: grid;
        grid-template-columns: minmax(112px, 34%) minmax(0, 1fr);
    }

    .shop-card[data-product-card] .product-media {
        height: 100%;
        min-height: 188px;
        aspect-ratio: auto;
    }

    .shop-card[data-product-card] .featured-badge {
        top: 8px;
        left: 8px;
        padding: 5px 7px;
        font-size: 0.68rem;
    }

    .shop-card[data-product-card] .product-image-fallback i {
        width: 56px;
        height: 56px;
        font-size: 1.65rem;
    }

    .product-info {
        min-width: 0;
        gap: 8px;
        padding: 12px;
    }

    .product-tag {
        min-height: 26px;
        padding: 5px 8px;
    }

    .shop-card h2 {
        font-size: 1.02rem;
    }

    .shop-card p {
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .product-meta {
        gap: 6px;
    }

    .product-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .product-price {
        font-size: 1.12rem;
    }

    .product-footer .btn {
        min-height: 42px;
        width: 100%;
        padding: 10px 12px;
    }

    .product-variation-field {
        gap: 5px;
    }

    .product-variation-field select {
        min-height: 40px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .product-sku,
    .product-variations {
        font-size: 0.78rem;
    }

    .cart-panel {
        padding: 14px;
        box-shadow: 0 12px 28px rgba(31, 41, 51, 0.08);
    }

    .cart-title h2 {
        font-size: 1.35rem;
    }

    .cart-item {
        gap: 10px;
    }

    .cart-actions {
        margin-left: auto;
    }

    .checkout-form {
        gap: 9px;
    }

    .mobile-cart-shortcut:not([hidden]) {
        display: inline-flex;
        right: auto;
        left: max(14px, env(safe-area-inset-left));
        max-width: calc(100% - 86px);
        min-height: 50px;
        padding: 11px 13px;
        overflow: hidden;
    }

    .cart-toast {
        bottom: max(136px, calc(136px + env(safe-area-inset-bottom)));
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 430px) {
    .shop-layout {
        width: min(100% - 20px, 1220px);
        margin-top: 20px;
    }

    .shop-toolbar {
        padding: 11px;
    }

    .shop-card[data-product-card] {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .shop-card[data-product-card] .product-media {
        min-height: 176px;
    }

    .featured-badge {
        top: 10px;
        left: 10px;
        padding: 6px 8px;
    }

    .product-info {
        padding: 11px;
    }

    .cart-panel {
        padding: 13px;
    }

    .cart-title,
    .cart-total,
    .cart-item {
        gap: 10px;
    }

    .cart-actions button {
        width: 36px;
        height: 36px;
    }

    .mobile-cart-shortcut span {
        max-width: 58px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
