/* Grafica originale MisterGift: correzioni circoscritte a ricerca, titoli e hobby. */
html{scroll-padding-top:16px}
a:focus-visible,button:focus-visible,select:focus-visible{outline:3px solid #FDD035;outline-offset:3px}
.mg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Testata home: testo, dimensioni e centratura dell'originale. */
body.mg-home header{background:#FFF url(/img/colorati.fw.png) repeat-x}
body.mg-home div#header{width:100%;margin:0 auto;padding:0;overflow:hidden;text-align:center;background:#FFF;max-width:920px;box-shadow:0 10px 145px 0 #FFF}
body.mg-home div#header>div{margin:10px auto;max-width:840px}
body.mg-home div#header a{display:inline-block;background:url(/img/logo.png) no-repeat;background-size:contain;width:350px;height:150px;margin:0 0 0 -44px}
body.mg-home div#header h1{display:inline-block;float:right;text-align:center;font-size:32px;line-height:1.25;margin:25px 40px 0 0;font-weight:700;color:#293339}
body.mg-home div#header h1 b{display:block;font-size:120%}

/* Ricerca compatta: occasione in primo piano, destinatario e prezzo secondari. */
div#cercaregalo,div#cercaregalo.sticky{position:static;top:auto;z-index:auto;width:100%;padding:0;overflow:hidden;box-sizing:border-box}
div#cercaregalo+#content{padding-top:0}
div#cercaregalo>.mg-search-inner{max-width:840px;margin:0 auto;padding:0 12px;box-sizing:border-box}
div#cercaregalo form.mg-search-main{display:grid;grid-template-columns:20% 40% 1fr;column-gap:10px;row-gap:7px;margin:10px 0 0;background:transparent}
div#cercaregalo .mg-search-field{margin:0;width:auto;max-width:none;min-width:0}
div#cercaregalo .mg-occasion-field{grid-column:1/-1}
div#cercaregalo .mg-search-main select{box-sizing:border-box;display:block;width:100%;height:38px;margin:0;border:1px solid #8CAEE5;border-radius:4px;padding:6px 12px;background:#EBECED;color:#161C1F;font-size:16px;font-weight:400}
div#cercaregalo .mg-search-main #selOccasion{height:43px;background:#FFF;font-size:18px;font-weight:700}
div#cercaregalo .mg-search-main select:disabled{color:#626B70;background:#DDE1E3}
div#cercaregalo button#divTrovaRegalo{display:block;box-sizing:border-box;width:100%;height:38px;margin:0;padding:7px 8px;border:1px solid #38813C;border-radius:4px;background:#4CAF50;color:#FFF;font:700 16px Arial,Helvetica,sans-serif;cursor:pointer}
div#cercaregalo button#divTrovaRegalo:hover{background:#38813C}
div#cercaregalo form.mg-hobby-search{display:flex;align-items:center;gap:8px;margin:9px 0 10px;padding-top:8px;border-top:1px solid #627079;background:transparent}
div#cercaregalo .mg-hobby-search label{color:#FFF;font:14px/1.2 Arial,Helvetica,sans-serif;white-space:nowrap}
div#cercaregalo .mg-hobby-search select{flex:1;min-width:0;width:auto;height:36px;box-sizing:border-box;margin:0;padding:4px 8px;border:1px solid #8CAEE5;border-radius:3px;background:#F4F5F5;color:#293339;font:14px Arial,Helvetica,sans-serif}
div#cercaregalo .mg-hobby-search button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;min-width:112px;height:36px;margin:0;padding:6px 14px;border:1px solid #E5BD25;border-radius:3px;background:#FDD035;color:#1F1F1F;font:700 14px Arial,Helvetica,sans-serif;line-height:1.2;white-space:nowrap;cursor:pointer}
div#cercaregalo .mg-hobby-search button:hover{background:#F4C21A;border-color:#D4A80B}

/* Colori del sito originale, senza testo rosso nei nuovi blocchi. */
div.left a,div.left p a{color:#006291}

/* Schede: immagini e pulsante semplici, titolo intero e pulsanti allineati. */
.mg-product-grid,.gift-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 24px;clear:both;margin:24px 0 38px}
.mg-product-shell{display:flex;flex-direction:column;min-width:0;margin:16px 0 24px}
.mg-product-grid>.mg-product-shell,.gift-results>.mg-product-shell{display:flex;margin:0}
div.left a.regalo.mg-product,div#bestseller a.regalo.mg-product,.mg-product-grid a.regalo.mg-product{display:flex;flex-direction:column;box-sizing:border-box;width:100%;margin:0;padding:12px 0;float:none;border:0;border-radius:0;box-shadow:none;background:transparent;color:#293339;text-decoration:none;text-align:center;min-width:0;height:auto;flex:1}
a.regalo.mg-product .mg-product-image{display:flex;align-items:center;justify-content:center;box-sizing:border-box;flex:none;width:100%;max-width:257px;height:226px;padding:20px;border:1px solid #EF9B47;margin:0 auto 24px;background:#FFF}
a.regalo.mg-product .mg-product-image img{display:block;width:100%;height:180px;max-width:100%;object-fit:contain;margin:0}
div.left a.regalo.mg-product .mg-product-title,div#bestseller a.regalo.mg-product .mg-product-title{display:block;box-sizing:border-box;height:auto!important;max-height:none!important;overflow:visible!important;-webkit-line-clamp:unset;white-space:normal;overflow-wrap:anywhere;width:100%;padding:0;margin:0 0 20px;color:#293339;font:700 17px/1.25 Arial,Helvetica,sans-serif;text-align:center}
a.regalo.mg-product .mg-product-bottom{display:block;margin-top:auto;width:100%}
a.regalo.mg-product .mg-product-cta{display:flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;min-height:36px;margin:0 auto;width:92%;padding:6px 8px;border:1px solid #38813C;background:#4CAF50;color:#FFF;font:400 16px/1.3 Arial,Helvetica,sans-serif;text-align:center}
a.regalo.mg-product:hover .mg-product-cta{background:#38813C}
a.regalo.mg-product .mg-product-price{display:inline;font-weight:700;color:#FFF}
div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell a.regalo.mg-product,div.left section>.mg-product-shell a.regalo.mg-product{display:grid;grid-template-columns:220px minmax(0,1fr);gap:0 25px;height:auto;align-items:start;padding:12px 0 20px}
div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell .mg-product-image,div.left section>.mg-product-shell .mg-product-image{grid-row:1/3;width:220px;height:220px;margin:0}
div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell .mg-product-title,div.left section>.mg-product-shell .mg-product-title{text-align:left}
div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell .mg-product-cta,div.left section>.mg-product-shell .mg-product-cta{width:100%}
.gift-results{grid-template-columns:repeat(2,minmax(0,1fr))}
div#bestseller{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:25px}
div#bestseller a.regalo.mg-product{max-width:none}
div#bestseller>.mg-product-shell{margin:0}

/* Metadati fuori dal link: stessa riga per tutti, dettagli senza spostare i pulsanti. */
.mg-product-meta{box-sizing:border-box;position:relative;flex:0 0 22px;min-height:22px;height:22px;width:92%;margin:0 auto;font:11px/1.4 Arial,Helvetica,sans-serif;color:#666;text-align:left}
.mg-product-meta details.mg-price-details{border:0;margin:0;padding:0;line-height:1.4}
.mg-product-meta details.mg-price-details summary{display:block;list-style:none;margin:0;padding:0;font:11px/1.4 Arial,Helvetica,sans-serif;white-space:nowrap;cursor:pointer;color:#666}
.mg-product-meta details.mg-price-details summary::-webkit-details-marker{display:none}
.mg-product-meta details.mg-price-details summary span{color:#006291;text-decoration:underline}
.mg-product-meta .mg-price-disclaimer{box-sizing:border-box;position:absolute;top:100%;left:0;z-index:40;width:100%;min-width:200px;max-width:360px;padding:12px;background:#FFF;border:1px solid #BCC7CD;box-shadow:0 3px 10px #0002;color:#444;font:13px/1.45 Arial,Helvetica,sans-serif;white-space:normal}
.mg-product-meta details[open] summary{color:#293339}
div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell>.mg-product-meta,div.left section>.mg-product-shell>.mg-product-meta{width:auto;margin-left:245px;margin-right:0}

/* Hobby: fotografie naturali e testo con i colori originali. */
.mg-hobby-picture{display:block;width:100%;aspect-ratio:16/9;overflow:hidden}
div.left .mg-hobby-picture img{display:block;width:100%;max-width:100%;height:100%;margin:0;object-fit:cover}
.mg-hobby-card .mg-hobby-picture{margin:0 0 12px}
.mg-guide-cover{max-width:640px;margin:22px auto}

.mg-hobby-section{clear:both;text-align:left;margin:35px 0 20px}
div.left .mg-hobby-section h2{text-align:left;padding:0;margin:0 0 12px;font-size:25px;color:#006291}
.mg-hobby-section>p{font-size:17px;line-height:1.5;margin:12px 0 18px}
.mg-hobby-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 20px}
div.left a.mg-hobby-card{display:block;box-sizing:border-box;padding:12px 0;border:0;border-bottom:1px solid #D5E3E4;background:transparent;color:#293339;text-decoration:none;font-weight:400;line-height:1.4}
div.left a.mg-hobby-card b{display:block;color:#006291;font-size:19px;font-weight:700;margin-bottom:5px}
div.left a.mg-hobby-card span{display:block;color:#444;font-size:15px;font-weight:400}
div.left a.mg-hobby-card:hover b{text-decoration:underline}
.mg-hobby-more{margin:12px 0 30px;text-align:left;line-height:1.6;font-size:16px}
.mg-hobby-more>p{margin:10px 0}
.mg-hobby-more>a{display:inline-block;margin:0 16px 5px 0;font-size:16px}
.mg-hobby-all{font-weight:700}
.mg-hobby-footer{max-width:1100px;margin:0 auto;padding:18px 20px;border-bottom:1px solid #536169;line-height:1.5}
.mg-hobby-footer b{display:block;margin-bottom:7px}
.mg-hobby-footer a{display:inline-block;color:#FFF;padding:3px 12px 3px 0;font-size:14px}
.mg-breadcrumb{display:flex;flex-wrap:wrap;gap:8px;font-size:14px;line-height:1.5;margin:0 0 15px;color:#555}
.mg-breadcrumb a{color:#006291}
.mg-guide-meta{font-size:13px;line-height:1.5;color:#666;margin:0 0 18px}
div.left.mg-guide p{font-size:18px;line-height:1.65;text-align:left;margin:16px 0}
div.left.mg-guide .mg-guide-intro{font-size:19px;line-height:1.6}
div.left.mg-guide h2{font-size:26px;line-height:1.3;text-align:left;padding:0;margin:24px 0 15px;color:#006291;text-transform:none}
.mg-affiliate-note{font-size:13px;line-height:1.5;color:#555;padding:12px 0;margin:16px 0;border-top:1px solid #DDD;border-bottom:1px solid #DDD}
.mg-quick-choice{border-left:3px solid #006291;padding:0 0 0 16px;margin:24px 0}
.mg-guide-toc{border-top:1px solid #DDD;border-bottom:1px solid #DDD;padding:16px 0;margin:24px 0;line-height:1.5}
.mg-guide-toc b{display:block;margin-bottom:8px;font-weight:700}
.mg-guide-toc a{display:block;font-size:16px;padding:3px 0}
.mg-idea{clear:both;border-top:1px solid #DDD;margin-top:28px;padding-top:24px}
.mg-idea-tag{display:inline-block;font-size:13px;line-height:1.4;color:#666}
.mg-buy-check{border-left:3px solid #FDD035;padding-left:14px}
.mg-idea .mg-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.mg-amazon-search{display:inline-block;font-size:16px;line-height:1.4;margin:10px 0 14px;text-decoration:underline}
.mg-guide-bottom{margin:28px 0;padding:0}
.mg-guide details{border-bottom:1px solid #DDD;padding:14px 0;line-height:1.5}
.mg-guide summary{cursor:pointer;font-size:18px;font-weight:700}
#stickyright{position:relative}
a#backtotop{z-index:30;line-height:42px;text-align:center;color:#FFF;font-size:26px}

@media(max-width:1002px){
 .mg-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 div#regali aside div.right{min-width:0;max-width:100%}
 div#regali div.stickyright{min-width:0}
 .mg-hobby-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
 body.mg-home div#header h1,body.mg-home div#header a{float:none;display:block;margin:0 auto}
 body.mg-home div#header h1{width:96%;margin:10px 0 30px;padding:0 2%}
 body.mg-home div#header h1 b{display:inline;font-size:inherit}
}
@media(max-width:667px){
 .mg-product-grid,.gift-results,.mg-idea .mg-product-grid,div#bestseller{grid-template-columns:1fr}
 div#cercaregalo>.mg-search-inner{padding:0 10px}
 div#cercaregalo form.mg-search-main{grid-template-columns:1fr 1.5fr;gap:7px}
 div#cercaregalo button#divTrovaRegalo{grid-column:1/-1}
 div#cercaregalo .mg-search-main select{font-size:16px;padding:5px 8px}
 div#cercaregalo .mg-search-main #selOccasion{font-size:17px}
 div#cercaregalo form.mg-hobby-search{flex-wrap:wrap}
 div#cercaregalo .mg-hobby-search label{width:100%;font-size:13px}
 div#cercaregalo .mg-hobby-search select{font-size:16px;height:36px}
 div#cercaregalo .mg-hobby-search button{height:36px}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell a.regalo.mg-product,div.left section>.mg-product-shell a.regalo.mg-product{grid-template-columns:150px minmax(0,1fr);gap:0 15px}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell .mg-product-image,div.left section>.mg-product-shell .mg-product-image{width:150px;height:180px;padding:10px}
 .mg-product-image img{max-height:160px}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell>.mg-product-meta,div.left section>.mg-product-shell>.mg-product-meta{margin-left:165px}
}
@media(max-width:500px){
 body.mg-home div#header a{width:96%;margin:5px 0;display:inline-block;background-size:100% auto;height:188px}
 .mg-product-grid,.gift-results,.mg-idea .mg-product-grid,div#bestseller{grid-template-columns:1fr}
 .mg-hobby-grid{grid-template-columns:1fr}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell>.mg-product-meta,div.left section>.mg-product-shell>.mg-product-meta{width:92%;margin-left:auto;margin-right:auto}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell a.regalo.mg-product,div.left section>.mg-product-shell a.regalo.mg-product{display:flex}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell .mg-product-image,div.left section>.mg-product-shell .mg-product-image{width:220px;height:220px;margin:0 auto 22px}
 div.left:not(.mg-home-products):not(.mg-guide)>.mg-product-shell .mg-product-title,div.left section>.mg-product-shell .mg-product-title{text-align:center}
}
@media(max-width:450px){body.mg-home div#header a{height:170px}body.mg-home div#header h1 b{display:block}}
@media(max-width:400px){body.mg-home div#header a{height:151px}body.mg-home div#header h1{font-size:30px}}
@media(max-width:367px){body.mg-home div#header a{height:136px}}
