/* ==========================================================================
   My account — profile card, icon menu, order cards (loaded on account pages only)
   ========================================================================== */
.woocommerce-account .woocommerce { grid-template-columns: 290px minmax(0, 1fr); gap: 32px; }

/* Sidebar */
.acctnav { background: var(--ivory) !important; border: 1px solid var(--line); border-radius: 8px !important; padding: 0 !important; overflow: hidden; }
.acctnav__profile { display: flex; align-items: center; gap: 14px; padding: 20px; background: linear-gradient(135deg, #011733, #00274F); color: var(--ivory); }
.acctnav__avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--saffron); color: var(--ink); font: 700 22px/1 var(--font-display); }
.acctnav__profile strong { display: block; font: 500 18px/1.2 var(--font-display); }
.acctnav__profile span:not(.acctnav__avatar) { display: block; font-size: 13px; color: rgb(251 247 240 / .72); word-break: break-all; }
.acctnav ul { padding: 6px 0 !important; }
.acctnav li { position: relative; }
.acctnav li a { display: flex !important; gap: 14px; align-items: center; min-height: 54px; padding: 0 18px !important; border: 0 !important; border-radius: 0 !important; font-weight: 500; color: var(--ink); }
.acctnav li a .icon { width: 20px; height: 20px; color: var(--brass-ink); flex: none; }
.acctnav li a span { flex: 1; }
.acctnav li a .icon--chev { width: 16px; height: 16px; color: var(--muted); }
.acctnav li a:hover { background: var(--parchment); }
.acctnav li.is-active a { background: rgb(var(--saffron-rgb) / .12); color: var(--saffron-deep); font-weight: 700; }
.acctnav li.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--saffron); }
.acctnav li.is-active a .icon { color: var(--saffron-deep); }
.acctnav li:last-child a { color: var(--maroon) !important; }
.acctnav li:last-child a .icon { color: var(--maroon); }
.acctnav li:last-child { border-top: 1px solid var(--line); }

