:root {
    --bg: #fdfbf7;
    --bg2: #ffffff;

    --color-text: #2f2f2f;
    --muted: #6b6b6b;

    --color-accent: #7bb661;

    /* Pasteles principales */
    --beige: #fff4e8;

    --green: #dff8c8;
    --green-hover: #d2f2b4;
    --text-green: #3e7226;

    --red: #ffd6d6;
    --red-hover: #ffc2c2;
    --text-red: #be4d4d;

    --blue: #d9f4ff;
    --blue-hover: #b4e4fc;
    --text-blue: #3680ac;

    --violet: #ece9ff;
    --violet-hover: #dfdbff;
    --text-violet: #6b63d9;

    --yellow: #fff6bf;
    --yellow-hover: #fff1a3;
    --text-yellow: #a78e21;

    /* Extras útiles */
    --border: #ece7df;
    --shadow: rgba(0, 0, 0, 0.06);
}

* {
    padding: 0;
    margin: 0;
    font-family: "Balsamiq Sans", sans-serif;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--color-text);
    background-image: url("images/pattern.png");
    background-repeat: repeat;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

form button[type="submit"]:hover {
    background: var(--green-hover);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-flex {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-grid input[type="text"],
.dynamic-list input[type="text"] {
    width: 100%;
}

.tag-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: center;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--blue);
    color: var(--text-blue);
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
}

.tag-item button {
    border: none;
    background: transparent;
    color: var(--text-blue);
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

a {
    text-decoration: none;
    color: var(--color-text);
}


.price-input-wrapper {
    gap: 0;
    display: flex;
    flex-direction: row;
}

.price-icon {
    background-color: #eee;
    padding: 12px 14px;
    border-radius: 14px 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #000;
    border-right: none;
    transition: .2s;
}

.price-input {
    width: 100%;
    border-radius: 0 14px 14px 0 !important;
    border-left: none !important;
    border: 2px solid #000;
    display: flex;
}

.price-input-wrapper:focus-within .price-icon {
    border-color: #b8b5ff;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="email"],
textarea,
select {
    border: 2px solid var(--color-text);
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    transition: .2s;
    font-size: 1rem;
}

textarea {
    transition: 0s;
}

input[type="text"]:active,
input[type="password"]:active,
input[type="search"]:active,
input[type="number"]:active,
input[type="email"]:active,
textarea:active,
select:active,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    font-size: 1rem;
    border-color: #b8b5ff;
    background: #fff;
    outline: none;
}

input[type="checkbox" i] {
    scale: 1.5;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #ecebff;
    color: #5c57d8;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    flex-direction: row;
    justify-content: center;
}

.file-upload:hover {
    background: #dcd8ff;
    transform: translateY(-2px);
}

.checkbox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.filters {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

.panel {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.admin-flex,
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-products-layout,
.admin-hero-layout,
.admin-orders-layout {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.admin-order-filters {
    width: 100%;
    margin-top: 1rem;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
}

.admin-order-filters label {
    min-width: 180px;
}

.dynamic-list {
    gap: 0.5rem;
}

.panel-column {
    flex-direction: column;
    align-items: stretch;
    justify-content: normal;
}

.panel-column h2 {
    width: 100%;
    text-align: center;
}

.edit-product-panel {
    background: var(--bg2);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: grid;
    grid-template-columns: repeat(auto-fill, 150px);
    grid-auto-rows: 150px;

    justify-content: center;
    align-content: center;

    opacity: 0.08;
    pointer-events: none;
}

.animal {
    position: relative;
    transform: scale(0.7);
    margin: auto;
}

header {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: var(--beige);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 6rem;
    width: 100%;
    z-index: 999;
}

label {
    font-weight: bold;
}

section {
    min-height: 100vh;
    padding: 40px;
}

section:first-of-type {
    padding-top: calc(6rem + 40px);
    min-height: 100vh;
}

section:nth-of-type(odd) {
    background: rgba(245, 245, 245, .8);
}

section:nth-of-type(even) {
    background: rgba(224, 224, 224, 1);
}


.section-heading {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--text-green);
    font-weight: 700;
}

.section-heading h2 {
    margin: 0 0 10px;
    font-size: 2.1rem;
}

.section-heading p {
    margin: 0;
    color: var(--color-muted);
}

.how-to-buy {
    min-height: auto;
    padding: 64px 40px;
}

.how-to-buy-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto;
}

.how-to-buy-step {
    background: #fff;
    border: 1px solid rgba(47, 42, 38, .12);
    border-radius: 8px;
    padding: 22px;
    min-height: 190px;
}

.how-to-buy-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--green);
    color: var(--text-green);
}

.how-to-buy-step h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.how-to-buy-step p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.45;
}

.how-to-buy-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

footer>div {
    display: flex;
    justify-content: space-evenly;
}

