/* ==========================================================================
   AESTIA 3D — ACCOUNT PAGE DESIGN SYSTEM
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

:root {
    --primary-color: var(--rose); --accent-color: var(--blush);
    --text-color: var(--ink); --background-color: var(--snow);
    --success-color: #4caf50; --error-color: var(--rose-dark);
    --border-radius: 8px;
    --box-shadow: 0 8px 32px rgba(212,96,126,0.06);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --header-height: 85px;
}

body {
    font-family: 'Jost', sans-serif; color: var(--text-color);
    background-color: var(--background-color); line-height: 1.6;
    overflow-x: hidden; -webkit-font-smoothing: antialiased;
    min-height: 100vh; display: flex; flex-direction: column;
}

main { flex-grow: 1; margin-bottom: 2rem; padding-bottom: 100px; }
a { text-decoration: none; color: inherit; }
button { border: none; font-family: inherit; background: none; cursor: pointer; }
input { font-family: inherit; }

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }


@media (pointer: coarse) {  }

/* GRAIN OVERLAY */
body::before {
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 600;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23g)' opacity='0.025'/%3E%3C/svg%3E");
    opacity: .45;
}

/* TYPOGRAPHY */
.eyebrow { font-size: .58rem; letter-spacing: .55em; text-transform: uppercase; font-weight: 600; color: var(--blush); margin-bottom: 14px; display: flex; align-items: center; gap: 14px; }
.eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--blush); }
.sec-title { font-family: 'Cormorant', serif; font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 300; line-height: 1; color: var(--ink); margin-bottom: 1rem; }
.sec-title em { font-style: italic; color: var(--rose); }

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
    background-color: rgba(255,250,252,.96);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 var(--border-soft);
    height: var(--header-height);
}
.hamburger-btn { display: none; font-size: 1.4rem; color: var(--ink); padding: 10px; }
.close-drawer-btn { display: none; font-size: 1.5rem; color: var(--ink); position: absolute; top: 20px; right: 24px; padding: 10px; }
.drawer-overlay { display: none; position: fixed; inset: 0; background: transparent; z-index: 1001; backdrop-filter: none; opacity: 0; transition: opacity 0.4s; pointer-events: auto; }
.drawer-overlay.active { display: block; opacity: 0.01; }
.nav-drawer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
}
.left-section { display: flex; align-items: center; gap: 14px; }
.account-container { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.account-circle { font-size: 1.5rem; color: var(--warm); transition: color 0.3s; }
.user-status { font-size: .75rem; letter-spacing: .12em; font-weight: 600; padding: 8px 12px; border: 1px solid var(--border-soft); color: var(--text-muted); text-transform: uppercase; border-radius: 999px; }
.dropdown-menu { position: absolute; top: calc(100% + 15px); left: 0; width: 220px; background-color: rgba(255,250,252,.98); backdrop-filter: blur(25px); border: 1px solid var(--border-soft); box-shadow: var(--box-shadow); display: none; z-index: 1001; border-radius: var(--border-radius); }
.dropdown-menu.open { display: block; }
.dropdown-menu a { display: block; padding: 14px 22px; color: var(--warm); font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 500; border-bottom: 1px solid var(--border-soft); transition: var(--transition); }
.dropdown-menu a:hover { background-color: var(--petal); color: var(--rose); padding-left: 28px; }
.drawer-actions { display: flex; gap: 15px; align-items: center; pointer-events: auto; }
.btn-label { display: none; }
.header-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    width: auto;
    height: 100%;
}
.header-logo img.site-logo { display: block; height: 52px; width: auto; max-width: 160px; }
.header-logo::after { content: none; }
.header-logo .aes,
.header-logo .tia3d { display: none; }
.icon-action-btn { display: flex; align-items: center; justify-content: center; background-color: transparent; border: 1px solid var(--border-soft); color: var(--warm); width: 42px; height: 42px; font-size: 1rem; position: relative; transition: var(--transition); border-radius: 50%; }
.icon-action-btn:hover { border-color: var(--rose); color: var(--rose); background-color: var(--petal); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(212,96,126,0.1); }
.icon-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
#cart-count, #favorites-count { position: absolute; top: -5px; right: -5px; background-color: var(--rose); color: white; font-family: 'Jost', sans-serif; font-size: 0.65rem; font-weight: 600; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--snow); }

/* ==========================================================================
   MAIN CONTAINER & PROFILE HERO
   ========================================================================== */
.main-container { max-width: 1200px; margin: 2rem auto; padding: 0 68px; }

