/* =========================================================================
   КУЗНЯ КАВИ — особистий кабінет
   Токени з kk-header.css (:root)
   ========================================================================= */

body.woocommerce-account { background: #F7F3EA; }

/* Ховаємо стандартний заголовок сторінки GP на кабінеті */
.woocommerce-account .entry-header,
.woocommerce-account .page-header { display: none; }

/* Прибираємо білий фон і бокові відступи контейнера GeneratePress */
.woocommerce-account .site-content,
.woocommerce-account #primary,
.woocommerce-account .content-area,
.woocommerce-account .site-main,
.woocommerce-account article,
.woocommerce-account .inside-article,
.woocommerce-account .entry-content,
.woocommerce-account .page-content {
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}
/* Контейнер на всю ширину */
.woocommerce-account #content > .container,
.woocommerce-account #content > .grid-container,
.woocommerce-account .site-content > .container,
.woocommerce-account .site-content > .grid-container {
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.woocommerce-account .woocommerce {
	max-width: 100%;
	margin: 80px 0;
	padding: 0px;
	display: flex;
	align-items: flex-start;
	justify-content: space-evenly;
}

/* ---------- Сайдбар ---------- */
.kk-acc-nav { flex: 0 0 260px; }
.kk-acc-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.kk-acc-nav__item a {
	display: flex; align-items: center; gap: 14px;
	padding: 10px 12px; border-radius: 12px;
	color: var(--kk-text-dark); text-decoration: none;
	font-size: 16px; font-weight: 700;
	transition: color var(--kk-ease), background var(--kk-ease);
}
.kk-acc-nav__item a:hover { background: rgba(27,26,24,.04); }
.kk-acc-nav__item.is-active a { color: var(--kk-accent); }

.kk-acc-ic {
	flex: 0 0 auto;
	width: 18px;
	display: inline-flex; align-items: center; justify-content: center;
	color: #171717;
	transition: color var(--kk-ease);
}
.kk-acc-ic svg { width: 18px; height: 18px; display: block; }
.kk-acc-nav__item.is-active .kk-acc-ic { color: var(--kk-accent); }

/* ---------- Контент-картка ---------- */
.woocommerce-MyAccount-content {
	flex: 1 1 auto; min-width: 0;
	background: #F1ECE0;
	border-radius: 22px;
	padding: 34px 40px 40px;
}
.kk-acc-title {
	margin: 0 0 26px;
	font-size: 30px; font-weight: 800;
	color: var(--kk-text-dark);
}

/* ---------- Форма «Мої дані» ---------- */
.kk-acc-form { display: flex; flex-direction: column; gap: 22px; }
.kk-acc-row { display: flex; gap: 30px; }
.kk-acc-row .kk-field { flex: 1 1 0; min-width: 0; }

.kk-field { display: flex; flex-direction: column; gap: 8px; }
.kk-field > span { font-size: 15px; font-weight: 700; color: var(--kk-text-dark); }
.kk-field input {
	width: 100%;
	background: #FBF9F3;
	border: 1px solid rgba(27,26,24,.14);
	border-radius: 12px;
	padding: 15px 16px;
	font-size: 16px; color: var(--kk-text-dark);
	outline: none;
	transition: border-color var(--kk-ease), box-shadow var(--kk-ease);
	-webkit-appearance: none; appearance: none;
}
.kk-field input::placeholder { color: #9a958b; }
.kk-field input:focus { border-color: var(--kk-text-dark); box-shadow: 0 0 0 3px rgba(27,26,24,.06); }
.kk-field input:disabled { background: #EDE8DC; color: #8a857c; cursor: not-allowed; }

.kk-phone-input {
	display: flex; align-items: center;
	background: #FBF9F3;
	border: 1px solid rgba(27,26,24,.14);
	border-radius: 12px; padding-left: 14px; overflow: hidden;
}
.kk-phone-input__flag { font-size: 20px; line-height: 1; margin-right: 8px; }
.kk-phone-input input { border: 0 !important; background: transparent !important; border-radius: 0 !important; box-shadow: none !important; padding-left: 6px; }

.kk-acc-msg { display: none; font-size: 14px; }
.kk-acc-msg.is-error { display: block; color: #b3261e; }
.kk-acc-msg.is-ok { display: block; color: #3f7a3f; }

.kk-acc-actions { display: flex; justify-content: flex-end; }
.kk-acc-save {
	border: 0; cursor: pointer;
	background: #111; color: #fff;
	font-size: 16px; font-weight: 700;
	padding: 15px 34px; border-radius: var(--kk-pill);
	transition: background var(--kk-ease), opacity var(--kk-ease);
}
.kk-acc-save:hover { background: #000; }
.kk-acc-save[disabled] { opacity: .5; cursor: default; }

/* ---------- Кнопка «До Асортименту» / порожній стан ---------- */
.kk-orders-empty {
	min-height: 320px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
	text-align: center;
}
.kk-orders-empty__text { margin: 0; font-size: 26px; font-weight: 800; color: var(--kk-text-dark); }
.kk-btn {
	display: inline-flex; align-items: center; justify-content: center;
	background: #111; color: #fff; text-decoration: none; font-weight: 700;
	padding: 16px 34px; border-radius: var(--kk-pill);
	transition: background var(--kk-ease);
}
.kk-btn:hover { background: #000; }

/* ---------- Список замовлень ---------- */
.kk-orders-list { display: flex; flex-direction: column; }
.kk-order { border-bottom: 1px solid rgba(27,26,24,.1); }
.kk-order:first-child { border-top: 1px solid rgba(27,26,24,.1); }

.kk-order__head { display: flex; align-items: center; gap: 16px; padding: 18px 4px; }
.kk-order__head button:focus { background: unset;}
.kk-order__toggle {
	flex: 1 1 auto; min-width: 0;
	display: grid; grid-template-columns: 24px repeat(4, 1fr); align-items: center; gap: 16px;
	background: transparent; border: 0; cursor: pointer; text-align: left; padding: 0;
}
.kk-order__caret {
	width: 0; height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 7px solid var(--kk-accent);
	transition: transform var(--kk-ease);
}
.kk-order.is-open .kk-order__caret { transform: rotate(90deg); }
.kk-order__toggle:hover { color: unset; background-color: unset; }
.kk-order__col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kk-order__label { font-size: 16px; color: var(--kk-text-dark); }
.kk-order__val { font-size: 15px; color: #8a857c; }

.kk-order__reorder {
	flex: 0 0 auto;
	background: #111; color: #fff; text-decoration: none; font-weight: 700;
	padding: 13px 34px; border-radius: var(--kk-pill); font-size: 15px;
	transition: background var(--kk-ease);
}
.kk-order__reorder:hover { background: #000; color: #fff; }

/* Розкриття товарів */
.kk-order__body { padding: 0 4px 8px; }
.kk-order__body[hidden] { display: none; }
.kk-order__item { display: flex; align-items: center; gap: 22px; padding: 14px 0; }
.kk-order__thumb { flex: 0 0 auto; width: 92px; }
.kk-order__thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; display: block; }
.kk-order__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.kk-order__name { font-size: 16px; font-weight: 600; max-width: 70%; color: var(--kk-text-dark); }
.kk-order__meta { font-size: 15px; color: #6f6a60; }
.kk-order__meta p, .kk-order__meta table { margin: 0; }
.kk-order__meta .wc-item-meta { list-style: none; margin: 0; padding: 0; }
.kk-order__price { flex: 0 0 auto; font-size: 18px; color: var(--kk-text-dark); }
.kk-order__price .amount { font-weight: 500; }

/* ---------- Мобілка ---------- */
@media (max-width: 900px) {
	.woocommerce-account .woocommerce { flex-direction: column; gap: 24px; margin: 24px 0; padding: 0 16px; }
	.kk-acc-nav { flex-basis: auto; width: 100%; }
	.kk-acc-nav ul { flex-direction: row; flex-wrap: wrap; }
	.woocommerce-MyAccount-content { width: 100%; padding: 24px 20px 28px; }
	.kk-acc-row { flex-direction: column; gap: 22px; }

	/* Рядок замовлення: каретка ліворуч на всю висоту + колонки 2×2 */
	.kk-order__head { flex-direction: column; align-items: stretch; gap: 16px; }
	.kk-order__toggle {
		grid-template-columns: 16px 1fr 1fr;
		column-gap: 14px; row-gap: 14px;
	}
	.kk-order__caret { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
	.kk-order__col:nth-child(2) { grid-column: 2; grid-row: 1; } /* Замовлення */
	.kk-order__col:nth-child(3) { grid-column: 3; grid-row: 1; } /* Дата */
	.kk-order__col:nth-child(4) { grid-column: 2; grid-row: 2; } /* Статус */
	.kk-order__col:nth-child(5) { grid-column: 3; grid-row: 2; } /* Ціна */

	.kk-order__reorder { width: 100%; text-align: center; }
	.kk-order__item { gap: 14px; }
	.kk-order__thumb, .kk-order__thumb img { width: 72px; }
	.kk-order__thumb img { height: 72px; }
	.kk-order__name { max-width: 100%; }
}