.logo-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Luckiest Guy', cursive;
}

.logo {
    width: 4rem;
    height: 4rem;
    border-radius: 10px;
}


.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--green);
    color: var(--text-green);
    cursor: pointer;
    font-size: 1.15rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.site-nav a i {
    display: none;
}

@media (max-width: 775px) {
    header {
        padding: 12px 16px;
        gap: 0.75rem;
    }

    .logo-container h1 {
        font-size: clamp(1.4rem, 7vw, 2rem);
    }

    .mobile-menu-toggle {
        display: inline-flex;
        order: 2;
    }

    .cart-icon {
        order: 3;
        padding: 12px;
    }

    .site-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        z-index: 1000;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border: 1px solid rgba(0, 0, 0, 0.08);
        border-radius: 14px;
        background: var(--beige);
        box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        display: flex;
        align-items: center;
        gap: 0.65rem;
        margin: 0;
        padding: 12px 14px;
        border-radius: 10px;
        font-weight: 700;
    }

    .site-nav a i {
        display: inline-flex;
        justify-content: center;
        width: 1.15rem;
        color: var(--text-green);
    }

    .site-nav a:hover,
    .site-nav a:focus-visible {
        background: rgba(255, 255, 255, 0.7);
    }
}
nav a {
    margin: 0 10px;
    text-decoration: none;
    color: var(--color-text);
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #fff6eb;
}

.hero-track,
.hero-slide,
.hero-fallback {
    min-height: 620px;
}

.hero-slide,
.hero-fallback {
    align-items: center;
    background:
        linear-gradient(90deg, rgba(255, 246, 235, 0.5) 0%, rgba(255, 246, 235, 0.4) 40%, rgba(255, 255, 255, 0) 100%),
        var(--hero-image),
        url("images/pattern.png");
    background-position: center, center right, center;
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: cover, cover, 260px;
    display: grid;
    grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
    gap: 48px;
    padding: 56px 8%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition: opacity 280ms ease, transform 280ms ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-content {
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--green);
    color: var(--text-green);
    font-weight: 700;
    font-size: 1.2rem;
}

.hero h1 {
    font-size: 44px;
    line-height: 1.05;
    margin: 0 0 12px;
}

.hero p {
    font-size: 18px;
    margin: 0 0 24px;
}

.hero-btn {
    align-items: center;
    background: var(--color-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    min-height: 44px;
    padding: 0 1.25rem;
    text-decoration: none;
}

.hero-background-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-nav-prev {
    left: 18px;
}

.hero-nav-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 4;
    display: flex;
    gap: 0.45rem;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    padding: 0;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--color-accent);
}

.hero-admin-table input {
    width: 100%;
}

.hero-admin-image-cell {
    min-width: 190px;
}

.hero-admin-thumb {
    width: 100%;
    max-width: 190px;
    height: 108px;
    border-radius: 10px;
    display: block;
    margin-bottom: 0.55rem;
    object-fit: cover;
}

.hero-edit-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    display: block;
    margin-top: 0.5rem;
    object-fit: cover;
}

.hero-admin-content-cell {
    min-width: 260px;
}

.hero-admin-content-cell label {
    margin-bottom: .5rem;
}

.hero-admin-content-cell input+input {
    margin-top: 0.45rem;
}

.hero-admin-actions {
    text-align: right;
}


.hero-file-upload {
    margin: 0;
    width: 100%;
}

