/* =========================================================
   AGROMAQ - Catálogo
   Archivo: assets/css/catalogo.css
   Clases nuevas: agx-*
   Gama: gris oscuro, rojo y blanco
   ========================================================= */

/* =========================================================
   SECTION
   ========================================================= */

.agx-catalog {
    position: relative;
    overflow: hidden;
    padding: 104px 0 120px;
    color: var(--ag-dark-950, #111315);
    background:
        linear-gradient(135deg, #f7f7f5 0%, #ffffff 48%, #f1f1ef 100%);
}

.agx-catalog::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(17, 19, 21, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 19, 21, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
}

.agx-catalog::after {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    width: 250px;
    height: 4px;
    background: linear-gradient(90deg,
            var(--ag-red-700, #a90f16),
            var(--ag-red-400, #ff3138));
    box-shadow: 0 16px 34px rgba(227, 27, 35, 0.24);
}

.agx-catalog-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.agx-catalog-line {
    position: absolute;
    width: 440px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(227, 27, 35, 0.32),
            transparent);
    transform: rotate(-28deg);
}

.agx-catalog-line.line-a {
    top: 16%;
    left: -120px;
}

.agx-catalog-line.line-b {
    right: -140px;
    bottom: 18%;
}

.agx-catalog-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(227, 27, 35, 0.12), transparent 68%);
    filter: blur(12px);
    opacity: 0.75;
}

.agx-catalog-glow.glow-a {
    right: 4%;
    top: 10%;
}

/* =========================================================
   HEADER
   ========================================================= */

.agx-catalog-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.45fr);
    align-items: end;
    gap: 36px;
    margin-bottom: 34px;
}

