.account-favorite-card{
position:relative;
height:100%;
min-width:0;
overflow:hidden;
cursor:pointer;
}

.account-favorite-card .product-image{
cursor:pointer;
}

.account-favorite-card .product-image img{
background:#eee;
}

.account-favorite-card .product-body{
display:block;
}

.account-favorite-card .product-description{
flex:none;
}

.account-favorite-card .product-actions{
min-width:0;
display:block;
}

.account-favorite-products{
grid-template-columns:repeat(4,minmax(0,1fr));
align-items:stretch;
}

.account-empty{
grid-column:1 / -1;
}

.favorite-remove-btn{
position:absolute;
top:12px;
right:12px;
z-index:4;
width:40px;
height:40px;
border-radius:14px;
background:rgba(255,255,255,.94);
color:var(--red);
font-size:25px;
line-height:1;
font-weight:900;
box-shadow:0 10px 24px rgba(0,0,0,.14);
transition:.2s;
}

.favorite-remove-btn:hover{
background:var(--red);
color:#fff;
transform:translateY(-1px);
}

.product-modal,
.delivery-modal,
.order-detail-modal{
position:fixed;
inset:0;
display:none;
align-items:center;
justify-content:center;
padding:24px;
background:rgba(0,0,0,.72);
backdrop-filter:blur(8px);
-webkit-backdrop-filter:blur(8px);
z-index:12000;
}

.product-modal.active,
.delivery-modal.active,
.order-detail-modal.active{
display:flex;
}

.product-modal-card{
width:100%;
max-width:900px;
height:min(720px,88vh);
display:grid;
grid-template-columns:minmax(0,1fr) minmax(0,1fr);
overflow:hidden;
border-radius:32px;
background:#fff;
box-shadow:0 24px 80px rgba(0,0,0,.24);
}

.product-modal-image{
min-height:0;
background:#fff1ea;
overflow:hidden;
}

.product-modal-image img{
width:145%;
height:100%;
object-fit:cover;
object-position:right center;
transform:translateX(-31%);
max-width:none;
}

.product-modal-content{
min-height:0;
display:flex;
flex-direction:column;
overflow:hidden;
}

.modal-scroll-area{
flex:1 1 auto;
min-height:0;
overflow-y:auto;
padding:42px 42px 18px;
}

.modal-scroll-area h2{
font-size:42px;
line-height:1;
font-weight:900;
margin-bottom:18px;
hyphens:auto;
overflow-wrap:break-word;
word-break:normal;
}

.modal-scroll-area p{
line-height:1.7;
color:var(--text-light);
margin-bottom:22px;
}

.modal-price{
font-size:38px;
font-weight:900;
white-space:nowrap;
}

.modal-action-bar{
flex:0 0 auto;
display:grid;
grid-template-columns:auto minmax(180px,1fr);
align-items:center;
gap:16px;
padding:18px 42px 42px;
border-top:1px solid var(--border);
background:#fff;
box-shadow:0 -18px 34px rgba(255,255,255,.94);
}

.modal-cart-button{
gap:10px;
width:100%;
}

