/**
 * AM Toolkit — Account dashboard
 *
 * Layout helpers for the Elementor account dashboard. The visual appearance
 * of the cards remains editable in Elementor; this file controls responsive
 * behaviour that should be consistent across breakpoints.
 */

.am-account-greeting {
    margin: 0;
    color: inherit;
    font-family: Poppins, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.55;
}

.am-account-greeting strong {
    font-weight: 600;
}

.am-account-profile {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    width: 100%;
    font-family: Poppins, sans-serif;
}

.am-account-profile__details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    min-width: 0;
    text-align: right;
}

.am-account-profile__name {
    color: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
}

.am-account-profile__login {
    color: #686868;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.am-account-profile__edit {
    color: #f176a4;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: color 160ms ease;
}

.am-account-profile__edit:hover {
    color: #d85f8d;
}

.am-account-profile__edit:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: 3px;
    border-radius: 3px;
}

.am-account-profile__avatar {
    flex: 0 0 auto;
    width: 112px;
    height: 112px;
}

.am-account-profile__avatar-image {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.am-account-recent-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: Poppins, sans-serif;
}

.am-account-recent-products__item {
    position: relative;
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
}

.am-account-recent-products__item::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: #f176a4;
    font-weight: 600;
}

.am-account-recent-products__link,
.am-account-recent-products__name {
    color: inherit;
}

.am-account-recent-products__link {
    font-weight: 500;
    text-decoration: none;
    transition: color 160ms ease;
}

.am-account-recent-products__link:hover {
    color: #f176a4;
}

.am-account-recent-products__link:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: 3px;
    border-radius: 3px;
}

.am-account-recent-products__empty {
    margin: 0;
    color: #686868;
    font: 400 15px/1.55 Poppins, sans-serif;
}

.am-account-last-order {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    font-family: Poppins, sans-serif;
}

.am-account-last-order__details {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.am-account-last-order__row {
    display: grid;
    grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1.3fr);
    gap: 12px;
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
}

.am-account-last-order__row dt,
.am-account-last-order__row dd {
    margin: 0;
}

.am-account-last-order__row dt {
    color: #686868;
    font-weight: 400;
}

.am-account-last-order__row dd {
    color: inherit;
    font-weight: 500;
}

.am-account-last-order__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

.am-account-last-order__button,
.am-account-last-order__all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.am-account-last-order__button {
    padding: 10px 20px;
    border-radius: 999px;
    background: #f176a4;
    color: #fff;
}

.am-account-last-order__button:hover {
    background: #d85f8d;
    color: #fff;
    transform: translateY(-1px);
}

.am-account-last-order__all {
    color: #f176a4;
}

.am-account-last-order__all:hover {
    color: #d85f8d;
}

.am-account-last-order__button:focus-visible,
.am-account-last-order__all:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: 3px;
}

.am-account-last-order__empty {
    margin: 0;
    color: #686868;
    font: 400 15px/1.55 Poppins, sans-serif;
}

.am-account-attention {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: Poppins, sans-serif;
}

.am-account-attention__item {
    margin: 0;
}

.am-account-attention__link {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid rgba(241, 118, 164, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.am-account-attention__link:hover {
    border-color: rgba(241, 118, 164, 0.58);
    background: rgba(255, 255, 255, 0.9);
    color: inherit;
    transform: translateX(2px);
}

.am-account-attention__link:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: 3px;
}

.am-account-attention__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f176a4;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.am-account-attention__arrow {
    color: #f176a4;
    font-size: 18px;
    line-height: 1;
}

.am-account-attention__empty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: #4f6658;
    font: 400 14px/1.55 Poppins, sans-serif;
}

.am-account-attention__empty span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #edf8f2;
    color: #31845a;
    font-weight: 700;
}

.am-account-shortcuts {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    overflow: hidden;
}

.am-account-shortcuts,
.am-account-shortcuts > .e-con-inner,
.am-account-shortcuts__track {
    box-sizing: border-box;
}

.am-account-shortcuts > .e-con-inner {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.am-account-shortcuts__track {
    display: flex;
    flex-wrap: nowrap !important;
    flex: 0 1 auto !important;
    gap: 20px;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-padding-inline: 20px;
    scroll-snap-type: inline mandatory;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
    scrollbar-width: thin;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    contain: inline-size;
}

.am-account-shortcuts__track::-webkit-scrollbar {
    height: 5px;
}

.am-account-shortcuts__track::-webkit-scrollbar-track {
    background: transparent;
}

.am-account-shortcuts__track::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 999px;
}

.am-account-shortcut {
    flex: 1 0 240px !important;
    width: auto !important;
    min-width: 240px !important;
    max-width: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.am-account-shortcut.is-coming-soon {
    position: relative;
}

.am-account-shortcut.is-coming-soon::after {
    content: "W budowie";
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #7a483e;
    font: 600 11px/1.2 Poppins, sans-serif;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.am-account-shortcut-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    min-height: 180px;
    padding: 22px;
    color: inherit;
    font-family: Poppins, sans-serif;
    text-decoration: none;
}

.am-account-shortcut-content:not(.is-disabled) {
    cursor: pointer;
}

.am-account-shortcut-content__icon {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    width: 42px;
    height: 42px;
    color: #6d7884;
}

.am-account-shortcut-content__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.am-account-shortcut-content__title {
    padding-right: 32px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.am-account-shortcut-content__description {
    padding-right: 44px;
    color: #4f4f4f;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.am-account-shortcut-content__arrow {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(241, 118, 164, 0.2);
    background: #fff;
    color: #f176a4;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(66, 39, 49, 0.12);
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.am-account-shortcut-content__arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.am-account-shortcut-content:not(.is-disabled):hover {
    color: inherit;
}

.am-account-shortcut-content:not(.is-disabled):hover .am-account-shortcut-content__arrow {
    background: #fff;
    color: #d85f8d;
    box-shadow: 0 7px 18px rgba(216, 95, 141, 0.22);
    transform: translateX(3px) scale(1.04);
}

.am-account-shortcut-content:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: -4px;
    border-radius: 22px;
}

.am-account-shortcut-content.is-disabled {
    opacity: 0.72;
}

.am-account-products-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: Poppins, sans-serif;
}

.am-account-products-summary__link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 18px;
}

