.catalog-page,.product-page,.cart-page,.checkout-page,.success-page{
    padding:132px 6vw 90px;
    min-height:100vh;
}
.catalog-heading,.cart-heading,.checkout-heading{
    max-width:760px;
    margin-bottom:34px;
}
.catalog-heading h1,.cart-heading h1,.checkout-heading h1,.success-card h1,.product-detail h1{
    font-family:var(--font-title);
    font-size:clamp(44px,6vw,86px);
    line-height:.9;
}
.catalog-heading p,.cart-heading p,.checkout-heading p,.product-description,.success-card p{
    color:var(--muted);
    line-height:1.8;
    margin-top:16px;
}
.catalog-tools{
    background:#fff;
    border:1px solid var(--border);
    border-radius:26px;
    padding:18px;
    margin-bottom:28px;
}
.search-box input{
    width:100%;
    border:1px solid var(--border);
    border-radius:999px;
    padding:16px 20px;
    outline:none;
    font-size:14px;
    background:var(--background);
}
.filter-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.filter-btn{
    border:1px solid var(--border);
    background:#fff;
    border-radius:999px;
    padding:10px 14px;
    cursor:pointer;
}
.filter-btn.active{
    background:var(--primary-deep);
    color:#fff;
}
.catalog-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
}
.catalog-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:26px;
    overflow:hidden;
    transition:.3s ease;
}
.catalog-card:hover{transform:translateY(-6px);box-shadow:var(--shadow)}
.catalog-photo{
    height:330px;
    display:block;
    background:linear-gradient(145deg,#eadbd3,#fff 50%,#bd9888);
    position:relative;
}
.catalog-photo span,.product-main-photo span{
    position:absolute;
    top:16px;
    left:16px;
    background:rgba(255,255,255,.85);
    border-radius:999px;
    padding:7px 12px;
    font-size:12px;
    color:var(--primary-deep);
}
.catalog-info{padding:18px}
.catalog-info small{color:var(--muted)}
.catalog-info h3{font-size:16px;margin:7px 0}
.catalog-info p,.product-price{font-weight:700;color:var(--primary-deep);font-size:20px;margin-bottom:16px}
.product-page{
    display:grid;
    grid-template-columns:1fr .9fr;
    gap:46px;
    align-items:start;
}
.product-main-photo{
    min-height:650px;
    border-radius:34px;
    background:linear-gradient(145deg,#d8c2b5,#fff 50%,#b68f7d);
    position:relative;
    box-shadow:var(--shadow);
}
.product-thumbs{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}
.product-thumbs div{
    height:120px;
    border-radius:18px;
    background:linear-gradient(145deg,#f1e4dc,#fff);
    border:1px solid var(--border);
}
.back-link{display:inline-block;color:var(--muted);margin-bottom:26px}
.buy-box{
    background:#fff;
    border:1px solid var(--border);
    border-radius:30px;
    padding:24px;
    margin-top:26px;
}
.buy-box label,.checkout-form label{
    display:block;
    font-weight:600;
    margin:18px 0 10px;
}
.option-grid{display:flex;flex-wrap:wrap;gap:10px}
.option-btn,.delivery-btn{
    border:1px solid var(--border);
    background:#fff;
    border-radius:999px;
    padding:11px 16px;
    cursor:pointer;
}
.option-btn.active,.delivery-btn.active{
    background:var(--primary-deep);
    color:#fff;
}
.qty-control{
    display:flex;
    align-items:center;
    width:150px;
    border:1px solid var(--border);
    border-radius:999px;
    overflow:hidden;
}
.qty-control button{
    width:44px;
    height:44px;
    border:none;
    background:var(--secondary);
    cursor:pointer;
}
.qty-control input{
    width:62px;
    border:none;
    text-align:center;
    outline:none;
}
.full-btn{width:100%;margin-top:14px}
.toast{
    position:fixed;
    left:50%;
    bottom:28px;
    transform:translateX(-50%) translateY(20px);
    background:#312722;
    color:#fff;
    padding:14px 20px;
    border-radius:999px;
    opacity:0;
    pointer-events:none;
    transition:.3s ease;
    z-index:999;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.cart-layout{
    display:grid;
    grid-template-columns:1fr 360px;
    gap:24px;
}
.cart-items,.cart-summary,.checkout-form,.success-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:30px;
    padding:24px;
    box-shadow:0 18px 50px rgba(83,62,53,.06);
}
.cart-item{
    display:grid;
    grid-template-columns:90px 1fr auto;
    gap:16px;
    align-items:center;
    padding:16px 0;
    border-bottom:1px solid var(--border);
}
.cart-item:last-child{border-bottom:none}
.cart-mini-photo{
    width:90px;
    height:110px;
    border-radius:16px;
    background:linear-gradient(145deg,#d8c2b5,#fff);
}
.cart-item h3{font-size:15px}
.cart-item p,.cart-item small{color:var(--muted)}
.remove-item{
    border:none;
    background:#f7eeee;
    color:#9b4f4f;
    border-radius:999px;
    padding:9px 12px;
    cursor:pointer;
}
.summary-line{
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-top:1px solid var(--border);
    margin-top:18px;
    padding-top:18px;
}
.cart-summary p{color:var(--muted);line-height:1.7;margin:18px 0}
.form-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
}
.checkout-form input{
    width:100%;
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px;
    margin-top:8px;
    outline:none;
    background:var(--background);
}
.delivery-options{display:flex;gap:10px;margin-bottom:18px}
.address-fields{display:none}
.address-fields.show{display:block}
.checkout-summary{
    margin:24px 0;
    border:1px solid var(--border);
    border-radius:24px;
    padding:18px;
    background:var(--background);
}
.checkout-line{
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:10px 0;
    border-bottom:1px solid var(--border);
}
.success-page{
    display:grid;
    place-items:center;
}
.success-card{
    text-align:center;
    max-width:680px;
}
.success-icon{
    width:72px;
    height:72px;
    margin:0 auto 20px;
    display:grid;
    place-items:center;
    border-radius:999px;
    background:#e9f6ec;
    color:#2f8a43;
    font-size:34px;
}
.success-card strong{
    display:block;
    color:var(--primary-deep);
    font-size:24px;
    margin:24px 0;
}
@media(max-width:1024px){
    .catalog-grid{grid-template-columns:repeat(3,1fr)}
    .product-page{grid-template-columns:1fr}
    .cart-layout{grid-template-columns:1fr}
}
@media(max-width:760px){
    .catalog-page,.product-page,.cart-page,.checkout-page,.success-page{
        padding:106px 18px 90px;
    }
    .catalog-grid{grid-template-columns:1fr 1fr;gap:14px}
    .catalog-photo{height:240px}
    .catalog-info{padding:14px}
    .catalog-info h3{font-size:14px}
    .product-main-photo{min-height:430px}
    .cart-item{grid-template-columns:74px 1fr;position:relative}
    .cart-mini-photo{width:74px;height:92px}
    .remove-item{grid-column:2;justify-self:start}
    .form-grid{grid-template-columns:1fr}
}
@media(max-width:420px){
    .catalog-grid{grid-template-columns:1fr}
    .catalog-photo{height:320px}
}

.header-link{display:inline-flex;align-items:center;justify-content:center}


.checkout-note{
    color:var(--muted);
    line-height:1.7;
    margin-top:14px;
}
.checkout-alert{
    display:none;
    margin:18px 0 0;
    padding:14px 16px;
    border-radius:16px;
    font-weight:500;
}
.checkout-alert.show{
    display:block;
}
.checkout-alert.error{
    background:#fff0f0;
    color:#9b3030;
    border:1px solid #ffd0d0;
}
.checkout-alert.success{
    background:#edf8f0;
    color:#2f8a43;
    border:1px solid #cfead5;
}
.checkout-form textarea{
    width:100%;
    border:1px solid var(--border);
    border-radius:16px;
    padding:14px;
    margin-top:8px;
    outline:none;
    background:var(--background);
    resize:vertical;
}
.success-actions{
    display:flex;
    gap:12px;
    justify-content:center;
    flex-wrap:wrap;
    margin-top:20px;
}


/* Sacola com imagem, edição e quantidade */
.cart-mini-photo{
    overflow:hidden;
    display:block;
    background:#f4eee9;
    border:1px solid var(--border);
}

.cart-mini-photo img{
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
    display:block;
    background:#f4eee9;
}

.cart-product-link{
    text-decoration:none;
    color:inherit;
}

.cart-product-link:hover h3{
    color:var(--primary-deep);
}

.cart-item-info{
    min-width:0;
}

.cart-qty-control{
    display:inline-flex;
    align-items:center;
    gap:0;
    margin-top:12px;
    border:1px solid var(--border);
    border-radius:999px;
    overflow:hidden;
    background:var(--secondary);
}

.cart-qty-control button{
    width:34px;
    height:32px;
    border:none;
    background:transparent;
    cursor:pointer;
    font-weight:700;
    color:var(--text);
}

.cart-qty-control span{
    min-width:34px;
    text-align:center;
    font-weight:600;
    font-size:13px;
    color:var(--text);
}

.cart-qty-control button:hover{
    background:rgba(177,132,114,.16);
}

@media(max-width:760px){
    .cart-item{
        grid-template-columns:76px 1fr;
        align-items:start;
        position:relative;
    }

    .cart-mini-photo{
        width:76px;
        height:96px;
    }

    .cart-item .remove-item{
        grid-column:2;
        justify-self:start;
        margin-top:8px;
    }
}


/* Galeria com múltiplas fotos do produto */
.product-main-photo{
    overflow:hidden;
    display:flex;
    align-items:center;
    justify-content:center;
}

.product-main-photo img{
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
    display:block;
    background:#f8f4f1;
}

.product-thumbs{
    grid-template-columns:repeat(auto-fit,minmax(96px,1fr));
}

.product-thumb{
    height:120px;
    border-radius:18px;
    background:#f8f4f1;
    border:1px solid var(--border);
    overflow:hidden;
    cursor:pointer;
    padding:0;
    transition:.25s ease;
}

.product-thumb img{
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
    display:block;
}

.product-thumb.active{
    border-color:var(--primary-deep);
    box-shadow:0 0 0 2px rgba(177,132,114,.18);
}

.product-thumb:hover{
    transform:translateY(-3px);
}

.product-description-below{
    margin-top:24px;
    padding:24px;
    border:1px solid var(--border);
    border-radius:24px;
    background:rgba(255,255,255,.70);
}

@media(max-width:760px){
    .product-thumb{
        height:96px;
    }
}