.agx-catalog-kicker {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 10px 14px;
    color: var(--ag-dark-950, #111315);
    background: #ffffff;
    border: 1px solid rgba(17, 19, 21, 0.1);
    border-left: 4px solid var(--ag-red-500, #e31b23);
    border-radius: 7px;
    box-shadow: 0 12px 30px rgba(17, 19, 21, 0.07);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.agx-catalog-kicker i {
    color: var(--ag-red-500, #e31b23);
}

.agx-catalog-title {
    max-width: 820px;
    margin: 0;
    color: var(--ag-dark-950, #111315);
    font-size: clamp(38px, 4.4vw, 66px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.agx-catalog-title::after {
    content: "";
    display: block;
    width: 86px;
    height: 5px;
    margin-top: 22px;
    background: linear-gradient(90deg,
            var(--ag-red-700, #a90f16),
            var(--ag-red-400, #ff3138));
}

.agx-catalog-sub {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(17, 19, 21, 0.62);
    font-size: 16px;
    line-height: 1.72;
}

.agx-catalog-mode-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 13px;
    align-items: center;
    padding: 18px;
    color: var(--ag-white, #ffffff);
    background:
        linear-gradient(145deg, var(--ag-dark-950, #111315), var(--ag-dark-800, #282d32));
    border: 1px solid rgba(227, 27, 35, 0.42);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(17, 19, 21, 0.16);
}

.agx-catalog-mode-card>i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--ag-white, #ffffff);
    background: linear-gradient(135deg,
            var(--ag-red-700, #a90f16),
            var(--ag-red-500, #e31b23));
    border-radius: 9px;
    font-size: 20px;
}

.agx-catalog-mode-card strong {
    display: block;
    color: var(--ag-white, #ffffff);
    font-size: 14px;
    font-weight: 950;
}

.agx-catalog-mode-card span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 750;
}

/* =========================================================
   TOOLBAR
   ========================================================= */

.agx-catalog-toolbar {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 12px;
    margin-bottom: 30px;
}

.agx-catalog-search,
.agx-catalog-sort {
    min-height: 56px;
    display: grid;
    align-items: center;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(17, 19, 21, 0.12);
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(17, 19, 21, 0.07);
}

.agx-catalog-search {
    grid-template-columns: 52px 1fr;
}

.agx-catalog-sort {
    grid-template-columns: 48px 1fr;
}

.agx-catalog-search i,
.agx-catalog-sort i {
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--ag-red-500, #e31b23);
    border-right: 1px solid rgba(17, 19, 21, 0.08);
}

.agx-catalog-search input,
.agx-catalog-sort select {
    width: 100%;
    height: 100%;
    padding: 0 16px;
    color: var(--ag-dark-950, #111315);
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 14px;
    font-weight: 850;
}

.agx-catalog-search input::placeholder {
    color: rgba(17, 19, 21, 0.42);
}

.agx-catalog-sort select {
    appearance: none;
    cursor: pointer;
}

/* =========================================================
   GRID PRODUCTOS
   ========================================================= */

.agx-product-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.agx-product-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: 245px 1fr;
    min-height: 100%;
    color: var(--ag-dark-950, #111315);
    background: #ffffff;
    border: 1px solid rgba(17, 19, 21, 0.1);
    border-radius: 16px;
    box-shadow: 0 22px 50px rgba(17, 19, 21, 0.08);
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.agx-product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(227, 27, 35, 0.085), transparent 48%);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.agx-product-card::after {
    content: "";
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg,
            var(--ag-red-700, #a90f16),
            var(--ag-red-400, #ff3138));
    transform: scaleX(0.35);
    transform-origin: left;
    opacity: 0.55;
    transition:
        transform 0.28s ease,
        opacity 0.28s ease;
}

.agx-product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(227, 27, 35, 0.35);
    box-shadow: 0 30px 64px rgba(17, 19, 21, 0.13);
}

.agx-product-card:hover::before {
    opacity: 1;
}

.agx-product-card:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.agx-product-media {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(17, 19, 21, 0.06), rgba(227, 27, 35, 0.04));
    border-bottom: 1px solid rgba(17, 19, 21, 0.08);
}

.agx-product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 18px;
    display: block;
    transform: scale(1);
    transition:
        transform 0.45s ease,
        filter 0.45s ease;
}

.agx-product-card:hover .agx-product-media img {
    transform: scale(1.06);
    filter: contrast(1.04) saturate(1.04);
}

.agx-product-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(17, 19, 21, 0.28);
    background:
        linear-gradient(135deg, rgba(17, 19, 21, 0.045), rgba(227, 27, 35, 0.045));
}

.agx-product-placeholder i {
    font-size: 46px;
}

.agx-product-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    max-width: calc(100% - 28px);
    padding: 8px 10px;
    color: var(--ag-white, #ffffff);
    background:
        linear-gradient(135deg, var(--ag-dark-950, #111315), var(--ag-dark-800, #282d32));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agx-product-body {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 14px;
    padding: 22px;
}

.agx-product-title {
    margin: 0;
    color: var(--ag-dark-950, #111315);
    font-size: 19px;
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.025em;
}

.agx-product-desc {
    min-height: 46px;
    margin: 0;
    color: rgba(17, 19, 21, 0.62);
    font-size: 13.5px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agx-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agx-product-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    color: rgba(17, 19, 21, 0.72);
    background: rgba(17, 19, 21, 0.045);
    border: 1px solid rgba(17, 19, 21, 0.09);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 900;
}

.agx-product-tax {
    color: var(--ag-white, #ffffff);
    background: var(--ag-red-600, #c9161d);
    border-color: rgba(227, 27, 35, 0.3);
}

.agx-product-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 14px;
    padding-top: 10px;
    margin-top: auto;
    border-top: 1px solid rgba(17, 19, 21, 0.08);
}

.agx-price-label {
    display: block;
    margin-bottom: 5px;
    color: rgba(17, 19, 21, 0.54);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.agx-product-price {
    color: var(--ag-red-600, #c9161d);
    font-size: 28px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.045em;
}

.agx-product-add {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px !important;
    color: var(--ag-white, #ffffff) !important;
    background:
        linear-gradient(135deg, var(--ag-red-700, #a90f16), var(--ag-red-500, #e31b23)) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 30px rgba(227, 27, 35, 0.22);
}

.agx-product-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(227, 27, 35, 0.3);
}

/* =========================================================
   LOADING / EMPTY
   ========================================================= */

.agx-catalog-loading,
.agx-catalog-empty {
    grid-column: 1 / -1;
    min-height: 230px;
    display: grid;
    place-items: center;
    gap: 14px;
    text-align: center;
    color: rgba(17, 19, 21, 0.62);
    background: #ffffff;
    border: 1px dashed rgba(17, 19, 21, 0.16);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(17, 19, 21, 0.07);
}

.agx-catalog-loading strong,
.agx-catalog-empty strong {
    display: block;
    color: var(--ag-dark-950, #111315);
    font-size: 18px;
    font-weight: 950;
}

.agx-catalog-empty i {
    color: var(--ag-red-500, #e31b23);
    font-size: 38px;
}

.agx-spin {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(17, 19, 21, 0.1);
    border-top-color: var(--ag-red-500, #e31b23);
    border-radius: 50%;
    animation: agxSpin 0.8s linear infinite;
}

@keyframes agxSpin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   PAGINACIÓN
   ========================================================= */

.agx-pagination {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
}

.agx-pagination button,
.agx-pagination .page-info {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: var(--ag-dark-950, #111315);
    background: #ffffff;
    border: 1px solid rgba(17, 19, 21, 0.12);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 950;
    box-shadow: 0 12px 26px rgba(17, 19, 21, 0.06);
}

.agx-pagination button {
    cursor: pointer;
    transition:
        transform 0.22s ease,
        background 0.22s ease,
        color 0.22s ease,
        border-color 0.22s ease;
}

.agx-pagination button:hover:not(:disabled),
.agx-pagination button.active {
    color: var(--ag-white, #ffffff);
    background:
        linear-gradient(135deg, var(--ag-red-700, #a90f16), var(--ag-red-500, #e31b23));
    border-color: rgba(227, 27, 35, 0.5);
    transform: translateY(-2px);
}

.agx-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
    .agx-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .agx-catalog {
        padding: 84px 0 94px;
    }

    .agx-catalog-head {
        grid-template-columns: 1fr;
    }

    .agx-catalog-mode-card {
        max-width: 520px;
    }

    .agx-catalog-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .agx-catalog {
        padding: 72px 0 84px;
    }

    .agx-catalog-title {
        font-size: clamp(34px, 10vw, 48px);
    }

    .agx-product-grid {
        grid-template-columns: 1fr;
    }

    .agx-product-card {
        grid-template-rows: 220px 1fr;
    }

    .agx-product-footer {
        grid-template-columns: 1fr;
    }

    .agx-product-add {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {

    .agx-product-card,
    .agx-product-card::before,
    .agx-product-card::after,
    .agx-product-media img,
    .agx-product-add,
    .agx-pagination button,
    .agx-spin {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   GALERÍA DINÁMICA DE PRODUCTOS
========================================================= */
.agx-product-media.is-clickable {
  cursor: zoom-in;
}

.agx-product-media.is-clickable::before {
  content: "Ver imágenes";
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  padding: 6px 10px;
  color: #fff;
  background: rgba(17, 19, 21, .86);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .22s ease, transform .22s ease;
}

.agx-product-media.is-clickable:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.agx-product-image-dots {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 5;
  display: inline-flex;
  gap: 6px;
}

.agx-product-image-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.agx-product-image-dots span.active {
  width: 18px;
  background: #e31b23;
}

body.agx-gallery-open {
  overflow: hidden;
}

.agx-product-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  padding: 20px;
}

.agx-product-gallery-modal.open {
  display: grid;
  place-items: center;
}

.agx-product-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 21, .72);
  backdrop-filter: blur(8px);
}

.agx-product-gallery-box {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(227, 27, 35, .28);
  border-radius: 20px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .36);
}

.agx-product-gallery-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(17, 19, 21, .86);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  cursor: pointer;
}

.agx-product-gallery-media {
  position: relative;
  min-height: 480px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f7f7f5, #fff1f1);
}

.agx-product-gallery-media img {
  width: 100%;
  height: 100%;
  max-height: 680px;
  object-fit: contain;
  padding: 24px;
}

.agx-product-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 19, 21, .82);
  cursor: pointer;
  transform: translateY(-50%);
}

.agx-product-gallery-nav.prev { left: 16px; }
.agx-product-gallery-nav.next { right: 16px; }

.agx-product-gallery-info {
  padding: 30px;
  display: grid;
  align-content: center;
  gap: 16px;
}

.agx-product-gallery-brand {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: #1d2228;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.agx-product-gallery-info h3 {
  margin: 0;
  color: #111315;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.agx-product-gallery-info p {
  margin: 0;
  color: rgba(17, 19, 21, .62);
  line-height: 1.55;
  font-weight: 650;
}

.agx-product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agx-product-gallery-thumbs button {
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f5f5f5;
  cursor: pointer;
}

.agx-product-gallery-thumbs button.active {
  border-color: #e31b23;
}

.agx-product-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agx-product-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 19, 21, .1);
}

.agx-product-gallery-footer strong {
  color: #c9161d;
  font-size: 30px;
  font-weight: 950;
}

@media (max-width: 840px) {
  .agx-product-gallery-box {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .agx-product-gallery-media {
    min-height: 320px;
  }

  .agx-product-gallery-info {
    padding: 22px;
  }
}


/* =========================================================
   GALERÍA PRODUCTO - MODAL CORPORATIVO AGROMAQ
========================================================= */

.agx-product-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  padding: 22px;
}

.agx-product-gallery-modal.open {
  display: grid;
  place-items: center;
}

.agx-product-gallery-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 14%, rgba(227, 27, 35, .22), transparent 34%),
    rgba(17, 19, 21, .78);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.agx-product-gallery-box {
  position: relative;
  z-index: 2;
  width: min(1180px, 100%);
  max-height: min(820px, calc(100dvh - 34px));
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .7fr);
  overflow: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, #fbfbf8 58%, #f1f1ef 100%);
  border: 1px solid rgba(227, 27, 35, .32);
  border-radius: 20px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .44);
}

.agx-product-gallery-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(17, 19, 21, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 21, .026) 1px, transparent 1px);
  background-size: 38px 38px;
  pointer-events: none;
}

.agx-product-gallery-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(17, 19, 21, .88);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24);
}

.agx-product-gallery-close:hover {
  background: #e31b23;
}

.agx-product-gallery-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 560px;
  background:
    linear-gradient(145deg, #111315, #282d32),
    radial-gradient(circle at 20% 0%, rgba(227, 27, 35, .24), transparent 38%);
}

.agx-product-gallery-stage-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  color: #ffffff;
  border-bottom: 3px solid #e31b23;
}

.agx-product-gallery-stage-head span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agx-product-gallery-stage-head i {
  color: #ff3138;
}

.agx-product-gallery-stage-head strong {
  min-width: 54px;
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 950;
}

.agx-product-gallery-media {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(227, 27, 35, .13), transparent 46%),
    linear-gradient(135deg, #f7f7f5, #fff1f1);
}

.agx-product-gallery-media img {
  width: 100%;
  height: 100%;
  max-height: 700px;
  object-fit: contain;
  padding: 28px;
}

.agx-product-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(17, 19, 21, .86);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  transform: translateY(-50%);
}

.agx-product-gallery-nav:hover {
  background: #e31b23;
}

.agx-product-gallery-nav.prev {
  left: 18px;
}

.agx-product-gallery-nav.next {
  right: 18px;
}

.agx-product-gallery-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #ffffff;
}

.agx-product-gallery-head {
  padding: 30px 30px 26px;
  color: #ffffff;
  background:
    linear-gradient(145deg, #111315, #282d32),
    radial-gradient(circle at 18% 0%, rgba(227, 27, 35, .24), transparent 38%);
  border-bottom: 3px solid #e31b23;
}

.agx-product-gallery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #ff3138;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agx-product-gallery-head h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 3vw, 42px);
  line-height: .98;
  font-weight: 950;
  letter-spacing: -.055em;
}

.agx-product-gallery-head p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, .68);
  line-height: 1.48;
  font-size: 13.5px;
  font-weight: 700;
}

.agx-product-gallery-body {
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 28px 30px;
}

.agx-product-gallery-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agx-product-gallery-brand,
.agx-product-gallery-tax {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.agx-product-gallery-brand {
  background: #1d2228;
}

.agx-product-gallery-tax {
  background: linear-gradient(135deg, #a90f16, #e31b23);
}

.agx-product-gallery-label {
  display: block;
  margin-bottom: 9px;
  color: rgba(17, 19, 21, .55);
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.agx-product-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.agx-product-gallery-thumbs button {
  width: 62px;
  height: 62px;
  padding: 0;
  overflow: hidden;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 12px;
}

.agx-product-gallery-thumbs button.active {
  border-color: #e31b23;
  box-shadow: 0 0 0 3px rgba(227, 27, 35, .12);
}

.agx-product-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agx-product-gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 19, 21, .1);
}

.agx-product-gallery-footer strong {
  display: block;
  color: #c9161d;
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.045em;
}

#productGalleryAddBtn {
  min-height: 48px;
  border-radius: 999px !important;
  padding-inline: 22px !important;
  box-shadow: 0 18px 36px rgba(227, 27, 35, .24);
}

@media (max-width: 900px) {
  .agx-product-gallery-box {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .agx-product-gallery-stage {
    min-height: 380px;
  }

  .agx-product-gallery-media {
    min-height: 320px;
  }

  .agx-product-gallery-panel {
    display: block;
  }

  .agx-product-gallery-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #productGalleryAddBtn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .agx-product-gallery-modal {
    padding: 12px;
  }

  .agx-product-gallery-stage-head,
  .agx-product-gallery-head,
  .agx-product-gallery-body {
    padding-inline: 18px;
  }

  .agx-product-gallery-media img {
    padding: 16px;
  }
}