.midas-giftcard-test .gc-preview-layout{display:grid;grid-template-columns:minmax(0,1fr) 160px;gap:20px;align-items:start;position:relative}
.midas-giftcard-test .gc-template-picker{position:absolute;right:0;top:0;bottom:0;width:160px;display:flex;flex-direction:column;min-height:0}
.midas-giftcard-test .gc-template-picker h3{font:inherit;font-weight:600;margin:0 0 10px;font-size:14px}
.midas-giftcard-test .gc-template-picker .gc-template-grid{display:flex;flex-direction:column;gap:12px;overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:3px 8px 3px 3px;scrollbar-width:thin}
.midas-giftcard-test .gc-template-picker .gc-template{flex:0 0 auto;width:100%;min-width:0;margin:0;position:relative;cursor:pointer;overflow:hidden;border-radius:8px}
.midas-giftcard-test .gc-template-picker .gc-template-image{height:auto;aspect-ratio:2400/1748;background:#fff;display:flex;align-items:center;justify-content:center}
.midas-giftcard-test .gc-template-picker .gc-template-image img{display:block;width:100%;height:100%;object-fit:contain}
.midas-giftcard-test .gc-template-picker .gc-template:has(input:checked){border-color:var(--gc-blue);box-shadow:0 0 0 2px var(--gc-blue)}
.midas-giftcard-test .gc-template-picker .gc-template:focus-within{outline:2px solid var(--gc-blue);outline-offset:2px}
.midas-giftcard-test .gc-template-picker .gc-selected{font-size:12px;padding:3px 5px}
@media(max-width:600px){.midas-giftcard-test .gc-preview-layout{grid-template-columns:minmax(0,1fr) 86px;gap:10px}.midas-giftcard-test .gc-template-picker{width:86px}.midas-giftcard-test .gc-template-picker h3{font-size:11px}.midas-giftcard-test .gc-template-picker .gc-template-grid{gap:8px;padding-right:5px}.midas-giftcard-test .gc-template-picker .gc-selected{font-size:10px}}

/* Storefront-only mobile layout. Desktop rules above remain unchanged. */
@media (max-width:820px){
  body.com_midasgiftcard #g-features{padding:12px 0}
  body.com_midasgiftcard #g-features .g-content{margin:0;padding:0}
  body.com_midasgiftcard .platform-content.container{width:100%;max-width:100%;padding:0}
  body.com_midasgiftcard .platform-content>.row{margin:0}
  body.com_midasgiftcard .platform-content>.row>.col{padding:0;min-width:0}
  .midas-giftcard-test{width:100%;padding:10px 12px 28px}
  .midas-giftcard-test .gc-form{grid-template-columns:minmax(0,1fr)}
  .midas-giftcard-test .gc-section,.midas-giftcard-test .gc-shop-layout>*,.midas-giftcard-test .gc-fields>*{min-width:0;max-width:100%}
  .midas-giftcard-test .gc-section{padding:14px}
  .midas-giftcard-test .gc-shop-layout,.midas-giftcard-test .gc-catalog-tools,.midas-giftcard-test .gc-fields{grid-template-columns:minmax(0,1fr)}
  .midas-giftcard-test .gc-catalog-tools input,.midas-giftcard-test .gc-catalog-tools select,.midas-giftcard-test .gc-fields input,.midas-giftcard-test .gc-fields select,.midas-giftcard-test .gc-fields textarea{min-width:0;max-width:100%;width:100%;font-size:16px}
  .midas-giftcard-test .gc-hero{padding:8px 0 16px}
  .midas-giftcard-test .gc-site-logo{max-width:150px;max-height:60px;margin-bottom:12px}
  .midas-giftcard-test .gc-hero h1{font-size:clamp(1.65rem,6vw,2.1rem)}
  .midas-giftcard-test .gc-section-heading{gap:9px}
  .midas-giftcard-test .gc-section-heading>div{min-width:0}
  .midas-giftcard-test .gc-section-heading h2,.midas-giftcard-test .gc-product strong,.midas-giftcard-test .gc-cart-line strong{overflow-wrap:anywhere}
  .midas-giftcard-test .gc-content-heading .gc-language-picker{flex-basis:100%;justify-content:flex-start;margin:8px 0 0}
  .midas-giftcard-test .gc-preview-layout{grid-template-columns:minmax(0,1fr);gap:14px}
  .midas-giftcard-test .gc-live-preview{width:100%;min-height:0}
  .midas-giftcard-test .gc-template-picker{position:static;width:100%;min-width:0}
  .midas-giftcard-test .gc-template-picker h3{font-size:14px}
  .midas-giftcard-test .gc-template-picker .gc-template-grid{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:4px;gap:10px;scroll-snap-type:x proximity}
  .midas-giftcard-test .gc-template-picker .gc-template{flex:0 0 110px;width:110px;scroll-snap-align:start}
  .midas-giftcard-test .gc-payment-summary{grid-template-columns:minmax(0,1fr);padding:14px}
  .midas-giftcard-test .gc-payment-actions{flex-direction:column-reverse;align-items:stretch;min-width:0}
  .midas-giftcard-test .gc-payment-actions button{width:100%;white-space:normal;min-height:48px}
  .midas-giftcard-test .gc-terms-consent{justify-content:flex-start}
  .midas-giftcard-test .gc-terms-consent label{padding:10px 0;min-width:0}
  .midas-giftcard-test #gc-terms-dialog{width:calc(100% - 24px);max-width:600px;max-height:calc(100dvh - 24px);padding:18px;overflow:hidden}
  .midas-giftcard-test #gc-terms-dialog[open]{display:flex;flex-direction:column}
  .midas-giftcard-test #gc-terms-dialog h2{flex:0 0 auto;font-size:1.3rem;margin-bottom:12px}
  .midas-giftcard-test .gc-terms-text{min-height:0;max-height:none;overflow-y:auto;flex:1 1 auto;overscroll-behavior:contain}
  .midas-giftcard-test .gc-terms-buttons{flex:0 0 auto;gap:8px;margin-top:14px}
  .midas-giftcard-test .gc-terms-buttons button{flex:1;min-width:0;padding:12px 8px;white-space:normal;min-height:48px}
  body.com_midasgiftcard .gc-addon-dialog{width:calc(100% - 24px);max-height:calc(100dvh - 24px);padding:16px;overflow:hidden}
  body.com_midasgiftcard .gc-addon-dialog[open]{display:flex;flex-direction:column}
  body.com_midasgiftcard .gc-addon-dialog h2{font-size:1.3rem;line-height:1.3;margin:0 24px 10px 0;flex:0 0 auto}
  body.com_midasgiftcard .gc-addon-dialog>p{font-size:14px;line-height:1.4;margin:0 0 10px;flex:0 0 auto}
  body.com_midasgiftcard .gc-addon-options{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;margin:4px 0 12px;overscroll-behavior:contain}
  body.com_midasgiftcard .gc-addon-options label{padding:10px;line-height:1.35}
  body.com_midasgiftcard .gc-addon-total,body.com_midasgiftcard .gc-addon-actions{flex:0 0 auto}
  body.com_midasgiftcard .gc-addon-actions{gap:6px}
  body.com_midasgiftcard .gc-addon-actions button{min-height:44px;padding:8px 12px}
}
