/* ============================================================
   Papelaria (App) — Impressora Online
   CSS exclusivo do template "taxonomy-product_cat-papelaria.php"
   ============================================================ */

:root {
    --iah-bg: #ffffff;
    --iah-surface: #f7f7f7;
    --iah-text: #2b2b2b;
    --iah-text-muted: #777777;
    --iah-border: #e5e5e5;

    --iah-coral: #d6543f;
    --iah-coral-rgb: 214, 84, 63;
    --iah-plum: #7d5a8c;
    --iah-plum-rgb: 125, 90, 140;
    --iah-blue: #3f6d8c;
    --iah-blue-rgb: 63, 109, 140;
    --iah-green: #3f7d5c;
    --iah-green-rgb: 63, 125, 92;
    --iah-gold: #c9a13b;
    --iah-gold-rgb: 201, 161, 59;

    --iah-green-brand: #02626d;
    --iah-green-brand-hover: #024c54;

    --iah-font-heading: 'Poppins', Arial, Helvetica, sans-serif;
    --iah-font-body: 'Lato', Arial, Helvetica, sans-serif;

    --iah-radius: 20px;
    --iah-radius-sm: 12px;
    --iah-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --iah-shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.14);
}

/* ============================================================
   Reset & base
   ============================================================ */
body.imp-app-home,
body.imp-app-home *,
body.imp-app-home *::before,
body.imp-app-home *::after {
    box-sizing: border-box;
}

body.imp-app-home {
    background: var(--iah-bg) !important;
    color: var(--iah-text) !important;
    font-family: var(--iah-font-body) !important;
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
}

.imp-app-home h1,
.imp-app-home h2,
.imp-app-home h3 {
    font-family: var(--iah-font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.5em;
    color: var(--iah-text);
}

.imp-app-home a {
    color: inherit;
    text-decoration: none;
}

.imp-app-home img {
    max-width: 100%;
    display: block;
}

.imp-app-home ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.imp-app-home button {
    font-family: inherit;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.iah-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.iah-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.iah-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--iah-coral);
    color: #fff;
    padding: 10px 16px;
    z-index: 1000;
    border-radius: 0 0 8px 0;
    font-weight: 700;
}

.iah-skip-link:focus {
    left: 0;
}

/* ============================================================
   Topbar
   ============================================================ */
.iah-topbar {
    background: var(--iah-bg);
    border-bottom: 1px solid var(--iah-border);
}

.iah-topbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.iah-logo {
    flex-shrink: 0;
}

.iah-logo img {
    height: 40px;
    width: auto;
}

.iah-search {
    flex: 1;
    display: flex;
    position: relative;
    max-width: 480px;
}

.iah-search input[type="search"] {
    flex: 1;
    border: 1px solid var(--iah-border);
    border-radius: 999px;
    padding: 10px 48px 10px 18px;
    font-size: 14px;
    font-family: var(--iah-font-body);
    background: var(--iah-surface);
    color: var(--iah-text);
}

.iah-search input[type="search"]:focus {
    outline: 2px solid var(--iah-coral);
    outline-offset: 1px;
}

.iah-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    bottom: 4px;
    width: 40px;
    border: none;
    border-radius: 50%;
    background: var(--iah-green-brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.iah-search button:hover {
    background: var(--iah-green-brand-hover);
}

.iah-search button .iah-icon {
    width: 18px;
    height: 18px;
}

.iah-search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--iah-bg);
    border: 1px solid var(--iah-border);
    border-radius: var(--iah-radius-sm);
    box-shadow: var(--iah-shadow);
    z-index: 60;
    max-height: 380px;
    overflow-y: auto;
}

.iah-search-suggestions[hidden] {
    display: none;
}

.iah-search-suggestion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--iah-text);
    border-bottom: 1px solid var(--iah-border);
}

.iah-search-suggestion:last-child {
    border-bottom: none;
}

.iah-search-suggestion:hover {
    background: var(--iah-surface);
}

.iah-search-suggestion__img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: var(--iah-surface);
    display: flex;
    align-items: center;
    justify-content: center;
}

.iah-search-suggestion__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.iah-search-suggestion__info {
    flex: 1;
    min-width: 0;
}

.iah-search-suggestion__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--iah-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iah-search-suggestion__price {
    display: block;
    font-size: 13px;
    color: var(--iah-green-brand);
    font-weight: 700;
}

.iah-search-suggestion__price del {
    color: var(--iah-text-muted);
    font-weight: 400;
    margin-right: 4px;
    text-decoration: line-through;
}

.iah-search-suggestion__price ins {
    text-decoration: none;
}

.iah-search-suggestions__viewall {
    display: block;
    text-align: center;
    padding: 12px 14px;
    font-family: var(--iah-font-heading);
    font-weight: 700;
    font-size: 13px;
    color: var(--iah-green-brand);
    text-decoration: none;
    border-top: 1px solid var(--iah-border);
}

.iah-search-suggestions__viewall:hover {
    background: var(--iah-surface);
}

.iah-search-suggestions__empty {
    padding: 14px;
    font-size: 13px;
    color: var(--iah-text-muted);
    text-align: center;
}

.iah-topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.iah-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--iah-surface);
    border: 1px solid var(--iah-border);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.iah-icon-btn:hover {
    background: var(--iah-green-brand);
    color: #fff;
    border-color: var(--iah-green-brand);
}

.iah-icon-btn .iah-icon {
    width: 22px;
    height: 22px;
}

.iah-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--iah-coral);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.iah-mobile-menu-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--iah-border);
    border-radius: 999px;
    background: var(--iah-surface);
    color: var(--iah-text);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.iah-mobile-menu-toggle .iah-icon {
    width: 20px;
    height: 20px;
}