.profile-hero {
    background: rgba(255,255,255,0.7); backdrop-filter: blur(20px);
    border: 1px solid var(--border-soft); border-radius: 20px;
    padding: 3rem; text-align: center; margin-bottom: 2.5rem;
    box-shadow: 0 12px 48px rgba(212,96,126,0.04);
}

.profile-pic-container { position: relative; width: 140px; height: 140px; margin: 0 auto 2rem; }
.profile-pic { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 4px solid var(--snow); box-shadow: var(--box-shadow); background: var(--petal); }
.profile-pic img { width: 100%; height: 100%; object-fit: cover; }
.profile-pic-container::after { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; bottom: 5px; right: 8px; font-size: 1.5rem; color: var(--success-color); background: white; border-radius: 50%; }

.profile-info h2 { font-family: 'Cormorant', serif; font-size: 2.4rem; font-weight: 500; color: var(--ink); margin-bottom: 1.52rem; letter-spacing: -0.01em; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; max-width: 600px; margin: 0 auto; }
.detail-item { display: flex; flex-direction: column; gap: 4px; padding: 1rem; background: var(--petal); border-radius: 12px; border: 1px solid var(--border-soft); transition: var(--transition); }
.detail-item:hover { transform: translateY(-4px); background: #fffafc; border-color: var(--rose); }
.detail-item label { font-size: 0.6rem; letter-spacing: 0.2rem; text-transform: uppercase; font-weight: 600; color: var(--blush); }
.detail-item span { font-size: 0.95rem; font-weight: 500; color: var(--ink); word-break: break-all; }

.id-item { cursor: pointer; transition: var(--transition); position: relative; }
.id-flex { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; }
.copy-icon { font-size: 0.8rem; color: var(--blush); opacity: 0; transition: var(--transition); transform: translateY(2px); }
.id-item:hover .copy-icon { opacity: 1; color: var(--rose); transform: translateY(0); }
.id-item:active { transform: scale(0.98); }

/* ==========================================================================
   ACTION CARDS
   ========================================================================== */
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; margin-bottom: 3.5rem; }
.action-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(15px); border: 1px solid var(--border-soft); border-radius: 16px; padding: 2rem; box-shadow: var(--box-shadow); transition: var(--transition); }
.action-card:hover { border-color: var(--rose); transform: translateY(-4px); }
.action-card h3 { font-family: 'Cormorant', serif; font-size: 1.5rem; font-weight: 500; color: var(--ink); margin-bottom: 1.5rem; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 24px; border-radius: 8px; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 600; transition: var(--transition); cursor: pointer; }
.btn.primary { background: linear-gradient(135deg, var(--rose), var(--rose-dark)); color: white; box-shadow: 0 8px 20px rgba(212,96,126,0.2); }
.btn.secondary { background: var(--snow); border: 1px solid var(--border-soft); color: var(--warm); }
.btn.danger { background: transparent; border: 1px solid var(--border-soft); color: var(--rose-dark); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(212,96,126,0.1); }
.btn.danger:hover { background: var(--petal); border-color: var(--rose); }

.action-buttons { display: flex; flex-direction: column; gap: 12px; }
.edit-controls { display: flex; flex-direction: column; gap: 10px; background: var(--petal); padding: 1rem; border-radius: 12px; border: 1px dashed var(--rose); }
.edit-controls input { padding: 12px; border-radius: 8px; border: 1px solid var(--border-soft); font-size: 0.9rem; outline: none; }
.edit-btns { display: flex; gap: 10px; }
.edit-btns .btn { flex: 1; }

.links-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.link-item { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 1.5rem; background: var(--petal); border-radius: 12px; border: 1px solid transparent; transition: var(--transition); font-size: 0.72rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.1em; color: var(--warm); }
.link-item i { font-size: 1.4rem; color: var(--rose); }
.link-item:hover { background: #fffafc; border-color: var(--rose); transform: scale(1.02); color: var(--rose); }

/* ==========================================================================
   RECENTLY VIEWED
   ========================================================================== */
.recently-viewed { padding-top: 1rem; }
.header-flex { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2rem; flex-wrap: wrap; gap: 15px; }
.btn-text { font-size: 0.65rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.15em; color: var(--rose); display: flex; align-items: center; gap: 8px; padding: 8px 0; opacity: 0.8; transition: var(--transition); }
.btn-text:hover { opacity: 1; transform: scale(1.05); }

.recently-viewed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.product-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border: 1px solid var(--border-soft); border-radius: 12px; padding: 0; transition: var(--transition); overflow: hidden; }
.product-card:hover { transform: translateY(-8px); border-color: var(--rose); box-shadow: 0 16px 40px rgba(212,96,126,0.06); }
.product-card img { width: 100%; height: 180px; object-fit: cover; background: var(--petal); border-radius: 0; margin-bottom: 1rem; padding: 0; }
.product-title { padding: 0 1.2rem; font-family: 'Cormorant', serif; font-size: 1.1rem; font-weight: 600; color: var(--ink); margin-bottom: 0.8rem; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { padding: 0 1.2rem 1.2rem 1.2rem; display: flex; align-items: center; gap: 8px; }
.discounted-price { color: var(--rose-dark); font-weight: 600; font-size: 1.1rem; }
.original-price { font-size: 0.8rem; color: var(--text-muted); text-decoration: line-through; opacity: 0.6; }
.discount-badge { font-size: 0.65rem; background: var(--success-color); color: white; padding: 3px 8px; border-radius: 4px; font-weight: 600; }

.loading { text-align: center; padding: 3rem; font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); width: 100%; grid-column: 1 / -1; }

