body {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    transition: top .75s ease-out .25s;
    z-index: 1000;
}

.navbar.hidden {
    top: -100%;
}

.navbar-header {
    position: relative;
    width: 100%;
    height: 3.8em;
    padding: 0 1em;
    background-color: var(--emphasis-color);
    box-shadow: 0px -20px 50px 0px #000;
    display: flex;
    align-items: center;
    gap: 1em;
    z-index: 100;
}

.navbar-header img {
    height: 2.8em;
    width: 2.8em;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    flex-shrink: 0;
}

.navbar-header h1 {
    white-space: nowrap;
    font-size: 20px;
    font-family: 'Good Times', sans-serif;
    font-weight: 300;
    color: var(--emphasis-text);
    flex-shrink: 0;
}

.navbar-header ul {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.navbar-header ul li {
    text-align: center;
    border-left: 1px solid var(--border-color);
}

.navbar-header ul li:last-child {
    border-right: 1px solid var(--border-color);
}

.navbar-header ul a {
    text-decoration: none;
}

.navbar-header ul button {
    background: none;
    border: none;
    cursor: pointer;
}

.navbar-header ul a,
.navbar-header ul button {
    font-size: 14px;
    white-space: nowrap;
    width: 100%;
    height: 100%;
    color: var(--emphasis-text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.navbar-header ul a:hover,
.navbar-header ul button:hover {
    color: var(--complementary-text);
    background-color: var(--complementary-color);
    transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
}

.navbar-header ul a svg {
    height: 24px;
    width: 24px;
    aspect-ratio: 1 / 1;
}

.navbar-header ul button svg {
    height: 24px;
    width: 24px;
    aspect-ratio: 1 / 1;
}

.navbar-header form {
    display: flex;
    flex-shrink: 0;
}

.navbar-header [type="search"] {
    width: 100%;
    height: 2.5em;
    padding: 0.5em;
    border: none;
    border-radius: 0.25rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.navbar-header form button {
    width: 2.5em;
    height: 2.5em;
    border: none;
    border-radius: 0.25rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-color: var(--complementary-color);
    color: var(--complementary-text);
    cursor: pointer;
}

.navbar-cart {
    width: 100%;
    height: 23em;
    padding: 2em;
    background-color: var(--complementary-color);
    overflow: auto;
    display: flex;
    gap: 2em;
    z-index: 100;
    animation-duration: .4s;
    animation-fill-mode: forwards;
}

.navbar-cart.hidden {
    animation-name: hideCart;
}

.navbar-cart:not(.hidden) {
    animation-name: showCart;
}

@keyframes hideCart {
    0% {
        transform: translateY(0);
        height: 23em;
        padding: 2em;
    }

    50% {
        transform: translateY(-100%);
        height: 23em;
        padding: 2em;
    }

    100% {
        transform: translateY(-100%);
        height: 0;
        padding: 0;
    }
}

@keyframes showCart {
    0% {
        transform: translateY(-100%);
        height: 0;
        padding: 0;
    }

    50% {
        transform: translateY(-100%);
        height: 23em;
        padding: 2em;
    }

    100% {
        transform: translateY(0);
        height: 23em;
        padding: 2em;
    }
}

.navbar-cart table {
    color: var(--complementary-text);
    width: 100%;
    border-collapse: collapse;
}

.navbar-cart thead tr {
    border-bottom: 2px solid var(--complementary-text);
}

.navbar-cart tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--complementary-text);
}

.navbar-cart th,
.navbar-cart td {
    padding: .8em;
}

.navbar-cart th:nth-child(1),
.navbar-cart td:nth-child(1) {
    text-align: left;
}

.navbar-cart th:nth-child(2),
.navbar-cart td:nth-child(2),
.navbar-cart th:nth-child(4),
.navbar-cart td:nth-child(4) {
    text-align: right;
}

.navbar-cart th:nth-child(3),
.navbar-cart td:nth-child(3) {
    text-align: center;
}

.navbar-cart th:nth-child(5),
.navbar-cart td:nth-child(5) {
    text-align: center;
}

.navbar-cart-product {
    display: flex;
    align-items: center;
    gap: 1em;
}

.navbar-cart-product img {
    width: 4em;
    height: 4em;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    flex-shrink: 0;
}

.navbar-cart-product div {
    display: flex;
    flex-direction: column;
}

.navbar-cart-product h2 {
    font-size: 16px;
}

.navbar-cart-product p {
    font-size: 12px;
}

.navbar-cart-sidecontent {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: .5em;
}

.navbar-cart-sidecontent svg {
    color: var(--complementary-text);
}

dialog {
    border: none;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: fadeInDown 0.3s ease-out forwards;
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f2f2f2;
    border-bottom: 1px solid #ccc;
}

.modal-header h1 {
    margin: 0;
    font-size: 1.25rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1rem;
}

.modal-body label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.modal-body label svg {
    vertical-align: middle;
    margin-right: 0.5rem;
}

.modal-body input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #ccc;
    text-align: right;
    background-color: #f9f9f9;
}

.btn-success {
    border: 1px solid var(--medium-green);
    padding: 0.375em 0.75em;
    border-radius: 0.25rem;
    transition: background-color 0.1s ease-in-out,
        border-color 0.1s ease-in-out,
        box-shadow 0.1s ease-in-out;
    color: var(--text-white);
    background-color: var(--green);
    white-space: nowrap;
    cursor: pointer;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--dark-green);
    border-color: var(--darker-green);
}

