/* Shared small-screen corrections for the complete storefront. */
@media (max-width: 900px) {
  .ogosta-page .search-form input,
  .ogosta-page input.form-control,
  .ogosta-page select.form-control,
  .ogosta-page textarea.form-control,
  .ogosta-page input[type="submit"],
  .ogosta-page .input-group-sm > .form-control,
  .ogosta-page .oc-select-field select,
  .ogosta-page #ogosta-onepage .form-control {
    font-size: 16px;
  }

  /* Let each row stretch naturally; the price and action stay at its foot. */
  .ogosta-page .oc-product-copy h2,
  .ogosta-page.common-home .oc-product-copy h2 {
    display: block;
    height: auto;
    min-height: 2.4em;
    -webkit-line-clamp: unset;
    overflow: visible;
    overflow-wrap: anywhere;
  }
  .ogosta-page .oc-product-description,
  .ogosta-page.common-home .oc-product-description {
    display: block;
    height: auto;
    min-height: 3.4em;
    -webkit-line-clamp: unset;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.65;
  }
  .ogosta-page .oc-product-kind {
    height: auto;
    min-height: 1.5em;
    white-space: normal;
  }
  .ogosta-page .oc-product-copy h2 a { overflow-wrap: anywhere; }
  .ogosta-page .oc-breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }

  .ogosta-page .ogosta-product-gallery .thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px;
    overflow: visible;
  }
  .ogosta-page .ogosta-product-gallery .thumbnails > li { margin: 0; min-width: 0; }
  .ogosta-page .ogosta-product-gallery .thumbnails > li:first-child { flex: 0 0 100%; }
  .ogosta-page .ogosta-product-gallery .thumbnails .thumbnail { margin-bottom: 0; }
  .ogosta-page .ogosta-product-gallery .thumbnails .image-additional { float: none; width: 78px; }

  .ogosta-page .opc-agree { font-size: 14px; }
  .ogosta-page .agree { display: inline-block; padding-block: 4px; }
  .ogosta-page .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-right: 60px;
    background: var(--paper);
  }
  .ogosta-page .modal-header .close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    margin: 0;
    font-size: 28px;
    color: var(--brown);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .ogosta-page #cart .dropdown-menu {
    min-width: 0;
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .ogosta-page #cart .dropdown-menu .table td { overflow-wrap: anywhere; }
  .ogosta-page #cart .dropdown-menu .btn-danger { min-width: 44px; min-height: 44px; }
  .ogosta-page .oc-catalog-pagination .pagination > li > :is(a, span) { min-width: 44px; height: 44px; }
  .ogosta-page .footer-column > a { padding-block: 5px; }
  .ogosta-page .measurement-preferences { min-height: 44px; }
  .ogosta-page .footer-bottom { flex-wrap: wrap; }
  .ogosta-page .oc-catalog-body.oc-sidebar-right,
  .ogosta-page .oc-catalog-body.oc-sidebar-both { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 359px) {
  .ogosta-page .brand { gap: 6px; }
  .ogosta-page .brand-emblem { width: 39px; height: 39px; }
  .ogosta-page .brand-name { font-size: 18px; }
  .ogosta-page .brand-tagline { font-size: 10px; }
  .ogosta-page .oc-catalog-grid,
  .ogosta-page.common-home .oc-catalog-grid { grid-template-columns: minmax(0, 1fr); }
  .ogosta-page .oc-product-copy { padding: 16px; }
  .ogosta-page .oc-product-copy h2 { font-size: 25px; }
  .ogosta-page .oc-product-price,
  .ogosta-page .oc-product-price strong { font-size: 19px; }
  .ogosta-page .oc-add-to-cart > span { display: inline; }
  .ogosta-page .oc-add-to-cart { width: auto; }
}