/* ============================================================
   Navegação principal
   ============================================================ */
.iah-mainnav {
    background: var(--iah-green-brand);
    color: #fff;
}

.iah-mainnav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.iah-mainnav__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.iah-mainnav__item {
    position: relative;
}

.iah-mainnav__item > a,
.iah-mainnav__item summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    font-family: var(--iah-font-heading);
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    list-style: none;
    transition: background 0.15s ease;
}

.iah-mainnav__item summary::-webkit-details-marker {
    display: none;
}

.iah-mainnav__item > a:hover,
.iah-mainnav__item summary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.iah-mainnav__item details[open] > summary {
    background: rgba(255, 255, 255, 0.16);
}

.iah-menu-caret {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}

.iah-mainnav__item details[open] > summary .iah-menu-caret {
    transform: rotate(90deg);
}

.iah-mainnav__panel {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 240px;
    background: var(--iah-bg);
    color: var(--iah-text);
    border-radius: 0 0 var(--iah-radius-sm) var(--iah-radius-sm);
    box-shadow: var(--iah-shadow-hover);
    padding: 12px;
}

.iah-menu-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.iah-menu-item > a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--iah-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--iah-text);
}

.iah-menu-item > a:hover {
    background: var(--iah-surface);
}

.iah-menu-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 10px 12px;
    border-radius: var(--iah-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--iah-text);
    cursor: pointer;
    list-style: none;
}

.iah-menu-item summary::-webkit-details-marker {
    display: none;
}

.iah-menu-item summary:hover {
    background: var(--iah-surface);
}

.iah-menu-item details[open] > summary .iah-menu-caret {
    transform: rotate(90deg);
}

.iah-submenu {
    padding-left: 16px;
    margin-top: 2px;
}

.iah-submenu__viewall {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--iah-green-brand);
    border-bottom: 1px solid var(--iah-border);
    margin-bottom: 4px;
}

.iah-submenu__viewall:hover {
    text-decoration: underline;
}

/* ============================================================
   Menu mobile (aba lateral)
   ============================================================ */
body.iah-no-scroll {
    overflow: hidden;
}

.iah-mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.iah-mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.iah-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 86vw;
    background: var(--iah-bg);
    color: var(--iah-text);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1001;
    overflow-y: auto;
    box-shadow: var(--iah-shadow-hover);
}

.iah-mobile-menu.is-open {
    transform: translateX(0);
}

.iah-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--iah-border);
    font-family: var(--iah-font-heading);
    font-weight: 700;
    font-size: 16px;
}

.iah-mobile-menu-close {
    border: none;
    background: var(--iah-surface);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.iah-mobile-menu-close .iah-icon {
    width: 18px;
    height: 18px;
}

.iah-mobile-menu__nav {
    padding: 12px;
}

.iah-mobile-menu__nav .iah-menu-item > a,
.iah-mobile-menu__nav .iah-menu-item summary {
    font-size: 15px;
}

.iah-mobile-menu__nav .iah-submenu__viewall {
    color: var(--iah-coral);
}

/* ============================================================
   Hero
   ============================================================ */
.iah-hero {
    padding: 40px 0 24px;
    text-align: center;
}

.iah-hero h1 {
    font-size: clamp(28px, 5vw, 44px);
}

.iah-hero__subtitle {
    color: var(--iah-text-muted);
    font-size: 18px;
    margin: 0 0 32px;
}

/* ============================================================
   Secções genéricas
   ============================================================ */
.iah-section {
    padding: 48px 0;
}

.iah-section h2 {
    font-size: clamp(24px, 4vw, 32px);
    text-align: center;
    margin-bottom: 28px;
}

/* ============================================================
   Produtos
   ============================================================ */
.iah-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 700px) {
    .iah-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .iah-product-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.iah-product-card {
    background: var(--iah-surface);
    border: 1px solid var(--iah-border);
    border-radius: var(--iah-radius-sm);
    overflow: hidden;
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.iah-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--iah-shadow-hover);
}

.iah-product-card:active {
    transform: translateY(1px);
}

.iah-product-card__img {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
}

.iah-product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.iah-product-card__placeholder {
    width: 64px;
    height: 64px;
    color: var(--iah-green-brand);
}

.iah-product-card__body {
    display: block;
    padding: 12px;
}

.iah-product-card h3 {
    font-family: var(--iah-font-body);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.iah-product-card__price {
    color: var(--iah-coral);
    font-weight: 700;
    font-size: 14px;
}

.iah-product-card__price del {
    color: var(--iah-text-muted);
    font-weight: 400;
    margin-right: 4px;
}

/* ============================================================
   Rodapé
   ============================================================ */
.iah-footer {
    background: #1f2933;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 48px;
}

.iah-footer__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    padding: 48px 0;
}

@media (min-width: 900px) {
    .iah-footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.iah-footer__col h3 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 16px;
}

.iah-footer__col p {
    margin: 0 0 16px;
    font-size: 14px;
}

.iah-footer__col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.iah-footer__col a {
    font-size: 14px;
    transition: color 0.15s ease;
}

.iah-footer__col a:hover {
    color: #fff;
}

.iah-footer__social {
    display: flex;
    gap: 10px;
}

.iah-footer__social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.iah-footer__social a:hover {
    background: var(--iah-green-brand);
}

.iah-footer__social .iah-icon {
    width: 18px;
    height: 18px;
}

.iah-footer__livro img {
    display: block;
}

.iah-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
}

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 640px) {
    .iah-topbar__inner {
        flex-wrap: wrap;
    }

    .iah-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .iah-mainnav {
        display: none;
    }

    .iah-mobile-menu-toggle {
        display: flex;
    }

    .iah-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}