.am-account-products-summary__link:hover {
    color: inherit;
}

.am-account-products-summary__link:focus-visible {
    outline: 2px solid #f176a4;
    outline-offset: 5px;
}

.am-account-products-summary-card {
    position: relative;
    cursor: pointer;
}

.am-account-products-summary-card .am-account-products-summary__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    border-radius: inherit;
}

.am-account-products-summary__item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
}

.am-account-products-summary__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #f176a4;
    font-size: 13px;
    font-weight: 700;
}

.am-account-products-summary__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #7a483e;
    font-size: 13px;
    font-weight: 600;
}

/* Full purchased-products endpoint. */
.am-products-page {
    min-height: calc(100vh - 180px);
    padding: clamp(54px, 7vw, 100px) 20px clamp(70px, 9vw, 130px);
    background: #f8f4f2;
}

.am-products-page__inner {
    width: min(1360px, 100%);
    margin: 0 auto;
}

.am-purchased-products {
    --am-products-pink: #f176a4;
    --am-products-pink-dark: #d85f8d;
    --am-products-ink: #33271f;
    --am-products-muted: #686868;
    --am-products-border: #d9d9d9;
    display: flex;
    flex-direction: column;
    gap: 34px;
    width: 100%;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--am-products-border);
    border-radius: 25px;
    background: #fff;
    color: var(--am-products-ink);
    font-family: Poppins, sans-serif;
}

.am-purchased-products__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px dashed #d7d2cf;
}

.am-purchased-products__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--am-products-pink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.am-purchased-products__title {
    margin: 0;
    color: var(--am-products-ink);
    font-family: "buffalo-regular", "Buffalo", cursive;
    font-size: 46px;
    font-weight: 400;
    line-height: 1.15;
}

.am-purchased-products__intro {
    max-width: 650px;
    margin: 10px 0 0;
    color: var(--am-products-muted);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

.am-purchased-products__total,
.am-purchased-products__group-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #faedf2;
    color: #9b4c6a;
    font-weight: 600;
    white-space: nowrap;
}

.am-purchased-products__total {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
}

.am-purchased-products__group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.am-purchased-products__group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.am-purchased-products__group-header h3 {
    margin: 0;
    color: var(--am-products-ink);
    font-size: clamp(21px, 3vw, 27px);
    font-weight: 600;
    line-height: 1.25;
}

.am-purchased-products__group-header span {
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    font-size: 12px;
}

.am-purchased-products__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.am-purchased-product {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e1dddd;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(56, 37, 31, 0.07);
}

.am-purchased-product__image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f7f1ed;
}

.am-purchased-product__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.am-purchased-product__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px;
}

.am-purchased-product__date {
    color: var(--am-products-muted);
    font-size: 12px;
    font-weight: 400;
}

.am-purchased-product h4 {
    margin: 0;
    color: var(--am-products-ink);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}

.am-purchased-product__action,
.am-purchased-product__unavailable {
    margin-top: auto;
    padding-top: 8px;
    font-size: 13px;
    font-weight: 600;
}

.am-purchased-product__action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--am-products-pink);
    text-decoration: none;
}

.am-purchased-product__action:hover {
    color: var(--am-products-pink-dark);
}

.am-purchased-product__action:focus-visible {
    outline: 2px solid var(--am-products-pink);
    outline-offset: 3px;
    border-radius: 3px;
}

.am-purchased-product__unavailable {
    color: var(--am-products-muted);
}

.am-purchased-products__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 16px 18px;
    border: 1px dashed #ded7d3;
    border-radius: 18px;
    background: #fbf8f6;
}

.am-purchased-products__empty span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    color: var(--am-products-pink);
    font-weight: 700;
}

.am-purchased-products__empty p {
    margin: 0;
    color: var(--am-products-muted);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .am-account-profile {
        gap: 14px;
    }

    .am-account-profile__avatar {
        width: 96px;
        height: 96px;
    }

    .am-account-shortcuts__track {
        gap: 14px;
        scroll-padding-inline: 14px;
    }

    .am-account-shortcut {
        flex-basis: min(78vw, 290px) !important;
        width: min(78vw, 290px) !important;
        min-width: min(78vw, 290px) !important;
        max-width: 290px !important;
    }

    .am-purchased-products {
        gap: 28px;
        padding: 22px 16px;
    }

    .am-products-page {
        min-height: calc(100vh - 120px);
        padding: 42px 10px 70px;
    }

    .am-purchased-products__header {
        flex-direction: column;
        padding-bottom: 22px;
    }

    .am-purchased-products__title {
        font-size: 40px;
    }

    .am-purchased-products__grid {
        grid-template-columns: 1fr;
    }

    .am-purchased-product {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
    }

    .am-purchased-product__image {
        height: 100%;
        min-height: 158px;
        aspect-ratio: auto;
    }

    .am-purchased-product__content {
        padding: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .am-purchased-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .am-account-shortcuts__track {
        scroll-behavior: auto;
    }
}
