/* Header General */
.header {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-1100);
    width: 100%;
    /* Reset padding for mobile, handled in media query for desktop */
    padding: 0;
}

/* Mobile Header */
.header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
    position: relative;
    z-index: 1000;
    background: var(--color-neutral-100);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: var(--color-neutral-100);
}

.main-content {
    padding: 0;
    width: 100%;
}

.generic-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-md);
}

.generic-page-title {
    font-size: var(--font-size-4xl);
    color: var(--color-neutral-900);
}

.header-menu-toggle {
    width: 40px;
    height: 40px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 3px;
    /* Thicker for Figma match */
    background-color: var(--color-neutral-1100);
    position: absolute;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
    /* Rounded softness */
}

.hamburger-line:nth-child(1) {
    top: 12px;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 12px;
}

/* Active State (X shape) */
.header-menu-toggle.active .hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.header-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.header-menu-toggle.active .hamburger-line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* .header-overlay-top and .header-menu-close removed as header persists */

.header-overlay-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding-top: 48px;
    overflow-y: auto;
}

.header-overlay-nav a {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    text-transform: uppercase;
    color: var(--color-neutral-1100);
    text-decoration: none;
}

.header-overlay-socials {
    margin-top: auto;
    display: flex;
    gap: 24px;
    justify-content: center;
    padding-bottom: 48px;
}

/* Desktop Header (Hidden on Mobile) */
.header-desktop,
.header-navbar-desktop {
    display: none;
}

.header-overlay {
    display: none;
}

@media (max-width: 767px) {
    .header-mobile {
        display: flex;
        /* Ensure it is explicitly flex */
    }

    .header-overlay {
        display: flex;
        position: fixed;
        top: 80px;
        /* Position it below the mobile header */
        left: 0;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--color-neutral-100);
        z-index: 50;
        /* Above everything */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        flex-direction: column;
    }

    .header-overlay.active {
        transform: translateX(0);
    }
}

@media (min-width: 768px) {
    .header {
        background-color: var(--color-neutral-100);
        box-sizing: border-box;
        width: 100%;
    }

    .header-inner.header-desktop,
    .header-navbar-desktop {
        display: flex;
    }

    .header-navbar-desktop {
        display: block;
        width: 100%;
    }

    .header-mobile,
    .header-overlay {
        display: none !important;
    }

    .header-inner.header-desktop {
        align-items: center;
        justify-content: space-between;
        width: 100%;
        max-width: 1440px;
        margin: 0 auto;
        padding: 16px 80px;
        height: 102px;
        box-sizing: border-box;
        position: relative;
    }

    .header-socials {
        display: flex;
        gap: var(--spacing-24);
        align-items: center;
        width: 168px;
        /* Match actions width to help logo stay centered if possible, or just use space-between */
    }

    .header-socials a,
    .header-actions a {
        display: block;
        width: 24px;
        height: 24px;
    }

    .header-socials img,
    .header-actions img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .header-logo {
        width: 315px;
        height: 70px;
    }

    .header-logo img,
    .header-logo svg {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .header-actions {
        display: flex;
        gap: var(--spacing-24);
        align-items: center;
        justify-content: flex-end;
        width: 168px;
    }
}

/* Cart Icon & Badge Styling */
.header-actions button.cart-icon-wrapper {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.header-actions button.cart-icon-wrapper:hover svg {
    color: var(--color-primary-400-main);
}

.header-actions .cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    /* Ensure absolute badge is never clipped */
}

/* Allow the wrapper to expand slightly beyond the 24px icon if needed, or just let overflow happen */
.header-actions a.cart-icon-wrapper {
    width: auto;
    /* Override the fixed 24px from earlier if it conflicts */
    height: auto;
}

.cart-icon-wrapper svg {
    width: 24px;
    height: 24px;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background-color: var(--color-error-500-main);
    color: var(--color-neutral-100);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    box-shadow: 0 0 0 2px var(--color-neutral-100);
}

.cart-badge.hidden {
    display: none;
}

/* Footer (Base Styles - Desktop First as per previous turn) */
.footer {
    background-color: var(--color-neutral-100);
    padding: var(--spacing-80);
    width: 100%;
    box-sizing: border-box;
    color: var(--color-neutral-1100);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-32);
    max-width: 1440px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    align-items: center;
    gap: var(--spacing-16);
}

.footer-logo {
    width: 180px;
    height: 40px;
}

.footer-logo img,
.footer-logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-nav {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: var(--spacing-24);
    align-items: center;
}

.footer-nav a {
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--color-neutral-1100);
    text-transform: uppercase;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: var(--color-neutral-600);
}

.copyright {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-24);
    align-items: center;
    justify-content: flex-end;
}

.footer-legal a {
    text-decoration: underline;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: var(--color-neutral-600);
}