.btn-success:disabled {
    background-color: gray;
    border-color: #333;
    cursor: default;
}

.btn-warning {
    border: 1px solid var(--medium-red);
    padding: 0.375em 0.75em;
    border-radius: 0.25rem;
    transition: background-color 0.1s ease-in-out,
        border-color 0.1s ease-in-out,
        box-shadow 0.1s ease-in-out;
    color: var(--text-white);
    background-color: var(--red);
    white-space: nowrap;
    cursor: pointer;
}

.btn-warning:hover
.btn-warning:focus {
    background-color: var(--dark-red);
    border-color: var(--darker-red);
}

.btn-info {
    border: 1px solid var(--blue);
    padding: 0.375em 0.75em;
    border-radius: 0.25rem;
    transition: background-color 0.1s ease-in-out,
        border-color 0.1s ease-in-out,
        box-shadow 0.1s ease-in-out;
    color: var(--text-white);
    background-color: var(--blue);
    white-space: nowrap;
    cursor: pointer;
}

.btn-info:hover,
.btn-info:focus {
    background-color: var(--dark-blue);
    border-color: var(--darker-blue);
}

.warning-text {
    color:#d9534f;
    font-size:0.95em;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5em;
}

.mobile-menu-btn svg {
    color: var(--emphasis-text);
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
    z-index: 999;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    background-color: var(--complementary-color);
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.open {
    transform: translateX(0);
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em;
}

.mobile-sidebar-header h2 {
    margin: 0;
    color: var(--complementary-text);
    font-size: 20px;
    font-family: 'Good Times', sans-serif;
    font-weight: 300;
    white-space: nowrap;
}

#sidebar-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--complementary-text);
    cursor: pointer;
}

.mobile-sidebar ul {
    list-style: none;
    padding: 1em;
    margin: 0;
}

.mobile-sidebar li {
    margin-bottom: 1em;
}

.mobile-sidebar a,
.mobile-sidebar button {
    padding: 0;
    text-decoration: none;
    color: var(--complementary-text);
    font-size: 1em;
    background: none;
    border: none;
    cursor: pointer;
}

.main-container {
    min-height: 100vh;
    background-color: #ffffffda;
    padding: 5.8em 4em 2em 4em;
}