.hero-selected-file {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-error {
    color: var(--text-red);
    display: block;
    font-weight: 700;
    margin-top: 0.35rem;
    font-size: .9rem;
}

.form-error[hidden] {
    display: none;
}

@media (max-width: 800px) {

    .hero,
    .hero-track,
    .hero-slide,
    .hero-fallback {
        min-height: clamp(520px, 78svh, 680px);
    }

    .hero-slide,
    .hero-fallback {
        align-items: end;
        background:
            linear-gradient(180deg, rgba(255, 246, 235, 0.24) 0%, rgba(255, 246, 235, 0.72) 56%, rgba(255, 246, 235, 0.96) 100%),
            var(--hero-image),
            url("images/pattern.png");
        background-position: center, center, center;
        background-repeat: no-repeat, no-repeat, repeat;
        background-size: cover, cover, 220px;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 32px 20px 84px;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

    .hero-slide.is-active {
        display: grid;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-badge {
        font-size: 1rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 10vw, 2.6rem);
        line-height: 1.08;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-nav {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .hero-nav-prev {
        left: 20px;
    }

    .hero-nav-next {
        right: 20px;
    }

    .hero-dots {
        bottom: 32px;
    }

}

/* CATALOG */
.catalog {
    margin-top: 20px;
}

.catalog.grid-mode {
    gap: 15px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.catalog.list-mode {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}


.catalog.list-mode .product {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 15px;
}

.catalog.list-mode .product-image {
    width: 200px;
    height: 200px;
    margin-right: 20px;
}

.catalog.list-mode .product-info {
    height: 240px;
    flex: 1;
}

.product-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
}

.catalog.list-mode .product-options {
    display: none;
}

.catalog.list-mode .price-container {
    order: 2;
    position: static;
    height: fit-content;
    justify-content: flex-start;
    width: 100%;
}

.catalog.list-mode .price-container .price {
    position: initial;
}

.catalog.list-mode .product-buttons {
    order: 3;
}

.home-products-section {
    display: flex;
    flex-direction: column;
}

.home-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.home-products-title {
    text-align: center;
}

/* Estilo de los botones de control */
.view-controls {
    text-align: right;
    padding: 20px 5%;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    padding: 0;
    justify-content: flex-end;
}

/* PRODUCT CARD */

.product {
    background: var(--bg2);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
    break-inside: avoid;
    cursor: pointer;
    transition: all .25s ease;
    text-decoration: none;
    height: 100%;
}

.product:visited {
    color: inherit;
    text-decoration: inherit;
}

.product:nth-of-type(even) {
    background: var(--bg2);
}

.product:nth-of-type(odd) {
    background: #FFFAF0;
}

.product-image {
    width: 100%;
    border-radius: 10px;
    height: 300px;
    object-fit: cover;
    transition: all .25s ease;
    -webkit-user-drag: none;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 196px;
    object-fit: cover;
    transition: all .35s ease;
}

.product-title {
    font-size: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: break-word;
    overflow: hidden;
    text-transform: uppercase;
}

.product-description {
    font-size: .9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow-wrap: break-word;
    overflow: hidden;
}

.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
}

.product:hover .product-image {
    transform: scale(1.05);
}

.product-link {
    color: inherit;
    text-decoration: none;
}

.product-card-link {
    display: flex;
    flex-direction: column;
}

.price-container {
    display: flex;
    justify-content: flex-end;
    height: 25px;
    gap: 10px;
}

.price {
    position: relative;
    right: 10px;
    top: -25px;
    width: fit-content;
    background: var(--green);
    padding: 10px;
    border-radius: .5rem;
    font-weight: bold;
    font-size: 1.3rem;
    height: fit-content;
}

.discount {
    background: var(--red);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    color: #333;
}

/* OPTIONS */

.option-group {
    margin-top: 10px;
    width: 100%;
}

.option-group h4 {
    margin-bottom: 5px;
}

.color-options,
.size-options {
    display: flex;
    gap: 8px;
}

/* COLOR BUTTON */

.color-option,
.size-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #aaa;
    cursor: pointer;
    padding: 0 !important;
}

/* SIZE BUTTON */

.size-option {
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
}

/* SELECTED STATE */

.selected {
    border: 3px solid var(--red);
}

/* BUTTONS */

.product-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.btn {
    width: max-content;
    background: var(--green);
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--text-green);
    transition: all .2s;
}

.btn:not(:disabled):hover,
.btn:not(:disabled):active {
    background: var(--green-hover);
    opacity: 0.9;
}

.btn-secondary {
    background: var(--violet);
    color: var(--text-violet);
}

.btn-secondary:not(:disabled):hover,
.btn-secondary:not(:disabled):active {
    background: var(--violet-hover);
}

.btn-blue {
    background: var(--blue);
    color: var(--text-blue);
}

.btn-blue:not(:disabled):hover,
.btn-blue:not(:disabled):active,
.btn-blue:not(:disabled).active {
    background: var(--blue-hover);
    color: var(--text-blue);
}

.btn-danger {
    background: var(--red);
    color: var(--text-red);
}

.btn-danger:not(:disabled):hover,
.btn-danger:not(:disabled):active,
.btn-danger:not(:disabled).active {
    background: var(--red-hover);
    color: var(--text-red);
}

.btn:disabled,
.btn-disabled {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

.alert-error,
.mp-payment-alert {
    color: #8f1f1f;
    background: #ffe6e6;
    border: 2px solid #ef8f8f;
    border-left-width: 7px;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(190, 77, 77, 0.16);
}

.alert-error {
    position: fixed;
    top: 6rem;
    left: 1rem;
}


.buy-btn {
    flex: 1;
}

.split-layout,
.checkout-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-alert {
    width: 100%;
}

.checkout-result-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-result-card {
    width: min(720px, 100%);
    background: var(--bg2);
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkout-result-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.checkout-result-icon-success {
    background: var(--green);
    color: var(--text-green);
}

.checkout-result-icon-error {
    background: var(--red);
    color: var(--text-red);
}

.transfer-box {
    background: var(--beige);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.transfer-copy-target {
    display: inline-block;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.transfer-receipt-action {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    margin-top: 6px;
    background: #25d366;
    color: #073b1a;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.24);
}

.transfer-receipt-action:not(:disabled):hover,
.transfer-receipt-action:not(:disabled):active {
    background: #1fbd5a;
    color: #052b13;
}

.checkout-transfer-box {
    grid-column: 1 / -1;
}

.checkout-transfer-box[hidden] {
    display: none;
}

.order-summary-box,
.contact-card {
    background: var(--bg2);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    margin-top: 1rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-info-title {
    text-align: left;
}

.customer-form {
    background: var(--bg2);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.customer-submit {
    width: 100%;
    height: 3rem;
}

.required-info {
    font-size: 0.9em;
    color: #555;
}

.table-actions,
.summary-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.cart-page {
    background: #e0e0e0;
    display: flex;
    justify-content: space-between;
    padding: 0;
    padding-top: calc(6rem + 40px);
    flex-direction: column;
}

.cart-product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
    overflow: hidden;
    font-size: 1.1rem;
    min-width: 130px;
}

.cart-product-variant {
    color: var(--color-text);
    text-transform: capitalize;
}

.cart-products {
    padding: 0 40px;
    margin-bottom: 2rem;
    z-index: 300;
}

.cart-title,
.checkout-title {
    width: 100%;
    text-align: center;
}

.empty-btn {
    margin-top: 1rem;
}

.summary-title {
    text-align: center;
}

.summary-total {
    display: flex;
    justify-content: end;
    font-size: 1.5rem;
    width: 100%;
}

.summary-amount {
    font-weight: 800;
    margin-left: 1rem;
}

.summary-actions {
    justify-content: end;
    width: 100%;
}

.admin-product-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-product-cell div>strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: break-word;
    overflow: hidden;
}

.category-field {
    position: relative;
}

.category-combobox {
    position: relative;
    width: 100%;
}

.category-combobox input {
    width: 100%;
    padding-right: 2.75rem;
}

.category-menu-toggle {
    position: absolute;
    top: 50%;
    right: 0.4rem;
    width: 2.1rem;
    height: 2.1rem;
    transform: translateY(-50%);
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-menu-toggle:hover,
.category-menu-toggle:focus-visible {
    background: rgba(0, 0, 0, 0.06);
}

.category-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    padding: 0.35rem;
}

.category-menu-option {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    display: block;
    font: inherit;
    padding: 0.65rem 0.75rem;
    text-align: left;
}

.category-menu-option:hover,
.category-menu-option.is-active {
    background: var(--blue-hover);
}

.category-menu-create {
    font-weight: 700;
}

.category-menu-empty {
    color: #666;
    padding: 0.65rem 0.75rem;
}

.admin-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    -webkit-user-drag: none;
}

.cart-product-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cart-product-thumb {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid #ddd;
    -webkit-user-drag: none;
}

.variant-admin-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 18px;
    background: #fafafa;
}

.variant-builder-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.variant-color-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-variant-card {
    border: 1px solid #d9d9d9;
    border-radius: 18px;
    background: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.color-variant-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.tag-item-static {
    padding-right: 0.35rem;
}

.variant-size-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 0.75rem;
    align-items: center;
}

.variant-stock-table-wrap {
    overflow-x: auto;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    background: #fff;
}

.variant-stock-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
}

.variant-stock-table th,
.variant-stock-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #eeeeee;
    text-align: left;
    vertical-align: middle;
}

.variant-stock-table th {
    background: #f7f7f7;
    color: #555;
    font-size: 0.85rem;
    font-weight: 700;
}

.variant-stock-table tbody tr:last-child td {
    border-bottom: none;
}

.variant-color-label {
    display: inline-block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.variant-stock-hidden {
    width: 110px;
    min-width: 90px;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    background: #fff;
    color: var(--color-text);
    font-weight: 700;
}

.variant-stock-action {
    width: 48px;
    text-align: right;
}

.variant-stock-action button,
.color-variant-header button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 999px;
    background: #ffe3e3;
    color: #8f1d1d;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.variant-stock-current {
    display: inline-block;
    min-width: 52px;
    font-size: 1rem;
}

.variant-stock-adjust {
    display: inline-grid;
    grid-template-columns: 88px 34px 34px;
    gap: 0.35rem;
    align-items: center;
    justify-content: end;
}

.variant-stock-adjust input {
    width: 88px;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    font-weight: 700;
}

.variant-stock-action .stock-adjust-add {
    background: #dcfce7;
    color: #166534;
}

.variant-stock-action .stock-adjust-remove {
    background: #ffe3e3;
    color: #8f1d1d;
}

.admin-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.admin-gallery-item {
    position: relative;
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.admin-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.image-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-remove-btn:hover {
    background: rgba(186, 24, 24, 0.92);
}

.image-order-controls {
    display: flex;
    gap: 0.45rem;
    align-self: flex-start;
}

.image-order-btn {
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

.image-order-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

[data-shipping-row] {
    transition: opacity .15s ease, background-color .15s ease;
}

[data-shipping-row].is-dragging {
    opacity: .55;
}

.shipping-drag-handle {
    cursor: grab;
    width: 42px;
    min-width: 42px;
    padding-inline: 0;
}

.shipping-all-provinces {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: .4rem;
    margin: .5rem 0;
    font-weight: 700;
}

.shipping-province-picker {
    display: flex;
    flex-direction: column;
}

.shipping-province-grid {
    display: flex;
    flex-direction: column;
    gap: .35rem .75rem;
    min-width: 280px;
    height: 120px;
    overflow-y: scroll;
    padding: 7px;
}

.shipping-province-grid label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .35rem;
    margin: 0;
    font-size: .9rem;
    line-height: 1.2;
}

.product-detail-page {
    padding-top: calc(6rem + 40px);
}

.product-detail-gallery {
    min-width: 270px;
}

.product-detail-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    background: var(--bg2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow-x: hidden;
    margin-top: 1rem;
}

.product-detail-main img {
    width: 100%;
    height: 520px;
    object-fit: contain;
    border-radius: 18px;
    transition: transform .25s ease;
    cursor: zoom-in;
    background: #fff;
    -webkit-user-drag: none;
}

.product-detail-main img:focus {
    outline: 3px solid var(--blue-hover);
    outline-offset: 4px;
}

body.is-lightbox-open {
    overflow: hidden;
}


.product-image-lightbox {
    position: fixed;
    display: none;
    z-index: 2000;
}

.product-image-lightbox.active {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    inset: 0;
}

.product-image-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
}

.product-image-lightbox-panel {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-lightbox-toolbar {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    display: flex;
    gap: 0.5rem;
    z-index: 1;
}

.product-image-lightbox-stage {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    touch-action: none;
}

.product-image-lightbox-stage.is-zoomed {
    cursor: grab;
}

.product-image-lightbox-stage.is-zoomed:active {
    cursor: grabbing;
}

.product-image-lightbox-stage img {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    user-select: none;
    transform-origin: center center;
    border-radius: 0;
    background: transparent;
    user-select: none;
    -webkit-user-drag: none;
}

.image-lightbox-btn {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background-color: var(--red);
    color: var(--text-red);
    border: none;
    cursor: pointer;
}

.product-detail-thumbs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.25rem 0;
}

.product-thumb {
    display: flex;
    border: 2px solid transparent;
    background: transparent;
    padding: 0;
    cursor: pointer;
    border-radius: 14px;
    flex: 0 0 92px;
    transition: all .2s ease;
}

.product-thumb img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 12px;
    -webkit-user-drag: none;
}