.product-add{
position:relative;
isolation:isolate;
overflow:hidden;
transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.product-add::before{
content:"";
position:absolute;
inset:-1px;
background:linear-gradient(120deg,rgba(255,255,255,0),rgba(255,255,255,.55),rgba(255,255,255,0));
transform:translateX(-120%);
transition:transform .45s ease;
z-index:-1;
}

.product-add:hover{
transform:translateY(-2px) scale(1.04);
box-shadow:0 14px 30px rgba(212,32,39,.28);
filter:saturate(1.08);
}

.product-add:hover::before{
transform:translateX(120%);
}

.product-add:hover::after{
animation:addPulse .72s ease both;
}

.product-add:active{
transform:translateY(0) scale(.96);
box-shadow:0 8px 18px rgba(212,32,39,.2);
}

@keyframes addPulse{
0%{transform:scale(1);}
45%{transform:scale(1.18);}
100%{transform:scale(1);}
}

@media(max-width:1100px){
.account-favorite-products{
grid-template-columns:repeat(3,minmax(0,1fr));
}
}

.option-tile-grid{
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
gap:10px;
}

.option-tile{
display:grid;
gap:6px;
padding:8px;
border:1px solid var(--border);
border-radius:18px;
background:#fff;
transition:.18s ease;
min-width:0;
overflow:hidden;
}

.option-tile:has(input:checked){
border-color:var(--red);
box-shadow:0 12px 28px rgba(212,32,39,.14);
}

.option-tile input{
position:absolute;
opacity:0;
pointer-events:none;
}

.option-tile-image{
width:100%;
height:66px;
border-radius:14px;
overflow:hidden;
background:#fff;
display:block;
}

.option-tile-image img{
width:100%;
height:100%;
object-fit:contain;
display:block;
}

.option-tile-name{
min-width:0;
font-size:13px;
line-height:1.2;
font-weight:900;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.option-tile-meta{
font-size:12px;
line-height:1.2;
font-weight:800;
color:var(--text-light);
}

.size-switcher{
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
padding:4px;
border-radius:999px;
background:#fff1ea;
}

.size-choice input,
.exclude-chip input,
.cheese-button input{
position:absolute;
opacity:0;
pointer-events:none;
}

.size-choice span{
display:flex;
align-items:center;
justify-content:center;
min-height:38px;
border-radius:999px;
font-weight:900;
cursor:pointer;
}

.size-choice input:checked + span{
background:#fff;
box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.exclude-list{
display:flex;
flex-wrap:wrap;
gap:8px;
margin-bottom:18px;
}

.exclude-chip span{
display:inline-flex;
align-items:center;
min-height:34px;
padding:0 12px;
border:1px solid var(--border);
border-radius:999px;
background:#fff;
font-size:13px;
font-weight:800;
cursor:pointer;
}

.exclude-chip input:checked + span{
color:var(--text-light);
text-decoration:line-through;
background:#fff1ea;
}

.cheese-button{
display:flex;
align-items:center;
justify-content:space-between;
gap:12px;
padding:15px 16px;
border:1px solid var(--border);
border-radius:18px;
background:#fff;
font-weight:900;
transition:.18s ease;
}

.cheese-button:has(input:checked){
border-color:var(--red);
box-shadow:0 12px 28px rgba(212,32,39,.14);
}

.cheese-button-inline{
margin-top:10px;
}

@media(max-width:820px){
.account-favorite-products{
grid-template-columns:repeat(2,minmax(0,1fr));
}

.product-modal-card{
grid-template-columns:1fr;
height:min(760px,90vh);
max-height:90vh;
overflow:hidden;
}

.product-modal-content{
min-height:0;
}

.product-modal-image img{
width:100%;
height:280px;
object-position:center;
transform:none;
}

.modal-scroll-area{
padding:30px 30px 16px;
}

.modal-action-bar{
grid-template-columns:auto minmax(180px,1fr);
padding:16px 30px 30px;
}

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

@media(max-width:640px){
.account-favorite-products{
grid-template-columns:repeat(2,minmax(0,1fr));
}

.account-favorite-card{
min-height:0;
display:block;
grid-template-columns:none;
overflow:hidden;
}

.account-favorite-card .product-image{
width:100%;
height:auto;
margin:0;
align-self:start;
}

.account-favorite-card .product-body{
min-width:0;
width:100%;
padding:8px 2px 0;
display:flex;
flex-direction:column;
align-items:flex-start;
text-align:left;
}

.account-favorite-card .product-description{
display:-webkit-box;
width:100%;
min-height:34px;
margin-bottom:8px;
color:var(--text-light);
font-size:12px;
line-height:1.35;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;
overflow:hidden;
flex:0 1 auto;
}

.account-favorite-card .product-meta{
display:block;
width:100%;
margin-bottom:8px;
color:var(--text-light);
font-size:11px;
line-height:1.25;
}

.account-favorite-card .product-footer{
display:flex;
justify-content:space-between;
align-items:center;
width:100%;
gap:8px;
margin-top:auto;
}

.account-favorite-card .product-price{
display:block;
font-size:18px;
font-weight:900;
line-height:1;
}

.account-favorite-card .product-actions{
display:flex;
justify-content:flex-end;
}

.account-favorite-card .product-add{
width:38px;
min-width:38px;
height:38px;
min-height:38px;
padding:0;
border-radius:13px;
background:var(--red);
color:#fff;
box-shadow:0 10px 20px rgba(212,32,39,.18);
}

.account-favorite-card .product-add .cart-icon{
display:block;
width:18px;
height:18px;
}

.account-favorite-card .product-add-price{
display:none;
}

.favorite-remove-btn{
top:8px;
right:8px;
left:auto;
width:34px;
height:34px;
border-radius:12px;
font-size:22px;
}

.modal-scroll-area{
padding:24px 24px 14px;
}

.modal-action-bar{
grid-template-columns:1fr;
gap:10px;
padding:14px 24px 24px;
}

.modal-price{
font-size:30px;
}

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

.option-tile{
padding:8px;
border-radius:15px;
}
}

@media(max-width:640px){
.product-modal,
.order-detail-modal{
align-items:center;
padding:10px 10px calc(14px + env(safe-area-inset-bottom));
z-index:40000;
}

.product-modal-card{
width:100%;
height:min(820px,94dvh);
max-height:calc(100dvh - 24px - env(safe-area-inset-bottom));
display:flex;
flex-direction:column;
border-radius:26px;
overflow-y:auto;
}

.product-modal-image{
flex:0 0 auto;
min-height:0;
background:#fff;
}

.product-modal-image img{
width:100%;
height:auto;
max-height:none;
aspect-ratio:1/1;
object-fit:contain;
object-position:center;
transform:none;
background:#fff;
}

.product-modal-content{
display:contents;
}

.modal-scroll-area{
flex:0 0 auto;
min-height:0;
overflow:visible;
padding:8px 24px 18px;
}

.modal-action-bar{
position:sticky;
left:0;
right:0;
bottom:0;
z-index:40001;
display:grid;
grid-template-columns:minmax(88px,auto) 56px;
align-items:center;
gap:12px;
padding:12px 18px calc(12px + env(safe-area-inset-bottom));
border-top:1px solid var(--border);
background:rgba(255,255,255,.96);
box-shadow:0 -16px 34px rgba(0,0,0,.08);
backdrop-filter:blur(16px);
}

.modal-price{
font-size:30px;
line-height:1;
}

.modal-cart-button{
width:56px;
min-width:56px;
height:52px;
min-height:52px;
padding:0;
border-radius:16px;
display:grid;
place-items:center;
}

.modal-cart-button span:not(.cart-icon){
display:none;
}

.modal-cart-button .cart-icon{
width:20px;
height:20px;
}

.size-switcher{
grid-template-columns:repeat(var(--size-count,4),minmax(0,1fr));
gap:6px;
}

.size-switcher label{
min-height:38px;
padding:8px 6px;
font-size:13px;
white-space:nowrap;
}

.option-choice{
display:grid;
grid-template-columns:minmax(0,1fr) auto;
align-items:center;
gap:12px;
text-align:left;
}

.option-choice-main{
min-width:0;
justify-content:flex-start;
}

.option-choice-main span{
min-width:0;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.option-choice-meta{
justify-self:end;
text-align:right;
white-space:nowrap;
}

.option-tile-grid{
grid-template-columns:repeat(3,minmax(0,1fr));
gap:8px;
}

.option-tile{
padding:8px 6px;
border-radius:15px;
}

.option-tile-image{
height:56px;
border-radius:12px;
}

.option-tile-name{
font-size:12px;
}
}