.main-container h2 {
    font-weight: 500;
    font-size: 32px;
    border-bottom: 1px solid #fff;
    margin-bottom: 1em;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1em;
    margin-bottom: 1em;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-card h3 {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    min-height: 2.5em;
    max-height: 3.6em;
    line-height: 1.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: block;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.img-wrapper {
    width: 200px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.img-wrapper img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    transition: transform 0.3s ease;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5em;
}

.hover-content button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .25em;
}

.hover-content button svg {
    width: 18px;
    height: 18px;
}

.hover-content input {
    width: 6em;
    padding: .75em .25em;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card:hover .overlay {
    opacity: 1;
    transform: scale(1);
}

.tag {
    position: absolute;
    text-align: end;
    padding: .25em .5em;
    font-size: 12px;
    z-index: 10;
}

.price-tag {
    top: 10px;
    right: 5px;
    background: var(--blue);
    color: var(--text-white);
}

.discount-tag {
    top: 40px;
    right: 5px;
    background: var(--medium-green);
    color: var(--text-white);
}

.discount-label {
    font-size: 10px;
}

.flex-container {
    background-color: #FFFFFF80;
    padding: 2em 4em;
}

.flex-container h2 {
    font-weight: 500;
    font-size: 32px;
    border-bottom: 1px solid #fff;
}

.flex-container img {
    width: 100%;
}


.register-invitation {
    background-color: #ffffffda;
    padding: 2em 4em;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
}

.register-invitation div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

.register-invitation div svg {
    width: 64px;
    height: 64px;
}

.reg-invitation-title {
    font-size: 18px;
    font-weight: 600;
}

.register-invitation div p {
    text-align: center;
    font-size: 14px;
}

.font-emphasis {
    font-family: 'Good Times', sans-serif;
    font-weight: 300;
}

.register-invitation img {
    width: 100%;
}

.footer {
    background-color: var(--emphasis-color);
    color: var(--emphasis-text);
    padding: 3em 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3em;
}

.footer > a {
    color: var(--emphasis-text);
    font-family: 'Good Times', sans-serif;
    font-size: 12px;
    font-weight: 300;
}

.footer ul {
    display: flex;
    gap: 2em;
}

.footer ul a {
    color: var(--emphasis-text);
}

.footer ul svg {
    width: 32px;
    height: 32px;
}

.reg-container {
    background-color: #ffffffda;
    padding: 5.8em 4em 2em 4em;
}

.reg-container h2 {
    font-weight: 500;
    font-size: 32px;
    border-bottom: 1px solid #fff;
    margin-bottom: 1em;
}

.reg-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: flex-start;
}

.reg-content img {
    width: 100%;
}

.reg-form {
    padding: 1em;
    background-color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.reg-form h3 {
    font-weight: 500;
}

.reg-group {
    display: flex;
}

.reg-group div {
    background-color: #eeeeee;
    padding: .25em .5em;
    color: #333;
    border: 1px solid var(--border-color);
    border-right: none;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.reg-group svg {
    width: 18px;
    height: 18px;
}

.reg-group select,
.reg-group input {
    width: 100%;
    padding: .25em .5em;
    border: 1px solid var(--border-color);
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.reg-form button[type="submit"] {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25em;
}

.reg-form button[type="submit"] svg {
    width: 18px;
    height: 18px;
}

.page-btn {
    font-size: 16px;
    border: 1px solid var(--emphasis-color);
    min-width: 2.5em;
    height: 2.5em;
    transition: background-color 0.1s ease-in-out,
        border-color 0.1s ease-in-out,
        box-shadow 0.1s ease-in-out;
    color: var(--emphasis-color);
    background-color: #fff;
    white-space: nowrap;
    cursor: pointer;
}

.page-btn.active {
    color: white;
    background-color: var(--emphasis-color);
    cursor: default;
}

.product-modal-form {
    margin: 0;
    padding: 0;
}
.product-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f2f2f2;
    border-bottom: 1px solid #ccc;
}
.product-modal-title {
    margin: 0;
    font-size: 1.1rem;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-modal-body {
    display: flex;
    gap: 2em;
    padding: 1.5em 1em;
    min-width: 300px;
}
.product-modal-img {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-modal-img img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    object-fit: contain;
}
.product-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: center;
}
.product-modal-desc {
    font-size: 1em;
}
.product-modal-brand {
    font-size: 0.95em;
    color: #888;
}
.product-modal-prices {
    font-size: 1.1em;
    font-weight: bold;
}
.product-modal-footer {
    padding: 1rem;
    border-top: 1px solid #ccc;
    text-align: right;
    background-color: #f9f9f9;
}

.orders-container {
    background-color: #fff;
    padding: 1em;
    border-radius: 10px;
}

#globalLoader {
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

#globalLoader.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.loader-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #eee;
    border-top: 5px solid var(--emphasis-color, #2017F3);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

dialog#detallePedidoModal {
    max-width: 800px;
}

.modal-body-table {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-size: 15px;
    margin: 0;
}

.modal-table-header th {
    background: #f5f5f5;
    color: #333;
    font-weight: 600;
    padding: 0.75em 1em;
    border-bottom: 2px solid #e0e0e0;
    text-align: left;
}

.modal-table-body td {
    padding: 0.7em 1em;
    border-bottom: 1px solid #ececec;
    color: #222;
    background: #fff;
}

.modal-table tr:last-child td {
    border-bottom: none;
}

.modal-table th, .modal-table td {
    min-width: 110px;
    word-break: break-word;
}

.modal-body-table {
    overflow-x: auto;
}

#paymentForm {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 2.5em 2em 2em 2em;
    margin: 2em auto 0 auto;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 1.2em;
}
#paymentForm h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 1em;
    color: #222;
    text-align: center;
}
#paymentForm .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3em;
}
#paymentForm label {
    font-size: 1em;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.2em;
}
#paymentForm input[type="text"],
#paymentForm input[type="number"],
#paymentForm input[type="date"],
#paymentForm input[type="file"],
#paymentForm select {
    padding: 0.6em 0.8em;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 1em;
    background: #fafbfc;
    color: #222;
    transition: border-color 0.2s;
}
#paymentForm input[type="file"] {
    background: #fff;
    padding: 0.4em 0.2em;
}
#paymentForm input:focus,
#paymentForm select:focus {
    border-color: var(--emphasis-color, #525252);
    outline: none;
}
#paymentForm button[type="submit"] {
    margin-top: 1.2em;
    width: 100%;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    #paymentForm {
        padding: 1.2em 0.5em 1.5em 0.5em;
        max-width: 100vw;
    }

    .modal-body-table {
        max-height: 60vh;
    }

    .desktop-only {
        display: none !important;
    }

    .navbar-cart {
        flex-direction: column;
    }

    .navbar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1em;
    }

    .mobile-menu-btn {
        display: block;
    }

    .register-invitation {
        grid-template-columns: 1fr
    }

    .reg-content {
        grid-template-columns: repeat(1, 1fr);
    }
    .reg-content > *:nth-child(1) { order: 2; }
    .reg-content > *:nth-child(2) { order: 1; }

    .navbar-header form {
        flex: 1;
        margin: 0 0.5em;
    }
}