.product-thumb.active,
.product-thumb:hover {
    border-color: var(--blue-hover);
    transform: translateY(-2px);
}

.product-detail-info,
.product-info-top,
.product-info-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail-info {
    justify-content: space-between;
}

.product-detail-price {
    position: static;
    top: auto;
    right: auto;
}

.detail-chip-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-chips,
.variant-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-chip {
    background: var(--beige);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.95rem;
}

.variant-option {
    text-transform: capitalize;
    border: 2px solid #d9d9d9;
    background: #fff;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-weight: 700;
    transition: all .2s ease;
}

.variant-option:hover,
.variant-option.active {
    border-color: var(--blue-hover);
    background: var(--blue);
}

.variant-option.is-disabled,
.variant-option:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f2f2f2;
    color: #666;
    border-color: #ddd;
}

.product-detail-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.purchase-feedback {
    min-height: 1.4rem;
    margin: 0;
    font-size: 0.95rem;
}

.purchase-feedback[data-state="ok"] {
    color: #1f7a4d !important;
}

.visual-only {
    pointer-events: none;
}

.cart-btn {
    width: 45px;
}

/* FOOTER */

footer {
    width: 100%;
    min-height: 250px;
    background: var(--beige);
    padding: 30px;
}

.metodos>div {
    margin: 0 10px;
}