/* Hero card */
.dashhero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 24px; margin-bottom: 20px; border-radius: 10px; color: var(--ivory); background: radial-gradient(120% 140% at 10% 0%, #00274F, #011733 60%, #01112D); box-shadow: var(--shadow-2); overflow: hidden; }
.dashhero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: repeating-conic-gradient(rgb(227 185 100 / .14) 0 2deg, transparent 2deg 10deg); -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent); mask-image: radial-gradient(closest-side, #000 40%, transparent); pointer-events: none; }
.dashhero__avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--saffron); color: var(--ink); font: 700 28px/1 var(--font-display); box-shadow: 0 0 0 3px rgb(227 185 100 / .6); }
.dashhero__who h2 { margin: 0 0 4px; font: 500 clamp(24px, 3vw, 32px)/1.15 var(--font-display); color: var(--ivory); }
.dashhero__who p { margin: 0; font-size: 14px; color: rgb(251 247 240 / .75); word-break: break-word; }
.dashhero__stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); margin: 4px 0 0; padding-top: 18px; border-top: 1px solid rgb(227 185 100 / .25); position: relative; z-index: 1; }
.dashhero__stats div { text-align: center; }
.dashhero__stats div + div { border-left: 1px solid rgb(227 185 100 / .2); }
.dashhero__stats dt { font: 500 11px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: #F3DDA8; margin-bottom: 6px; }
.dashhero__stats dd { margin: 0; font: 600 26px/1 var(--font-display); }
.dashhero__edit { position: relative; z-index: 1; }

/* Cards */
.dashcard { padding: 22px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); }
.dashcard__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.dashcard__head h3 { margin: 0; font-size: 22px; }
.lastorder { display: grid; gap: 16px; }
.lastorder__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.lastorder__meta span:not(.dash__status) { color: var(--muted); font-size: 14px; }
.lastorder__actions, .ocard__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ocard__items { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ocard__thumb { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: var(--parchment); display: block; flex: none; border: 1px solid var(--line); }
.ocard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ocard__more { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 6px; background: var(--parchment); font-weight: 700; color: var(--muted); }

/* Order progress */
.track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.track li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--muted); }
.track li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 3px; background: var(--parchment-2); z-index: 0; }
.track li:first-child::before { display: none; }
.track li.is-done::before, .track li.is-now::before { background: var(--emerald); }
.track i { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--parchment-2); border: 3px solid var(--ivory); box-shadow: 0 0 0 1px var(--parchment-2); }
.track i .icon { width: 14px; height: 14px; color: #fff; stroke-width: 3; }
.track li.is-done i { background: var(--emerald); box-shadow: 0 0 0 1px var(--emerald); }
.track li.is-now i { background: var(--saffron); box-shadow: 0 0 0 1px var(--saffron), 0 0 0 6px rgb(var(--saffron-rgb) / .25); }
.track li.is-done, .track li.is-now { color: var(--ink); font-weight: 700; }

/* Offers */
.cps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cp { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1.5px dashed var(--brass); border-radius: 8px; background: rgb(var(--saffron-rgb) / .06); }
.cp strong { display: block; font: 700 18px/1.1 var(--font-body); letter-spacing: .1em; }
.cp span { font-size: 13px; color: var(--muted); }
.spincta { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 8px; background: linear-gradient(120deg, #011733, #00274F); color: var(--ivory); }
.spincta__icon { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--saffron); color: var(--ink); }
.spincta__icon .icon { width: 24px; height: 24px; }
.spincta div { flex: 1; }
.spincta strong { display: block; font: 500 18px/1.2 var(--font-display); }
.spincta div span { font-size: 13px; color: rgb(251 247 240 / .75); }

/* Orders list */
.acctpage__title { margin: 0 0 18px; font-size: clamp(26px, 3vw, 34px); }
.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ocard { padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); display: grid; gap: 14px; }
.ocard__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ocard__head strong { font-size: 17px; margin-right: 10px; }
.ocard__head span:not(.dash__status) { color: var(--muted); font-size: 14px; }
.ocard__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.ocard__total { font-size: 14px; }
.ordpager { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* Back link (phones) */
.acctback { display: none; align-items: center; gap: 4px; margin-bottom: 14px; font-weight: 700; color: var(--teal-ink); }
.acctback .icon--back { width: 18px; height: 18px; transform: rotate(180deg); }

/* Addresses, details, single order: a little polish */
.woocommerce-MyAccount-content h2, .woocommerce-MyAccount-content h3 { font-size: 24px; }
.woocommerce-Addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.woocommerce-Addresses::before, .woocommerce-Addresses::after { display: none !important; }
.woocommerce-Addresses .woocommerce-Address { float: none !important; width: auto !important; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--ivory); }
.woocommerce-Address-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.woocommerce-Address-title h2, .woocommerce-Address-title h3 { margin: 0; font-size: 20px; }
.woocommerce-Address-title a.edit { font-weight: 700; color: var(--teal-ink); }
.woocommerce-Address address { font-style: normal; line-height: 1.7; color: var(--ink-2); }
.woocommerce-EditAccountForm fieldset { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.woocommerce-EditAccountForm legend { padding: 0 8px; font: 500 18px/1 var(--font-display); }

@media (max-width: 1079px) {
	.woocommerce-account .woocommerce { grid-template-columns: 1fr; gap: 20px; }
	.acctnav { position: static !important; }
	.dash__tiles { display: none; } /* the menu above already has these */
	.dash__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Phones: account home = menu list like a shopping app; inner pages hide the menu and show a back link */
@media (max-width: 1079px) {
	.acct-inner .acctnav { display: none; }
	.acct-inner .acctback { display: inline-flex; }
	.acct-home .woocommerce { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
	.acct-home .woocommerce-MyAccount-content, .acct-home .dash { display: contents; }
	.acct-home .dashhero { order: 1; margin: 0; }
	.acct-home .acctnav { order: 2; }
	.acct-home .dashcard { order: 3; margin: 0; }
	.acct-home .dash__help { order: 5; }
	.acctnav__profile { display: none; }
}
@media (max-width: 640px) {
	.dashhero { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
	.dashhero__edit { grid-column: 1 / -1; justify-self: stretch; }
	.dashhero__avatar { width: 54px; height: 54px; font-size: 24px; }
	.dashhero__stats dd { font-size: 22px; }
	.dashcard { padding: 16px; }
	.woocommerce-Addresses { grid-template-columns: 1fr; }
	.ocard { padding: 16px; }
	.ocard__actions { width: 100%; }
	.ocard__actions .btn, .lastorder__actions .btn { flex: 1; }
	.cp { flex-direction: column; align-items: stretch; text-align: left; }
	.spincta { flex-wrap: wrap; }
	.spincta .btn { width: 100%; }
}
@media (min-width: 1080px) {
	.dashhero { grid-template-columns: minmax(0, 1fr) auto; }
	.dashhero__avatar { display: none; }
}

.dashhero__edit.btn--ghost-light, .dashhero__edit.btn--ghost-light:visited { color: var(--ivory) !important; border-color: rgb(251 247 240 / .55); }
.dashhero__edit.btn--ghost-light:hover { background: var(--ivory); color: var(--ink) !important; }

/* Menu rows on every screen size (overrides the older pill-style menu for phones) */
.woocommerce-account .acctnav ul { display: block; overflow: visible; gap: 0; }
.woocommerce-account .acctnav li a { white-space: normal; border-radius: 0 !important; padding: 0 18px !important; min-height: 54px; border: 0 !important; }
.woocommerce-account .acctnav li { border-bottom: 1px solid var(--line); }
.woocommerce-account .acctnav li:last-child { border-bottom: 0; }
