/*
 * ETGC 2.8.321 - prima UI mobile/tablet front
 * Solo responsive CSS: nessuna logica, nessun dato, nessuna configurazione.
 */

/* Base fluida per tutte le pagine account/modulo */
@media (max-width: 1024px) {
  body[id^="module-etstripegiftcards-"] {
    background:#fbfaf7!important;
    overflow-x:hidden!important;
  }

  body[id^="module-etstripegiftcards-"] .container,
  body[id^="module-etstripegiftcards-"] .page-content,
  body[id^="module-etstripegiftcards-"] .etgc-account-page,
  body[id^="module-etstripegiftcards-"] .etgc-dashboard-content,
  body[id^="module-etstripegiftcards-"] .etgc-main-content-area,
  body[id^="module-etstripegiftcards-"] .etgc-account-main,
  body[id^="module-etstripegiftcards-"] .etgc-giftcart-full-main {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-account-page,
  body[id^="module-etstripegiftcards-"] .etgc-dashboard-content,
  body[id^="module-etstripegiftcards-"] .etgc-main-content-area {
    padding-left:14px!important;
    padding-right:14px!important;
  }

  body[id^="module-etstripegiftcards-"] img {
    max-width:100%!important;
    height:auto!important;
  }

  body[id^="module-etstripegiftcards-"] table {
    width:100%!important;
    table-layout:auto!important;
  }
}

/* Mobile account/menu: stile card tipo app */
@media (max-width: 767px) {
  body[id^="module-etstripegiftcards-"] .etgc-account-breadcrumb,
  body[id^="module-etstripegiftcards-"] .breadcrumb,
  body[id^="module-etstripegiftcards-"] .page-heading {
    display:none!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-account-layout,
  body[id^="module-etstripegiftcards-"] .etgc-giftcart-full-layout,
  body[id^="module-etstripegiftcards-"] .etgc-checkout-layout {
    display:block!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100%!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-dash-sidebar,
  body[id^="module-etstripegiftcards-"] .etgc-account-sidebar,
  body[id^="module-etstripegiftcards-"] .etgc-sidebar,
  body[id^="module-etstripegiftcards-"] aside.etgc-account-nav {
    width:100%!important;
    max-width:100%!important;
    position:relative!important;
    top:auto!important;
    margin:0 0 16px!important;
    padding:0!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-dash-hero,
  body[id^="module-etstripegiftcards-"] .etgc-v270-hero,
  body[id^="module-etstripegiftcards-"] .etgc-wallet-balance-card,
  body[id^="module-etstripegiftcards-"] .etgc-card,
  body[id^="module-etstripegiftcards-"] .etgc-ux-card,
  body[id^="module-etstripegiftcards-"] .panel,
  body[id^="module-etstripegiftcards-"] .etgc-checkout-summary-sidebar,
  body[id^="module-etstripegiftcards-"] .etgc-cart-final-summary-box {
    border-radius:18px!important;
    box-shadow:0 12px 32px rgba(47,42,36,.08)!important;
    border:1px solid rgba(22,133,31,.10)!important;
    overflow:hidden!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-dash-hero,
  body[id^="module-etstripegiftcards-"] .etgc-wallet-balance-card {
    background:linear-gradient(135deg,#12851f 0%,#0b6f18 100%)!important;
    color:#fff!important;
    padding:18px!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-dash-hero *,
  body[id^="module-etstripegiftcards-"] .etgc-wallet-balance-card * {
    color:#fff!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-account-menu,
  body[id^="module-etstripegiftcards-"] .etgc-dash-nav,
  body[id^="module-etstripegiftcards-"] .etgc-account-nav,
  body[id^="module-etstripegiftcards-"] .etgc-dashboard-menu {
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
    width:100%!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-account-menu a,
  body[id^="module-etstripegiftcards-"] .etgc-dash-nav a,
  body[id^="module-etstripegiftcards-"] .etgc-account-nav a,
  body[id^="module-etstripegiftcards-"] .etgc-dashboard-menu a,
  body[id^="module-etstripegiftcards-"] .etgc-account-menu button,
  body[id^="module-etstripegiftcards-"] .etgc-dash-nav button {
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    min-height:54px!important;
    width:100%!important;
    border-radius:16px!important;
    background:#fff!important;
    border:1px solid rgba(22,133,31,.12)!important;
    box-shadow:0 8px 22px rgba(47,42,36,.06)!important;
    padding:0 14px!important;
    color:#172333!important;
    font-weight:800!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-account-menu a.active,
  body[id^="module-etstripegiftcards-"] .etgc-dash-nav a.active,
  body[id^="module-etstripegiftcards-"] .etgc-account-nav a.active,
  body[id^="module-etstripegiftcards-"] .etgc-dashboard-menu a.active {
    background:#108a21!important;
    color:#fff!important;
    border-color:#108a21!important;
    box-shadow:0 12px 28px rgba(16,138,33,.22)!important;
  }

  body[id^="module-etstripegiftcards-"] .etgc-account-menu a.active *,
  body[id^="module-etstripegiftcards-"] .etgc-dash-nav a.active *,
  body[id^="module-etstripegiftcards-"] .etgc-account-nav a.active *,
  body[id^="module-etstripegiftcards-"] .etgc-dashboard-menu a.active * {
    color:#fff!important;
  }
}

/* Carrello mobile: niente colonne strette, riga prodotto a card verticale */
@media (max-width: 767px) {
  body#module-etstripegiftcards-giftcart .etgc-checkout-layout {
    display:flex!important;
    flex-direction:column!important;
    gap:16px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-sidebar {
    position:sticky!important;
    bottom:0!important;
    top:auto!important;
    z-index:80!important;
    order:99!important;
    width:calc(100% + 28px)!important;
    max-width:none!important;
    margin:18px -14px 0!important;
    border-radius:22px 22px 0 0!important;
    padding:16px!important;
    background:#fff!important;
    box-shadow:0 -14px 36px rgba(47,42,36,.16)!important;
    max-height:none!important;
    overflow:visible!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-head,
  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-products {
    display:none!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-lines > div {
    padding:6px 0!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-final strong,
  body#module-etstripegiftcards-giftcart #etgc-sidebar-final-total {
    font-size:24px!important;
    color:#108a21!important;
  }

  body#module-etstripegiftcards-giftcart #etgc-sidebar-primary-cta,
  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-cta {
    min-height:52px!important;
    border-radius:999px!important;
    background:#108a21!important;
    color:#fff!important;
    width:100%!important;
    margin-top:12px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-list,
  body#module-etstripegiftcards-giftcart .etgc-cart-final-group,
  body#module-etstripegiftcards-giftcart .etgc-cart-final-item {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-item {
    display:grid!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:14px!important;
    align-items:start!important;
    border-radius:20px!important;
    padding:14px!important;
    background:#fff!important;
    border:1px solid rgba(22,133,31,.12)!important;
    box-shadow:0 10px 28px rgba(47,42,36,.07)!important;
    overflow:hidden!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-type {
    grid-column:1!important;
    grid-row:1 / span 3!important;
    min-width:0!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-product {
    grid-column:2!important;
    min-width:0!important;
    width:100%!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-side {
    grid-column:1 / -1!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    width:100%!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-side-section {
    min-width:0!important;
    width:100%!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-side-section:last-child {
    grid-column:1 / -1!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-media,
  body#module-etstripegiftcards-giftcart .etgc-cart-final-media-in-type {
    width:82px!important;
    height:auto!important;
    margin:0 auto!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-image {
    width:82px!important;
    height:82px!important;
    object-fit:contain!important;
    border-radius:18px!important;
    background:#f6f3ec!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-details,
  body#module-etstripegiftcards-giftcart .etgc-cart-final-details h3,
  body#module-etstripegiftcards-giftcart .etgc-item-summary {
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    white-space:normal!important;
    font-size:18px!important;
    line-height:1.15!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-kicker {
    font-size:11px!important;
    letter-spacing:.08em!important;
    color:#6c6257!important;
    margin-bottom:8px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-delivery-switch,
  body#module-etstripegiftcards-giftcart .etgc-cart-final-format-actions {
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
    width:100%!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-delivery-btn {
    width:100%!important;
    min-height:38px!important;
    border-radius:999px!important;
    font-size:13px!important;
    font-weight:900!important;
    padding:0 12px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-main-cart-qty {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border:1px solid rgba(22,133,31,.16)!important;
    border-radius:999px!important;
    overflow:hidden!important;
    background:#fff!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-main-cart-qty-btn {
    width:38px!important;
    height:38px!important;
    border:0!important;
    background:#f1fbf2!important;
    color:#108a21!important;
    font-size:20px!important;
    font-weight:900!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-main-cart-qty-value {
    min-width:34px!important;
    text-align:center!important;
    font-weight:900!important;
    color:#172333!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-line-options {
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:100%!important;
    padding:14px!important;
    border-radius:18px!important;
    background:#f7fff8!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-line-gift-grid {
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-line-option-input,
  body#module-etstripegiftcards-giftcart select,
  body#module-etstripegiftcards-giftcart input,
  body#module-etstripegiftcards-giftcart textarea {
    max-width:100%!important;
    min-height:42px!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-floating-cart,
  body#module-etstripegiftcards-giftcart .etgc-global-cart-floating,
  body[id^="module-etstripegiftcards-"] .etgc-floating-cart,
  body[id^="module-etstripegiftcards-"] .etgc-global-cart-floating {
    right:10px!important;
    bottom:92px!important;
    transform:scale(.86)!important;
    transform-origin:right bottom!important;
  }
}

/* Tablet: layout a due colonne pulito, riepilogo sticky ma non invasivo */
@media (min-width:768px) and (max-width:1024px) {
  body#module-etstripegiftcards-giftcart .etgc-checkout-layout {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 300px!important;
    gap:18px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-checkout-summary-sidebar {
    width:300px!important;
    min-width:0!important;
    max-width:300px!important;
    position:sticky!important;
    top:14px!important;
    border-radius:22px!important;
    padding:18px!important;
  }

  body#module-etstripegiftcards-giftcart .etgc-cart-final-item {
    border-radius:20px!important;
    padding:16px!important;
  }
}