/* Mobile Responsive & Styleguide Mockup */
@media (max-width: 767px) {
    .footer {
        padding: var(--spacing-80) var(--spacing-16);
    }

    .footer-inner {
        gap: var(--spacing-40);
    }

    .footer-top {
        flex-direction: column;
        gap: var(--spacing-40);
        align-items: center;
    }

    .footer-logo {
        margin: 0 auto;
    }

    .footer-nav {
        flex-direction: column;
        gap: var(--spacing-24);
        align-items: center;
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: var(--spacing-40);
        align-items: center;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: var(--spacing-24);
        align-items: center;
        width: 100%;
    }
}

/* Styleguide Mockup Overrides (Explicit to ensure match inside .force-mobile) */
.force-mobile .footer {
    padding: var(--spacing-80) var(--spacing-16) !important;
}

.force-mobile .footer-inner {
    gap: var(--spacing-40) !important;
}

.force-mobile .footer-top {
    flex-direction: column !important;
    gap: var(--spacing-40) !important;
    align-items: center !important;
}

.force-mobile .footer-logo {
    margin: 0 auto !important;
}

.force-mobile .footer-nav {
    flex-direction: column !important;
    gap: var(--spacing-24) !important;
    align-items: center !important;
    width: 100% !important;
}

.force-mobile .footer-bottom {
    flex-direction: column-reverse !important;
    gap: var(--spacing-40) !important;
    align-items: center !important;
    text-align: center !important;
}

.force-mobile .footer-legal {
    flex-direction: column !important;
    gap: var(--spacing-24) !important;
    align-items: center !important;
    width: 100% !important;
}


/* MODAL style */

.modal-custom {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-custom.active {
  display: block;
}

/* fundo escuro + blur */
.modal-custom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* container do modal */
.modal-custom-dialog {
  position: relative;
  width: 100%;
  max-width: 1500px;
  height: 100vh;

  background: rgb(255, 255, 255);


  /* borda cinza transparente */
  border: 1px solid rgba(200, 200, 200, 0.25);

  /* efeito glass */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  /* sombra suave */
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    inset 0 1px 0 rgba(255,255,255,0.08);

  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-custom-header {
  border-bottom: 1px solid rgb(255, 255, 255);
  background: rgb(255, 255, 255);
}

.modal-custom-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: left;
  margin-left: 10px;
  min-height: 60px;
  border-bottom: 1px solid #e5e5e5;
}

.modal-custom-title {
  font-size: 20px;
  font-weight: 600;
}

.modal-custom-close {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.modal-custom-body {
  flex: 1;
}

.modal-custom-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {

  .modal-custom-dialog {
    width: 100%;
    max-width: 100%;
    height: 100vh;

    margin: 0;
    border-radius: 0;

    border: none;
  }

  .modal-custom-header {
    justify-content: flex-start;
    padding: 0 50px 0 15px;
  }

  .modal-custom-title {
    text-align: left;

    /* truncar texto */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    width: 100%;
    display: block;
  }

  .modal-custom-close {
    right: 10px;
  }

}
/* ─── Language Switcher (desktop) ─────────────────────────────── */
.header-actions .lang-switcher {
    position: relative;
    display: inline-block;
    width: auto;
    height: auto;
}

.header-actions .lang-switcher-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 0;
    color: inherit;
    font-family: inherit;
    transition: background-color 0.15s ease;
    width: auto;
    height: auto;
}

.lang-switcher-toggle:hover,
.lang-switcher.open .lang-switcher-toggle {
    background-color: rgba(0, 0, 0, 0.05);
}

.lang-switcher-current {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-neutral-700, #444);
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 100;
}

.lang-switcher.open .lang-switcher-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-actions .lang-switcher-menu li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header-actions .lang-switcher-item,
.lang-switcher-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
    text-decoration: none;
    color: var(--color-neutral-900, #111);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.12s ease;
}

.lang-switcher-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.lang-switcher-item.active {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
}

.lang-switcher-code {
    font-weight: 600;
    font-size: 12px;
    min-width: 22px;
    color: var(--color-neutral-600, #666);
}

.lang-switcher-item.active .lang-switcher-code {
    color: var(--color-primary-400-main, #c8111f);
}

.lang-switcher-name {
    flex: 1;
}

/* ─── Language Switcher (mobile, dentro do MobileMenu) ────────── */
.mobile-menu-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin: 18px 0;
}

.mobile-menu-lang-icon {
    display: inline-flex;
    align-items: center;
}

.mobile-menu-lang-item {
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 6px 10px;
    border-radius: 0;
    color: var(--color-neutral-600, #666);
    transition: all 0.15s ease;
}

.mobile-menu-lang-item:hover {
    color: var(--color-neutral-900, #111);
}

.mobile-menu-lang-item.active {
    color: var(--color-primary-400-main, #c8111f);
    background-color: rgba(200, 17, 31, 0.08);
}
