/* ArtVerse — เมนูบัญชี (Hamburger) และปุ่มโปรไฟล์บนหัวเว็บ
   ไฟล์นี้เป็นส่วนหนึ่งของ css/parts/*.css โหลดตามลำดับเลขหน้าไฟล์ (ลำดับมีผล: ไฟล์หลังทับไฟล์ก่อน) */

/* =========================================================
   Account drawer + account page (reference layout)
   ========================================================= */
body.drawer-open,body.modal-open{overflow:hidden}
.topbar{grid-template-columns:auto auto minmax(240px,460px) auto}
.menu-btn{display:inline-flex!important;flex:0 0 auto;font-size:20px;line-height:1}
.actions .menu-btn{order:99}
.drawer-overlay{
  position:fixed;inset:0;
  background:rgba(241,245,249,.78);
  backdrop-filter:blur(3px) saturate(.92);
  -webkit-backdrop-filter:blur(3px) saturate(.92);
  opacity:0;visibility:hidden;transition:.24s;z-index:90;
}
.drawer-overlay.show{opacity:1;visibility:visible}
.account-drawer{
  position:fixed;right:0;top:0;bottom:0;width:min(336px,calc(100vw - 34px));
  background:#ffffff;border-left:1px solid var(--line);box-shadow:-24px 0 70px rgba(15,23,42,.18);
  transform:translateX(104%);transition:transform .26s ease;z-index:100;color:var(--text);
  display:flex;flex-direction:column;
}
.account-drawer.open{transform:translateX(0)}
.drawer-head{padding:24px 24px 18px;position:relative}
.drawer-close{position:absolute;right:13px;top:10px;width:34px;height:34px;border-radius:50%;background:transparent;color:#667085;font-size:26px;cursor:pointer}
.drawer-close:hover{background:#f2f4f7;color:var(--text)}
.drawer-profile{display:grid;grid-template-columns:68px 1fr;gap:15px;align-items:center;padding:4px 6px 6px;border-radius:14px;color:inherit;text-decoration:none;transition:.18s ease}
.drawer-profile:hover{background:#f8fafc}
.drawer-profile:hover .drawer-avatar{border-color:rgba(245,158,11,.5);box-shadow:0 0 0 3px rgba(245,158,11,.10)}
.drawer-avatar{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;background:#e5e7eb;color:#475467;font-size:30px;border:1px solid rgba(51,65,85,.08)}
.drawer-profile strong{display:block;font-size:16px;line-height:1.35;color:var(--text)}
.drawer-profile span{display:block;font-size:12px;color:#667085;margin-top:2px}
.drawer-profile small{display:block;font-size:12px;color:#344054;margin-top:2px}
.drawer-scroll{overflow:auto;padding:0 24px 22px;display:flex;flex-direction:column;min-height:0;flex:1}
.drawer-nav{display:grid}
.drawer-group{display:grid;gap:3px;padding:12px 0;border-top:1px solid rgba(51,65,85,.10)}
.drawer-group a,.drawer-group button{
  width:100%;display:grid;grid-template-columns:28px 1fr;align-items:center;gap:9px;
  min-height:42px;padding:7px 8px;border-radius:10px;background:transparent;color:var(--text);
  text-align:left;border:0;cursor:pointer;font-weight:700;
}
.drawer-group a:hover,.drawer-group button:hover{background:#f8fafc;color:#b76500}
.drawer-icon{width:24px;text-align:center;color:#667085;font-size:18px;font-weight:500}
.drawer-footer{margin-top:auto;padding-top:14px;border-top:1px solid rgba(51,65,85,.10);display:grid;gap:9px}
.drawer-preferences{display:flex;align-items:center;gap:6px;margin-bottom:4px}
.drawer-preferences button{width:36px;height:32px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#475467;cursor:pointer;font-size:17px}
.drawer-preferences button.active{background:#fff7e6;border-color:rgba(245,158,11,.35);color:#b76500}
.drawer-preferences span{margin-left:4px;color:#344054;font-weight:750;font-size:13px}
.drawer-footer>a{font-size:12px;color:#667085}
.drawer-footer>a:hover{color:#b76500}
.account-page{display:grid;gap:16px}
.account-heading{padding:4px 0 8px}
.account-heading h1{font-size:34px;margin:0 0 22px;letter-spacing:-.5px}
.account-profile-row{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.account-profile-main{display:flex;align-items:center;gap:16px;color:inherit;text-decoration:none;border-radius:14px;padding:5px 8px 5px 5px;transition:.18s ease}
.account-profile-main:hover{background:#fff;border-color:rgba(245,158,11,.28);box-shadow:0 5px 18px rgba(15,23,42,.06)}
.account-profile-main:hover .account-avatar{border-color:rgba(245,158,11,.55);box-shadow:0 0 0 3px rgba(245,158,11,.10)}
.account-avatar{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:#e5e7eb;color:#475467;font-size:24px;border:1px solid var(--line)}
.account-profile-main strong{display:block;font-size:17px}
.account-profile-main span{display:block;color:#667085;font-size:13px;margin-top:4px}
.account-profile-actions{display:flex;gap:9px;flex-wrap:wrap}
.shopping-panel{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.shopping-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 24px;border-bottom:1px solid var(--line)}
.shopping-panel-head strong{font-size:16px}
.shopping-panel-head a{font-size:13px;color:#667085}
.shopping-panel-head a:hover{color:#b76500}
.shopping-wallet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px 24px 14px}
.shopping-wallet-card{position:relative;min-height:72px;border:1px solid var(--line);border-radius:10px;padding:16px 48px 14px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff}
.shopping-wallet-card:hover{border-color:rgba(245,158,11,.38);background:#fffdf7}
.shopping-wallet-card span{font-weight:750;color:#344054}
.shopping-wallet-card strong{font-size:15px;color:var(--text)}
.shopping-wallet-card b{position:absolute;right:22px;color:#667085;font-size:21px;font-weight:400}
.order-status-grid{display:grid;grid-template-columns:repeat(4,1fr);padding:12px 24px 24px;gap:10px}
.order-status-grid a{position:relative;min-height:82px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:12px;color:#344054}
.order-status-grid a:hover{background:#f8fafc;color:#b76500}
.order-status-grid .status-icon{font-size:25px;color:#667085;line-height:1}
.order-status-grid strong{font-size:13px}
.order-status-grid em{position:absolute;top:7px;right:calc(50% - 25px);min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#f59e0b;color:#fff;font-style:normal;font-size:10px;display:grid;place-items:center}
.order-status-grid em:empty{display:none}
.account-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.account-shortcuts a,.account-shortcuts button{min-height:56px;display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:10px;padding:10px 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);text-align:left;cursor:pointer}
.account-shortcuts a:hover,.account-shortcuts button:hover{border-color:rgba(245,158,11,.35);background:#fffdf7}
.account-shortcuts span{font-size:19px;color:#667085;text-align:center}
.account-shortcuts strong{font-size:14px}
.account-shortcuts b{font-size:21px;color:#667085;font-weight:400}
.account-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.panel-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}
.panel-title-row h2{margin:0 0 2px}
.panel-title-row p{margin:0;color:#667085;font-size:13px}
.saved-address{border:1px solid var(--line);border-radius:12px;padding:16px;background:#f8fafc}
.saved-address>strong{font-size:15px;margin-right:10px}
.saved-address>span{color:#667085;font-size:13px}
.saved-address p{margin:9px 0;color:#475467}
.saved-address div{display:flex;gap:7px;flex-wrap:wrap}
.saved-address em{font-style:normal;font-size:11px;border-radius:999px;padding:4px 8px;background:#fff7e6;color:#9a5c00;border:1px solid rgba(245,158,11,.22)}
.compact-form{grid-template-columns:1fr 1fr}
.modal-backdrop{position:fixed;inset:0;z-index:130;background:rgba(15,23,42,.40);display:grid;place-items:center;padding:20px;opacity:0;visibility:hidden;transition:.2s}
.modal-backdrop.open{opacity:1;visibility:visible}
.address-modal{width:min(640px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 28px 90px rgba(15,23,42,.28);transform:translateY(10px) scale(.985);transition:.2s}
.modal-backdrop.open .address-modal{transform:translateY(0) scale(1)}
.modal-head{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}
.modal-head h2{font-size:20px;margin:0}
.modal-head button{width:36px;height:36px;border-radius:50%;background:transparent;color:#667085;font-size:28px;cursor:pointer}
.modal-head button:hover{background:#f2f4f7;color:var(--text)}
.address-form{padding:22px 26px 20px}
.address-form-row{display:grid;gap:13px}
.address-form-row>label{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:start;gap:12px}
.address-form-row>label>span{text-align:right;padding-top:10px;color:#475467;font-weight:700;font-size:13px}
.address-form-row i{color:#e0565b;font-style:normal}
.address-form input,.address-form select,.address-form textarea{width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--text);padding:10px 12px;outline:0}
.address-form textarea{min-height:76px;resize:vertical}
.address-form input:focus,.address-form select:focus,.address-form textarea:focus{border-color:rgba(245,158,11,.55);box-shadow:0 0 0 3px rgba(245,158,11,.12)}
.input-with-count{position:relative}
.input-with-count input{padding-right:58px}
.input-with-count textarea{padding-bottom:24px}
.input-with-count small{position:absolute;right:10px;bottom:7px;color:#667085;font-size:11px;pointer-events:none}
.phone-field{display:grid;grid-template-columns:74px 1fr}
.phone-field select{border-radius:8px 0 0 8px;background:#f8fafc}
.phone-field input{border-left:0;border-radius:0 8px 8px 0}
.address-options{display:grid;grid-template-columns:140px 1fr;gap:8px 12px;margin-top:17px;color:#475467;font-size:13px}
.address-options>strong{text-align:right}
.address-options label{grid-column:2;display:flex;align-items:center;gap:8px}
.address-options input{width:17px;height:17px;accent-color:#f59e0b}
.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:24px;padding-top:16px;border-top:1px solid var(--line)}
/* Optional dark mode from the drawer. The default remains the light theme. */
@media(max-width:1180px){.topbar{grid-template-columns:auto auto minmax(180px,1fr) auto}
.main-nav{display:none}
.header-search{min-width:0}}
@media(max-width:760px){.topbar{grid-template-columns:auto auto 1fr auto}
.header-search{grid-column:1/-1;order:5}
.brand-name{display:none}
.actions .avatar-btn span,.actions .pill{display:none}
.account-heading h1{font-size:27px;margin-bottom:15px}
.shopping-wallet-grid,.account-info-grid{grid-template-columns:1fr}
.order-status-grid{grid-template-columns:repeat(4,1fr);padding-inline:10px}
.order-status-grid strong{font-size:11px;text-align:center}
.account-shortcuts{grid-template-columns:1fr}
.panel-title-row{align-items:flex-start;flex-direction:column}
.compact-form{grid-template-columns:1fr}
.address-form{padding:18px 16px}
.address-form-row>label{grid-template-columns:1fr;gap:5px}
.address-form-row>label>span{text-align:left;padding-top:0}
.address-options{grid-template-columns:1fr}
.address-options>strong{text-align:left}
.address-options label{grid-column:1}}
@media(max-width:440px){.wrap{width:min(100% - 20px,1360px)}
.shopping-panel-head,.shopping-wallet-grid{padding-left:14px;padding-right:14px}
.shopping-wallet-card{padding-left:15px}
.order-status-grid{gap:2px}
.account-profile-actions{width:100%}
.account-profile-actions .btn{flex:1}}
/* =========================================================
   Compact right account drawer: show every menu item at once
   after pressing the hamburger button (no inner scrolling).
   ========================================================= */
.account-drawer{
  height:100vh;
  height:100dvh;
  overflow:hidden;
}
.drawer-head{
  flex:0 0 auto;
  padding:16px 22px 12px;
}
.drawer-close{
  right:9px;
  top:7px;
  width:30px;
  height:30px;
  font-size:23px;
}
.drawer-profile{
  grid-template-columns:56px minmax(0,1fr);
  gap:12px;
  padding-top:0;
}
.drawer-avatar{
  width:56px;
  height:56px;
  font-size:26px;
}
.drawer-profile strong{font-size:15px}
.drawer-profile span,.drawer-profile small{font-size:11px}
.drawer-scroll{
  flex:1;
  min-height:0;
  overflow:hidden;
  padding:0 22px 14px;
  display:flex;
  flex-direction:column;
}
.drawer-nav{flex:0 0 auto}
.drawer-group{
  gap:1px;
  padding:7px 0;
}
.drawer-group a,.drawer-group button{
  grid-template-columns:25px 1fr;
  gap:8px;
  min-height:35px;
  padding:4px 6px;
  border-radius:8px;
  font-size:14px;
  line-height:1.25;
}
.drawer-icon{
  width:21px;
  font-size:16px;
}
.drawer-footer{
  margin-top:auto;
  flex:0 0 auto;
  padding-top:9px;
  gap:5px;
}
.drawer-preferences{
  gap:5px;
  margin-bottom:1px;
}
.drawer-preferences button{
  width:34px;
  height:29px;
  font-size:15px;
}
.drawer-preferences span{font-size:12px}
.drawer-footer>a{
  font-size:11px;
  line-height:1.35;
}
@media(max-height:680px){.drawer-head{padding:11px 18px 8px}
.drawer-profile{grid-template-columns:48px minmax(0,1fr);gap:10px}
.drawer-avatar{width:48px;height:48px;font-size:22px}
.drawer-group{padding:4px 0}
.drawer-group a,.drawer-group button{min-height:31px;padding:3px 5px;font-size:13px}
.drawer-footer{padding-top:6px;gap:3px}
.drawer-preferences button{height:27px}}
/* =========================================================
   Combined profile + hamburger button in header
   ========================================================= */
.profile-drawer-btn{
  height:38px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  background:linear-gradient(180deg,#191c22,#101216);
  color:#fff;
  box-shadow:0 5px 14px rgba(68,84,111,.10);
  cursor:pointer;
  flex:0 0 auto;
}
.profile-drawer-btn:hover{
  border-color:rgba(255,255,255,.14);
  background:linear-gradient(180deg,#20242c,#14171c);
}
.profile-drawer-avatar,
.profile-drawer-bars{
  display:grid;
  place-items:center;
  width:16px;
  height:16px;
  line-height:1;
  font-size:16px;
}
.profile-drawer-divider{
  width:1px;
  height:18px;
  background:rgba(255,255,255,.16);
}
@media(max-width:760px){.profile-drawer-btn{
    padding:0 10px;
    gap:8px;
  }}
