:root {
    --color-primary: #FF477E;
    --color-secondary: #3D0C59;
    --color-accent-1: #FFD166;
    --color-accent-2: #06D6A0;
    --color-bg: #FFF9F5;
    --card-shadow: 0 10px 20px rgba(61, 12, 89, 0.08);
    --hover-shadow: 0 15px 30px rgba(255, 71, 126, 0.2);
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--color-bg);
    color: #2d3436;
    overflow-x: hidden;
}

/* ── Recent Cards Widget & Offcanvas ── */

.recent-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1040;
    animation: fadeIn 0.2s ease;
}

.recent-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 360px;
    max-width: 100vw;
    background: #fff;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(61, 12, 89, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.recent-offcanvas.open {
    transform: translateX(0);
}

.recent-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.recent-offcanvas-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.recent-close-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #888;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.recent-close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.recent-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: #aaa;
}

.recent-offcanvas-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--color-bg);
    border-radius: 12px;
    transition: box-shadow 0.2s;
}

.recent-item-card:hover {
    box-shadow: 0 2px 8px rgba(61, 12, 89, 0.1);
}

.recent-item-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.recent-item-thumb {
    width: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8e0ef;
    background: #fff;
}

.card-thumbnail {
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    width: 100%;
    background-size: cover;
    background-repeat: repeat;
}

.card-thumbnail .thumb-element {
    position: absolute;
}

.card-thumbnail img {
    display: block;
}

.card-thumbnail svg {
    display: block;
    width: 100%;
    height: 100%;
}

.recent-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.recent-item-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item-date {
    font-size: 0.75rem;
    color: #aaa;
}

.recent-item-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.recent-btn-continue {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.recent-btn-continue:hover {
    background: #fff0f4;
}

.recent-btn-remove {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
}

.recent-btn-remove:hover {
    background: #fff0f0;
    color: #dc3545;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Finish Order button (PersonalizeCard top bar) ── */

.btn-finish-order {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    background: linear-gradient(135deg, var(--color-primary), #c9356b);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-finish-order:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-edit-hover {
    background: white;
    color: var(--color-primary);
    font-weight: 800;
    padding: 10px 25px;
    border-radius: 30px;
    transform: translateY(20px);
    transition: transform 0.3s;
}

/* ── Auth Pages (Login / Register) ── */

.auth-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--card-shadow);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    display: block;
}

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: #999;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

.auth-field {
    margin-bottom: 1.25rem;
}

.auth-field label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-secondary);
    margin-bottom: 0.4rem;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    background: #f9f9f9;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 71, 126, 0.1);
}

.auth-remember {
    margin-bottom: 1.25rem;
}

.auth-remember label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--color-primary), #c9356b);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.auth-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-footer span {
    color: #999;
}

.auth-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    margin-left: 0.3rem;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ── Auth Dropdown (NavMenu) ── */

.auth-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(61, 12, 89, 0.12);
    padding: 0.5rem 0;
    min-width: 200px;
}

.auth-dropdown .dropdown-header {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--color-secondary);
    padding: 0.5rem 1rem;
}

.auth-dropdown .dropdown-item {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    color: #555;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.auth-dropdown .dropdown-item:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

/* ── Legal pages (Terms, Refunds, Privacy) ── */

.legal-page {
    max-width: 820px;
}

.legal-page h1 {
    color: var(--color-secondary, #3D0C59);
    margin-bottom: 1rem;
}

.legal-page h2 {
    color: var(--color-primary, #FF477E);
    margin-top: 2rem;
    font-size: 1.4rem;
}

.legal-page p,
.legal-page li {
    font-size: 1rem;
    line-height: 1.7;
}

.legal-page a {
    color: var(--color-primary, #FF477E);
    text-decoration: underline;
}

/* ── Cookie consent banner ── */

.cookie-banner {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--color-primary, #FF477E);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 9999;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    font-size: .95rem;
}

.cookie-banner a {
    color: var(--color-primary, #FF477E);
    text-decoration: underline;
}

.btn-cookie-accept {
    background: var(--color-primary, #FF477E);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .5rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-cookie-accept:hover {
    filter: brightness(1.05);
}

@media (max-width: 540px) {
    .cookie-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ── Footer legal links row ── */

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem .75rem;
    text-align: center;
}

.footer-legal-link {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    font-size: .9rem;
}

.footer-legal-link:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-legal-sep {
    color: rgba(255, 255, 255, .35);
    font-size: .9rem;
}

@media (max-width: 540px) {
    .footer-legal-sep {
        display: none;
    }

    .footer-legal {
        flex-direction: column;
        gap: .5rem;
    }
}