.social-media,
.metodos,
.menu {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 15px;
}

.social-media a,
.menu a,
.metodos div {
    margin: 0 10px;
    text-decoration: none;
    color: var(--color-accent);
    display: flex;
    gap: 10px;
    align-items: center;
}

.metodos div {
    color: var(--color-text);
}

.payment-method-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.social-media a:hover,
.menu a:hover {
    color: var(--color-text);
}

.cart-icon i {
    color: var(--text-green);
}

.cart-icon i,
.social-media i,
.metodos i {
    scale: 1.3;
}

..menu i {
    scale: 1.1;
}

.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: var(--bg2);
    font-size: 28px;
    padding: 12px 16px;
    border-radius: 50%;
    text-decoration: none;
    z-index: 999;
}

.cart-icon {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: var(--green);
    border-radius: .5rem;
    color: var(--text-green);
}

.cart-icon:hover {
    background: var(--green-hover);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: var(--bg2);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.table-actions-between {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.table-responsive th {
    background: var(--beige);
    padding: 12px;
    text-align: left;
}

.table-responsive td {
    padding: 12px;
    border-top: 1px solid #eee;
}

.table-responsive tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.03);
}

.table-responsive tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.pagination>span {
    background-color: rgba(34, 34, 34, .3);
    padding: 20px 10px;
    width: fit-content;
    border-radius: 1rem;
}