/* ==========================================================================
   NOTIFICATION SYSTEM
   ========================================================================== */
.notification { position: fixed; top: 100px; right: 2rem; background: var(--ink); color: white; padding: 1rem 2rem; border-radius: 8px; z-index: 2000; box-shadow: 0 12px 32px rgba(0,0,0,0.2); animation: slideIn 0.4s ease forwards; display: none; }
@keyframes slideIn { from { transform: translateX(120%); } to { transform: translateX(0); } }

/* ==========================================================================
   BOTTOM NAVIGATION
   ========================================================================== */
.bottom-navigation { position: fixed; bottom: 0; left: 0; width: 100%; height: 70px; background-color: rgba(255,250,252,.98); backdrop-filter: blur(15px); display: flex; justify-content: space-around; align-items: center; border-top: 1px solid var(--border-soft); z-index: 1000; padding-bottom: env(safe-area-inset-bottom); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); font-size: .55rem; letter-spacing: .1em; text-transform: uppercase; width: 20%; transition: color 0.3s; font-weight: 500; }
.nav-item i { font-size: 1.3rem; margin-bottom: 6px; }
.nav-item.active, .nav-item:hover { color: var(--rose-dark); }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    header, .main-container { padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 768px) {
    :root { --header-height: 70px; }
    header { padding: 0 20px; justify-content: space-between; }
    .hamburger-btn { display: block; z-index: 1002; }
    .header-logo { left: 50%; transform: translateX(-50%); }
    .nav-drawer { position: fixed; top: 0; left: -100%; width: 300px; height: 100vh; background: #fff; backdrop-filter: none; flex-direction: column; justify-content: flex-start; padding: 80px 24px 24px; transition: left 0.4s cubic-bezier(0.25,0.46,0.45,0.94); z-index: 1003; display: flex; box-shadow: 4px 0 24px rgba(0,0,0,0.08); }
    .nav-drawer.open { left: 0; }
    .close-drawer-btn { display: block; }
    .left-section { flex-direction: column; align-items: flex-start; margin-bottom: 30px; }
    .drawer-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; }
    .drawer-actions .icon-action-btn { min-width: 100px; flex: 1 1 auto; }
    .dropdown-menu { position: static; display: block !important; box-shadow: none; border: none; background: transparent; padding-left: 0; width: 100%; margin-top: 20px; }
    .dropdown-menu a { padding: 12px 0; border-bottom: 1px solid rgba(244,184,204,0.2); font-size: 0.75rem; }
    .drawer-actions { flex-direction: column; gap: 15px; align-items: stretch; margin: 0; border-top: 1px solid var(--border-soft); padding-top: 30px; grid-column: unset; }
    .icon-action-btn { width: 100%; justify-content: flex-start; border: none; border-radius: 0; background: transparent; height: auto; padding: 10px 0; }
    .icon-action-btn:hover { background: transparent; transform: none; color: var(--rose-dark); }
    .btn-label { display: inline-block; margin-left: 15px; font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; }
    
    .profile-hero { padding: 2rem 1rem; }
    .main-container { padding: 0 16px; margin: 1rem auto; }
    body { padding-bottom: 80px; }
}

@media (max-width: 480px) {
    .profile-info h2 { font-size: 1.8rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .action-grid { gap: 16px; }
    .links-grid { grid-template-columns: 1fr; }
}

.noscript-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.noscript-card { background: white; padding: 2.5rem; border-radius: 20px; text-align: center; max-width: 400px; }
.noscript-card h2 { font-family: 'Cormorant', serif; margin-bottom: 1rem; }