/**
 * Mobile catalogue product list — flat full-width rows, image left / details right.
 * Border-radius removed on card shell only; pills and buttons keep theme rounding.
 */
@media only screen and (max-width: 991px) {
  /* ── Product listing: hide sidebar facets, brand filters, grid/list tabs ── */
  body.ocmono-products-listing .ocmono-page-content .product__sidebar,
  body.ocmono-products-listing .ocmono-page-content .sidebar__category,
  body.ocmono-products-listing .ocmono-page-content .facets-widget,
  body.ocmono-products-listing .ocmono-page-content .facets-widget-checkbox,
  body.ocmono-products-listing .ocmono-page-content .block-facets,
  body.ocmono-products-listing .ocmono-page-content .block-facet--checkbox,
  body.ocmono-products-listing .ocmono-page-content .product__list-grid-tabs,
  body.ocmono-products-listing .ocmono-page-content .shop-search,
  body.ocmono-products-listing .ocmono-page-content .product__price-ranger,
  body.ocmono-products-listing .ocmono-page-content aside[role="complementary"] {
    display: none !important;
  }

  body.ocmono-products-listing .ocmono-page-content .view-all-products > .row > [class*="col-lg-3"],
  body.ocmono-products-listing .ocmono-page-content .view-all-products .product__sidebar {
    display: none !important;
  }

  body.ocmono-products-listing .ocmono-page-content .view-all-products > .row > [class*="col-lg-9"],
  body.ocmono-products-listing .ocmono-page-content .view-all-products > .row > [class*="col-lg-"]:last-child:not([class*="col-lg-3"]) {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  body.ocmono-products-listing .ocmono-page-content > .container {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.ocmono-products-listing .ocmono-page-content > .container > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }

  .ocmono-page-content > .container:has(.ocmono-products-view--list),
  .ocmono-page-content > .container:has(.ocmono-product-card) {
    padding-top: 0 !important;
    padding-bottom: 16px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ocmono-page-content .row:has(.ocmono-products-view--list) > [class*="col-"],
  .ocmono-page-content .row:has(.ocmono-product-card) > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }

  .ocmono-products-view--list .views-view-grid.row,
  .view-content:has(.ocmono-product-card) .views-view-grid.row {
    display: flex !important;
    flex-direction: column !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.ocmono-products-listing .views-view-grid.row > [class*="col-"],
  body.ocmono-products-listing .views-view-grid .views-col,
  .ocmono-products-view--list .views-view-grid.row > [class*="col-"],
  .view-content:has(.ocmono-product-card) .views-view-grid.row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ocmono-products-view--list,
  .ocmono-products-view--list .views-element-container,
  .ocmono-products-view--list .view-content,
  .ocmono-products-view--list .views-row,
  .ocmono-products-view--list .row,
  .ocmono-products-view--list .row > [class*="col-"],
  .ocmono-products-view--list .views-view-grid,
  .ocmono-products-view--list .views-col,
  .view-content:has(.ocmono-product-card),
  .views-row:has(.ocmono-product-card),
  .views-view-grid:has(.ocmono-product-card),
  .views-col:has(.ocmono-product-card) {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .ocmono-products-view--list .views-row,
  .ocmono-products-view--list .view-content,
  .view-content:has(.ocmono-product-card) {
    display: flex;
    flex-direction: column;
  }

  /* ── Card shell: square corners, bottom divider only ── */
  .ocmono-product-card {
    width: 100%;
    margin: 0;
  }

  .ocmono-product-card__shell,
  .ocmono-product-card .product__all-single {
    margin-bottom: 0 !important;
    background: #fff;
    text-align: left;
    box-shadow: none !important;
  }

  .ocmono-product-card__shell,
  .ocmono-product-card .product__all-single,
  .ocmono-product-card .product__all-single-inner,
  .ocmono-product-card__inner {
    border-radius: 0 !important;
  }

  .ocmono-product-card .product__all-single-inner,
  .ocmono-product-card__inner {
    display: grid !important;
    grid-template-columns: 80px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 0;
    align-items: start;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0 !important;
    border-bottom: 1px solid var(--ogenix-bdr-color) !important;
    overflow: hidden;
  }

  .ocmono-product-card__media,
  .ocmono-product-card .product__all-img {
    grid-column: 1;
    grid-row: 1;
  }

  .ocmono-product-card__body,
  .ocmono-product-card .product__all-content {
    grid-column: 2;
    grid-row: 1;
  }

  .ocmono-product-card .product__all-single-inner {
    padding-bottom: 10px !important;
  }

  /* Hide duplicate qty/actions only when buy-row wrapper is present */
  .ocmono-product-card .commerce-order-item-add-to-cart-form:has(.ocmono-product-card__buy-row) > .field--name-quantity,
  .ocmono-product-card .commerce-order-item-add-to-cart-form:has(.ocmono-product-card__buy-row) > .form-actions,
  .ocmono-product-card .commerce-order-item-add-to-cart-form:has(.ocmono-product-card__buy-row) > .form-wrapper.form-actions {
    display: none !important;
  }

  .ocmono-product-card .field--name-purchased-entity > legend,
  .ocmono-product-card .attribute-widgets > legend,
  .ocmono-product-card .field--name-purchased-entity .fieldset-legend {
    display: none !important;
  }

  /* ── Thumbnail (left column) ── */
  .ocmono-product-card__media,
  .ocmono-product-card .product__all-img {
    position: relative;
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    min-width: 80px;
    background: #f5f5f5;
    overflow: hidden;
    line-height: 0;
  }

  .ocmono-product-card__media-link {
    position: absolute;
    inset: 0;
    z-index: 2;
  }

  .ocmono-product-card__media .field,
  .ocmono-product-card__media .field__item {
    margin: 0 !important;
    padding: 0 !important;
    width: 80px;
    height: 80px;
  }

  .ocmono-product-card__media img,
  .ocmono-product-card .product__all-img img {
    display: block;
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: contain;
    mix-blend-mode: normal;
    transform: none !important;
  }

  .ocmono-product-card__shell:hover .product__all-img:before {
    display: none !important;
  }

  .ocmono-product-card__shell:hover .product__all-img img {
    transform: none !important;
  }

  /* ── Details (right column) ── */
  .ocmono-product-card__body,
  .ocmono-product-card .product__all-content {
    flex: 1 1 0;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .ocmono-product-card__title,
  .ocmono-product-card .product__all-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-align: left;
  }

  .ocmono-product-card__title a,
  .ocmono-product-card .product__all-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--ogenix-base);
  }

  .ocmono-product-card__price,
  .ocmono-product-card .product__all-price {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ogenix-black);
    text-align: left;
  }

  .ocmono-product-card__price .field,
  .ocmono-product-card__price .field__item {
    margin: 0 !important;
    padding: 0 !important;
  }

  .ocmono-product-card__form,
  .ocmono-product-card .product__all-commerce-form {
    margin: 2px 0 0 !important;
    padding: 0 !important;
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .ocmono-product-card .product__all-btn-box {
    display: none !important;
  }

  .ocmono-product-card .products__all-icon-boxes {
    display: none !important;
  }

  /* Hide stray duplicate fields if they leak into the form */
  .ocmono-product-card__form .field--name-field-display-image,
  .ocmono-product-card__form .field--name-field-product-images,
  .ocmono-product-card__form .field--commerce-product-variation--field-product-images {
    display: none !important;
  }

  /* ── Form ── */
  .ocmono-product-card fieldset {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    min-width: 0;
  }

  .ocmono-product-card legend,
  .ocmono-product-card .field__label {
    display: none !important;
  }

  .ocmono-product-card .field,
  .ocmono-product-card .form-item,
  .ocmono-product-card .form-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }

  .ocmono-product-card .form-check {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    float: none !important;
  }

  .ocmono-product-card .commerce-order-item-add-to-cart-form,
  .ocmono-product-card__form form,
  .ocmono-product-card__form form > .form-wrapper,
  .ocmono-product-card .commerce-order-item-add-to-cart-form > .form-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: stretch !important;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ocmono-product-card .field--name-purchased-entity,
  .ocmono-product-card .attribute-widgets {
    width: 100%;
    min-width: 0;
    margin: 0 !important;
  }

  /* Qty + Add to cart — inline inside the details column */
  .ocmono-product-card .ocmono-product-card__buy-row,
  .ocmono-product-card .form-wrapper.ocmono-product-card__buy-row {
    display: flex !important;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 4px;
    padding: 0;
    box-sizing: border-box;
  }

  .ocmono-product-card .form-radios,
  .ocmono-product-card .js-form-type-radios,
  .ocmono-product-card .js-form-item-purchased-entity-0,
  .ocmono-product-card .attribute-widgets .fieldset-wrapper {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  .ocmono-product-card .field--name-purchased-entity .form-check,
  .ocmono-product-card .field--name-purchased-entity .js-form-type-radio {
    display: inline-flex !important;
    float: none !important;
    margin: 0 !important;
  }

  .ocmono-product-card .field--name-purchased-entity input[type="radio"],
  .ocmono-product-card .field--name-purchased-entity .form-check-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .ocmono-product-card .field--name-purchased-entity label,
  .ocmono-product-card .field--name-purchased-entity .form-check-label {
    display: inline-block;
    margin: 0 !important;
    padding: 4px 9px;
    border: 1px solid var(--ogenix-bdr-color);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ogenix-gray);
    background: #fff;
    cursor: pointer;
    float: none !important;
  }

  .ocmono-product-card .field--name-purchased-entity input[type="radio"]:checked + label,
  .ocmono-product-card .field--name-purchased-entity .form-check-input:checked + label {
    border-color: var(--ogenix-base);
    background: #eee8f3;
    color: var(--ogenix-base);
  }

  .ocmono-product-card .field--name-quantity,
  .ocmono-product-card .ocmono-product-card__buy-row .field--name-quantity {
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;
    width: auto !important;
    max-width: none;
    margin: 0 !important;
  }

  .ocmono-product-card .field--name-quantity .form-item {
    width: auto !important;
  }

  .ocmono-product-card .form-actions,
  .ocmono-product-card .ocmono-product-card__buy-row .form-actions {
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
  }

  .ocmono-product-card__form form .ajax-progress,
  .ocmono-product-card__form form .ajax-progress-throbber {
    margin: 0 !important;
  }

  .ocmono-product-card .form-type-number {
    position: static !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .ocmono-product-card .form-type-number label {
    display: none !important;
  }

  /* Light gray +/- stepper */
  .ocmono-product-card .ocmono-qty-stepper {
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
    height: 36px;
    border: 1px solid var(--ogenix-bdr-color);
    border-radius: 0;
    overflow: hidden;
    background: #fff;
  }

  .ocmono-product-card .ocmono-qty-stepper__btn {
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #f0f0f0;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    float: none !important;
    position: static !important;
  }

  .ocmono-product-card .ocmono-qty-stepper__btn:hover {
    background: #e6e6e6;
    color: var(--ogenix-black);
  }

  .ocmono-product-card .ocmono-qty-stepper__btn i {
    pointer-events: none;
  }

  .ocmono-product-card .ocmono-qty-stepper__btn:focus-visible {
    outline: 2px solid var(--ogenix-base);
    outline-offset: -2px;
  }

  .ocmono-product-card .ocmono-qty-stepper__input,
  .ocmono-product-card .ocmono-qty-stepper input[type="number"] {
    width: 36px;
    min-width: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    border-radius: 0;
    background: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: var(--ogenix-black);
    float: none !important;
    position: static !important;
    -moz-appearance: textfield;
    appearance: textfield;
  }

  .ocmono-product-card .ocmono-qty-stepper__input::-webkit-outer-spin-button,
  .ocmono-product-card .ocmono-qty-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* Legacy theme +/- buttons if present */
  .ocmono-product-card .form-type-number > .sub,
  .ocmono-product-card .form-type-number > button:not(.ocmono-qty-stepper__btn) {
    display: none !important;
  }

  /* Fallback before stepper JS — no full-width native spinbox */
  .ocmono-product-card .field--name-quantity input[type="number"]:not(.ocmono-qty-stepper__input) {
    width: 48px !important;
    min-width: 48px;
    max-width: 48px;
    height: 36px;
    margin: 0 !important;
    padding: 0;
    text-align: center;
    border: 1px solid #dcdcdc;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    float: none !important;
    -moz-appearance: textfield;
    appearance: textfield;
  }

  .ocmono-product-card .field--name-quantity input[type="number"]:not(.ocmono-qty-stepper__input)::-webkit-outer-spin-button,
  .ocmono-product-card .field--name-quantity input[type="number"]:not(.ocmono-qty-stepper__input)::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

  /* If buy-row wrapper missing, keep qty + button on one line */
  .ocmono-product-card .commerce-order-item-add-to-cart-form:not(:has(.ocmono-product-card__buy-row)) {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px !important;
    align-items: center !important;
  }

  .ocmono-product-card .commerce-order-item-add-to-cart-form:not(:has(.ocmono-product-card__buy-row)) .field--name-purchased-entity,
  .ocmono-product-card .commerce-order-item-add-to-cart-form:not(:has(.ocmono-product-card__buy-row)) .attribute-widgets {
    grid-column: 1 / -1;
  }

  .ocmono-product-card .commerce-order-item-add-to-cart-form:not(:has(.ocmono-product-card__buy-row)) .field--name-quantity {
    grid-column: 1;
  }

  .ocmono-product-card .commerce-order-item-add-to-cart-form:not(:has(.ocmono-product-card__buy-row)) .form-actions {
    grid-column: 2;
  }

  .ocmono-product-card .button--add-to-cart,
  .ocmono-product-card input[type="submit"].button--add-to-cart,
  .ocmono-product-card button[type="submit"].button--add-to-cart,
  .ocmono-product-card .ocmono-product-card__buy-row .thm-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    flex: 0 0 auto;
    min-height: 36px;
    height: 36px;
    margin: 0 !important;
    padding: 0 14px !important;
    border: none;
    border-radius: 5px !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    float: none !important;
    box-sizing: border-box;
    vertical-align: middle;
  }

  .ocmono-product-card .button--add-to-cart.ocmono-add-to-cart--success,
  .ocmono-product-card input[type="submit"].ocmono-add-to-cart--success {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 10px !important;
    font-size: 10px;
  }
}