.pagination-link {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    color: var(--color-text);
    display: inline-flex;
    font-weight: 700;
    height: 36px;
    justify-content: center;
    min-width: 36px;
    padding: 0 0.65rem;
    text-decoration: none;
}

.pagination-link.is-active {
    background: var(--green);
    border-color: var(--green);
    color: var(--text-green);
}

.pagination-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pagination-ellipsis {
    align-items: center;
    color: #666;
    display: inline-flex;
    height: 36px;
    padding: 0 0.25rem;
}

.status-active {
    background: var(--green);
}

.status-hidden {
    background: var(--red);
}

.status-archived {
    background: #e8e1f5;
    color: #5d3b91;
}

.status {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.status-pending {
    background: #FFE8A1;
}

.status-paid {
    background: #B8E6B8;
}

.status-shipped {
    background: #FFD5B8;
}

.status-delivered {
    background: #A1E8E8;
}

.status-canceled {
    background: #F7A1A1;
}

/* texto */
.muted {
    color: var(--muted);
    font-size: 1rem;
}

/* número grande */
.big-number {
    font-size: 2rem;
    font-weight: bold;
    margin-top: 10px;
    color: var(--color-text);
}

/* colores por tipo */
.card:nth-child(1) {
    background: var(--blue);
}

.card:nth-child(2) {
    background: var(--green);
}

.card:nth-child(3) {
    background: var(--yellow);
}

.card:nth-child(4) {
    background: var(--violet);
}

/* hover con más contraste */
.card:nth-child(1):hover {
    background: var(--blue-hover);
}

.card:nth-child(2):hover {
    background: var(--green-hover);
}

.card:nth-child(3):hover {
    background: var(--yellow-hover);
}

.card:nth-child(4):hover {
    background: var(--violet-hover);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg2);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.table-responsive th {
    background: var(--beige);
    text-align: left;
    padding: 12px;
    font-size: 1rem;
}

.table-responsive td {
    padding: 12px;
    border-top: 1px solid #eee;
    font-size: 0.95rem;
    overflow: hidden;
}

.table-responsive tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

.order-card {
    background: var(--bg2);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
    transition: all .25s ease;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.order-card p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    padding: 5px;
    border-radius: 8px;
    align-items: center;
}

.order-card>p:nth-child(odd) {
    background-color: #eee;
}

.order-card strong {
    font-size: 1rem;
}

.order-detail-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-detail-email-error {
    border: 2px solid #dc2626;
    background: #fff1f2;
}

.order-detail-email-sent {
    border: 2px solid #16a34a;
    background: #f0fdf4;
}

.order-card-section {
    border-top: 1px solid var(--border);
    padding-top: 0.85rem;
}

.order-card-section:first-child {
    border-top: none;
    padding-top: 0;
}

.order-card-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.order-card-section p:nth-of-type(odd) {
    background-color: #eee;
}

.order-history-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-height: 450px;
    overflow-y: auto;
}

.order-history-item {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .85rem;
}

.order-email-history-item {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.order-history-item p {
    margin: .35rem 0;
}

.order-email-action-form {
    margin-top: .85rem;
    padding: .85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8f8f8;
}

.order-email-pending {
    margin: 0 0 .65rem;
    padding: .75rem;
    border: 1px solid #facc15;
    border-radius: 8px;
    background: #fef9c3;
    color: #713f12;
}

.tracking-code-panel {
    margin: .85rem 0;
    padding: .9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
}

.tracking-code-panel[hidden] {
    display: none;
}

.tracking-code-fields {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr) 54px;
    gap: .5rem;
    align-items: end;
}

.tracking-code-fields label {
    margin: 0;
}

.tracking-code-fields input {
    text-transform: uppercase;
}

.tracking-code-suffix {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 .75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #eee;
    font-weight: 700;
}

.tracking-code-help {
    margin: .75rem 0 0;
    color: #4b5563;
    font-size: .9rem;
    line-height: 1.45;
}

.status.pending {
    background: var(--yellow);
    padding: 5px 10px;
    border-radius: 6px;
}

.status.completed {
    background: var(--green);
}