/* Keep the shopping journey readable and give names room beside whole photos. */
@media (max-width: 900px) {
  .ogosta-page .ogosta-product-title { font-size: clamp(34px, 10vw, 40px); }
  .ogosta-page .ogosta-product-summary #button-cart,
  .ogosta-page .ogosta-product-enquiry .btn,
  .ogosta-page .ogosta-cart-summary .btn,
  .ogosta-page #opc-place-order { min-height: 50px; font-size: 16px; }
  .ogosta-page .ogosta-cart-copy p,
  .ogosta-page .ogosta-cart-copy small { font-size: 13px; line-height: 1.65; }
  .ogosta-page .ogosta-cart-note,
  .ogosta-page .ogosta-cart-extras summary,
  .ogosta-page .ogosta-cart-summary dl > div { font-size: 14px; }
  .ogosta-page #ogosta-onepage label.control-label,
  .ogosta-page #opc-login-form label,
  .ogosta-page .opc-note > label,
  .ogosta-page .opc-method-option,
  .ogosta-page .opc-login summary,
  .ogosta-page .opc-login-actions,
  .ogosta-page .opc-totals > div { font-size: 14px; line-height: 1.65; }
  .ogosta-page #ogosta-onepage .form-control::placeholder { font-size: 14px; }
  .ogosta-page .opc-section-title p { font-size: 13px; }
  .ogosta-page .opc-item small { font-size: 13px; }
  .ogosta-page .opc-summary-heading { flex-wrap: wrap; align-items: center; }
  .ogosta-page .opc-summary-heading > a { font-size: 13px; padding-block: 5px; }
  .ogosta-page #opc-status,
  .ogosta-page .opc-reassurance { font-size: 12px; }
  .ogosta-page #ogosta-onepage .text-danger { font-size: 14px; }
  .ogosta-page .opc-section-title > div,
  .ogosta-page .opc-totals dt,
  .ogosta-page .opc-method-option > span { min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 640px) {
  .ogosta-page #cart .ogosta-mini-items,
  .ogosta-page #cart .ogosta-mini-items tbody { display: block; width: 100%; }
  .ogosta-page #cart .ogosta-mini-items tr {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 72px;
    grid-template-areas: 'photo name remove' 'photo quantity total';
    gap: 8px 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .ogosta-page #cart .ogosta-mini-items td { display: block; padding: 0; border: 0; background: transparent; }
  .ogosta-page #cart .ogosta-mini-items td:nth-child(1) { grid-area: photo; }
  .ogosta-page #cart .ogosta-mini-items td:nth-child(2) { grid-area: name; font: 600 20px/1.2 var(--serif); }
  .ogosta-page #cart .ogosta-mini-items td:nth-child(3) { grid-area: quantity; text-align: left; font-size: 13px; }
  .ogosta-page #cart .ogosta-mini-items td:nth-child(4) { grid-area: total; white-space: nowrap; font: 500 14px/1.5 var(--reading); }
  .ogosta-page #cart .ogosta-mini-items td:nth-child(5) { grid-area: remove; justify-self: end; }
  .ogosta-page #cart .ogosta-mini-items .img-thumbnail { width: 48px; height: 64px; object-fit: contain; }
  .ogosta-page #cart .dropdown-menu .table-bordered { font-size: 13px; }
  .ogosta-page #cart .dropdown-menu .table-bordered td:last-child { white-space: nowrap; }
  .ogosta-page #cart .dropdown-menu p > a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 540px) {
  .ogosta-page .opc-item {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: 'photo copy' 'photo total';
    row-gap: 8px;
  }
  .ogosta-page .opc-item > a { grid-area: photo; }
  .ogosta-page .opc-item > div { grid-area: copy; min-width: 0; }
  .ogosta-page .opc-item > strong { grid-area: total; justify-self: start; padding: 0; font-size: 16px; }
  .ogosta-page .opc-voucher { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'copy total'; }
  .ogosta-page .opc-method-option { flex-wrap: wrap; }
  .ogosta-page .opc-method-option > strong { margin-left: 26px; }
  .ogosta-page .opc-method-option input { margin-top: 4px; }
}