.status.cancelled {
    background: var(--red);
}

#counter {
    font-weight: bold;
}

.copyright {
    width: 100%;
    margin-top: 40px;
    text-align: center;
}

.required {
    color: red;
    margin-left: 2px;
    font-weight: bold;
}

.cart-summary {
    position: sticky;
    width: 100%;
    bottom: 0;
    padding: 40px;
    background: var(--bg2);
    border-top: 2px solid var(--color-text);
    z-index: 400;
}

.checkout-page {
    background: #e0e0e0;
    padding: 2rem;
}

.checkout-title {
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
}

.checkout-layout {
    display: flex;
    flex-direction: row-reverse;
    gap: 1rem;
    align-items: flex-start;
}

.checkout-summary,
.checkout-form-panel {
    flex: 1;
}

.checkout-card {
    background: var(--bg2);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    margin-top: 1rem;
}

.summary-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 1rem;
}

.summary-product-info {
    display: flex;
    flex-direction: column;
}

.summary-product-meta {
    margin-left: 1rem;
}

.summary-separator {
    margin: 0.5rem 0;
}

.summary-total {
    font-size: 1.2rem;
}

.required-note {
    font-size: 0.9em;
    color: #555;
}

.field-label {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.checkout-submit {
    width: 100%;
    height: 3rem;
}

@media (min-width: 1250px) {
    .catalog.list-mode {
        grid-template-columns: repeat(auto-fit, minmax(calc(50% - 15px), 1fr));
    }
}

@media (width <=1600px) {
    .catalog.grid-mode {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (width <=1400px) {
    .catalog.grid-mode {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (width <=1000px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .table-actions-between {
        flex-direction: column;
        align-items: stretch;
    }

    .catalog.grid-mode {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail-card {
        grid-template-columns: 1fr;
    }

    .admin-products-layout {
        flex-direction: column;
    }
}

@media (width <=650px) {
    .catalog.grid-mode {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (width <=775px) {

    .panel,
    .filters {
        flex-direction: column;
    }

    .filters {
        width: 100%;
        align-items: flex-start;
    }

    .filters label {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .filters input[type="text"],
    .filters select {
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: center;
    }

    .filter-actions button,
    .filter-actions a,
    .view-controls button {
        width: 100%;
    }

    .view-controls {
        width: 100%;
        justify-content: center;
    }

    .variant-size-entry {
        grid-template-columns: 1fr;
    }

    .color-variant-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (width < 550px) {
    .table-actions {
        flex-direction: column;
        align-items: normal;
    }

    .catalog.list-mode .product-image {
        width: 100px;
        height: 100px;
        margin-right: 20px;
        flex-shrink: 0;
    }

    section {
        padding: 20px;
    }

    .how-to-buy-grid {
        grid-template-columns: 1fr;
    }

    .how-to-buy {
        padding: 40px 20px;
    }

    .section-heading h2 {
        font-size: 1.7rem;
    }

    .price {
        font-size: 1rem;
    }

    .catalog.list-mode .product-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
    }

    .catalog.list-mode .product-description {
        height: auto;
    }

    .catalog.list-mode .product-info {
        gap: 7px;
    }

    .summary-actions {
        margin-top: 1rem;
        display: flex;
        width: 100%;
        justify-content: end;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .checkout-layout {
        flex-direction: column;
        align-items: normal;
    }

    .home-products-header {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (width<=500px) {

    footer>div {
        flex-direction: column;
        gap: 1rem;
    }
}

.mp-payment-warning {
    display: inline-block;
    margin-top: 0.45rem;
    padding: 5px 8px;
    border-radius: 7px;
    background: #ffe6e6;
    color: #8f1f1f;
    border: 1px solid #ef8f8f;
    font-size: 0.82rem;
    font-weight: 700;
}

.mp-payment-alert {
    color: #8f1f1f;
    background: #ffe6e6;
    border: 2px solid #ef8f8f;
    border-left-width: 7px;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 0.75rem 0 1rem;
    font-weight: 700;
    line-height: 1.35;
    box-shadow: 0 8px 18px rgba(190, 77, 77, 0.12);
    position: static;
}
/* Responsive admin: products, orders, hero and shipping */
@media (max-width: 1100px) {
    .admin-flex > .admin-grid,
    .admin-shell > .admin-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-products-layout,
    .admin-hero-layout,
    .admin-orders-layout {
        flex-direction: column;
    }

    .admin-flex .panel,
    .admin-shell .panel,
    .admin-flex .panel-column,
    .admin-shell .panel-column {
        min-width: 0;
        width: 100%;
    }

    .admin-product-filters,
    .admin-order-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
        gap: 0.75rem;
    }

    .admin-product-filters label,
    .admin-order-filters label,
    .admin-product-filters .filter-actions,
    .admin-order-filters .filter-actions {
        min-width: 0;
        width: 100%;
    }

    .admin-flex .table-responsive,
    .admin-shell .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-flex .table-responsive table,
    .admin-shell .table-responsive table {
        min-width: 760px;
    }

    .hero-admin-table {
        min-width: 820px;
    }

    .admin-product-cell {
        min-width: 220px;
    }

    .hero-admin-content-cell,
    .hero-admin-image-cell {
        min-width: 0;
    }
}

@media (max-width: 775px) {
    .admin-flex,
    .admin-shell {
        padding-inline: 16px;
    }

    .admin-flex > h1,
    .admin-shell > h1 {
        font-size: 1.8rem;
        overflow-wrap: anywhere;
    }

    .admin-flex > .admin-grid,
    .admin-shell > .admin-grid {
        gap: 1rem;
    }

    .admin-flex .panel,
    .admin-shell .panel {
        gap: 0.85rem;
    }

    .admin-flex .panel.panel-column,
    .admin-shell .panel.panel-column {
        padding: 16px;
    }

    .admin-product-filters,
    .admin-order-filters {
        grid-template-columns: 1fr;
    }

    .admin-product-filters input,
    .admin-product-filters select,
    .admin-order-filters input,
    .admin-order-filters select,
    .admin-shell input,
    .admin-shell textarea,
    .admin-shell select,
    .admin-flex input,
    .admin-flex textarea,
    .admin-flex select {
        max-width: 100%;
    }

    .admin-flex .filter-actions,
    .admin-shell .filter-actions,
    .admin-flex .table-actions,
    .admin-shell .table-actions,
    .order-email-action-form .table-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .admin-flex .filter-actions .btn,
    .admin-shell .filter-actions .btn,
    .order-email-action-form .btn {
        width: 100%;
    }

    .admin-flex .table-actions-between,
    .admin-shell .table-actions-between {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-flex .table-actions-between h2,
    .admin-shell .table-actions-between h2 {
        text-align: left;
    }

    .admin-flex .table-responsive,
    .admin-shell .table-responsive {
        margin-inline: -4px;
        padding-bottom: 0.35rem;
    }

    .admin-flex .table-responsive table,
    .admin-shell .table-responsive table {
        min-width: 680px;
    }

    .admin-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-gallery-item img {
        height: 150px;
    }

    .edit-product-panel,
    .variant-admin-builder,
    .color-variant-card,
    .order-email-action-form,
    .tracking-code-panel {
        padding: 14px;
    }

    .variant-builder-head,
    .color-variant-header {
        align-items: stretch;
        flex-direction: column;
    }

    .tag-input-row,
    .variant-size-entry {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .variant-stock-table {
        min-width: 420px;
    }

    .variant-stock-action {
        width: auto;
        min-width: 155px;
    }

    .variant-stock-adjust {
        grid-template-columns: minmax(72px, 1fr) 34px 34px;
        justify-content: stretch;
    }

    .variant-stock-adjust input {
        width: 100%;
    }

    .shipping-province-grid {
        min-width: 0;
        width: 100%;
        max-height: 180px;
    }

    .tracking-code-fields {
        grid-template-columns: 76px minmax(0, 1fr) 46px;
    }

    .order-card,
    .order-detail-card {
        overflow-wrap: anywhere;
    }

    .pagination > span {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
        max-width: 100%;
    }
}

@media (max-width: 550px) {
    .admin-flex,
    .admin-shell {
        padding-inline: 12px;
    }

    .admin-flex .panel.panel-column,
    .admin-shell .panel.panel-column,
    .edit-product-panel,
    .variant-admin-builder,
    .color-variant-card,
    .order-email-action-form,
    .tracking-code-panel {
        padding: 12px;
    }

    .admin-flex .table-responsive table,
    .admin-shell .table-responsive table {
        min-width: 620px;
    }

    .admin-product-cell {
        min-width: 190px;
    }

    .admin-thumb {
        width: 48px;
        height: 48px;
    }

    .hero-admin-thumb {
        max-width: 150px;
        height: 90px;
    }

    .hero-edit-preview {
        aspect-ratio: 4 / 3;
    }

    .admin-gallery {
        grid-template-columns: 1fr;
    }

    .admin-gallery-item img {
        height: 190px;
    }

    .variant-stock-table {
        min-width: 360px;
    }

    .variant-stock-adjust {
        grid-template-columns: 1fr 38px 38px;
    }

    .tracking-code-fields {
        grid-template-columns: 1fr;
    }

    .tracking-code-suffix {
        justify-content: flex-start;
        width: 100%;
    }

    .shipping-province-grid {
        height: 170px;
    }

    .pagination {
        gap: 0.35rem;
    }

    .pagination-link {
        height: 34px;
        min-width: 34px;
        padding-inline: 0.55rem;
    }
}
