/**
 * Novely Young — frontend styles.
 *
 * Ported unchanged from the Kiosko Child theme's style.css. Enqueued by
 * novelyyoung_enqueue_styles() in novelyyoung.php.
 *
 * Brand accents are scoped to the WooCommerce areas below only. #fdb902 is a
 * bright yellow, so filled buttons use dark ink text for readability.
 */

/* =========================================================================
   A. Shopee-style single product page  (scoped under .single-product)
   ========================================================================= */

.single-product {
	--kiosko-brand: #fdb902;
	--kiosko-brand-dark: #e0a600;
	--kiosko-brand-tint: #fff6da;
	--kiosko-ink: #222222;
	--kiosko-muted: #767676;
	--kiosko-line: #ececec;
}

/* Layout ---------------------------------------------------------------- */
.single-product .kiosko-product-columns {
	gap: 2.5rem;
}

.single-product .kiosko-summary-col {
	min-width: 0;
}

/* Rating line ("Belum Ada Penilaian · Laporkan") ------------------------ */
.single-product .kiosko-rating-line {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.35rem 0 0.85rem;
	font-size: 0.85rem;
	color: var(--kiosko-muted);
}

.single-product .kiosko-rating-star {
	color: var(--kiosko-brand);
	font-size: 0.95rem;
	line-height: 1;
}

.single-product .kiosko-sep {
	opacity: 0.5;
}

.single-product .kiosko-report {
	color: var(--kiosko-muted);
	text-decoration: none;
}

.single-product .kiosko-report:hover {
	color: var(--kiosko-ink);
	text-decoration: underline;
}

/* Price box ------------------------------------------------------------- */
.single-product .kiosko-price-box {
	background: var(--kiosko-brand-tint);
	background: color-mix(in srgb, var(--kiosko-brand) 14%, #ffffff);
	border-radius: 8px;
	padding: 0.9rem 1.1rem;
	margin: 0 0 1.25rem;
}

.single-product .kiosko-price-box .wp-block-woocommerce-product-price,
.single-product .kiosko-price-box .price {
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem);
	font-weight: 700;
	color: var(--kiosko-ink);
	margin: 0;
}

.single-product .kiosko-price-box del {
	color: var(--kiosko-muted);
	font-weight: 400;
	font-size: 0.7em;
}

/* The top price box is the single source of price; hide the duplicate price
   WooCommerce injects into .single_variation on selection (keep availability). */
.single-product .single_variation .woocommerce-variation-price {
	display: none;
}

/* Variation swatches ("Pilihan Paket") ---------------------------------- */
.single-product .kiosko-variation {
	margin: 0 0 1.1rem;
}

.single-product .kiosko-variation-label,
.single-product .kiosko-qty-label {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--kiosko-ink);
	margin: 0 0 0.55rem;
}

.single-product .kiosko-swatches {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 0.6rem;
}

.single-product .kiosko-swatch {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem;
	border: 1px solid var(--kiosko-line);
	border-radius: 8px;
	cursor: pointer;
	background: #ffffff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.single-product .kiosko-swatch:hover {
	border-color: var(--kiosko-brand);
}

.single-product .kiosko-swatch:focus-visible {
	outline: 2px solid var(--kiosko-brand);
	outline-offset: 2px;
}

.single-product .kiosko-swatch.is-active {
	border: 2px solid var(--kiosko-brand);
	padding: calc(0.4rem - 1px);
}

.single-product .kiosko-swatch.is-active::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0 20px 20px 0;
	border-color: transparent var(--kiosko-brand) transparent transparent;
	border-top-right-radius: 6px;
}

.single-product .kiosko-swatch__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 5px;
	background: #f7f7f7;
}

.single-product .kiosko-swatch__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.single-product .kiosko-swatch__label {
	font-size: 0.72rem;
	line-height: 1.25;
	text-align: center;
	color: var(--kiosko-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.single-product .kiosko-swatch__stock {
	font-size: 0.68rem;
	line-height: 1.2;
	text-align: center;
	color: var(--kiosko-muted);
}

.single-product .kiosko-swatch__stock--oos {
	color: #d0011b;
	font-weight: 600;
}

/* Out-of-stock package: greyed out but still clickable, so WooCommerce's own
   out-of-stock messaging appears if the customer taps it anyway. */
.single-product .kiosko-swatch--oos {
	background: #fafafa;
}

.single-product .kiosko-swatch--oos .kiosko-swatch__img img {
	filter: grayscale(1);
	opacity: 0.55;
}

.single-product .kiosko-swatch--oos .kiosko-swatch__label {
	color: var(--kiosko-muted);
}

/* Swatches present ("enhanced"): hide the entire native dropdown table — the
   swatches drive the first attribute and JS auto-resolves the rest. The
   <select>s stay in the DOM for WooCommerce's JS. */
.single-product .variations.kiosko-variations--swatched {
	display: none;
}

/* Always keep the quantity ("Kuantitas") + buttons visible for variable
   products, even before a package is chosen (matches the reference where the
   stepper is always shown). Safeguard against WC/theme/block CSS hiding it. */
.single-product .single_variation_wrap {
	display: block !important;
}

.single-product .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}

/* Keep any remaining (multi-attribute) dropdowns readable. */
.single-product .variations {
	border: 0;
	margin: 0 0 1rem;
}

.single-product .variations th.label {
	text-align: left;
	padding: 0.35rem 0.75rem 0.35rem 0;
	font-weight: 600;
	font-size: 0.9rem;
}

/* Quantity stepper ------------------------------------------------------ */
.single-product .quantity.kiosko-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--kiosko-line);
	border-radius: 6px;
	overflow: hidden;
}

.single-product .quantity.kiosko-qty .kiosko-qty-btn {
	width: 40px;
	min-height: 40px;
	border: 0;
	background: #f7f7f7;
	color: var(--kiosko-ink);
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.single-product .quantity.kiosko-qty .kiosko-qty-btn:hover {
	background: var(--kiosko-brand-tint);
}

.single-product .quantity.kiosko-qty input.qty {
	width: 52px;
	border: 0;
	border-left: 1px solid var(--kiosko-line);
	border-right: 1px solid var(--kiosko-line);
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
	background: #ffffff;
}

.single-product .quantity.kiosko-qty input.qty::-webkit-outer-spin-button,
.single-product .quantity.kiosko-qty input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Add-to-cart + Buy-now buttons ----------------------------------------- */
/* Simple products lay out inside form.cart; variable products inside the
   .woocommerce-variation-add-to-cart row (NOT the whole variations form). */
.single-product form.cart:not(.variations_form),
.single-product .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
}

.single-product .quantity.kiosko-qty {
	flex: 0 0 auto;
}

.single-product .single_add_to_cart_button,
.single-product .kiosko-buy-now {
	flex: 1 1 180px;
	min-height: 46px;
	border-radius: 6px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
}

/* Masukkan Keranjang = outlined brand. */
.single-product .single_add_to_cart_button {
	background: #ffffff;
	border: 2px solid var(--kiosko-brand);
	color: var(--kiosko-ink);
}

.single-product .single_add_to_cart_button:hover {
	background: var(--kiosko-brand-tint);
}

/* Beli Sekarang = filled brand, dark ink text. */
.single-product .kiosko-buy-now {
	background: var(--kiosko-brand);
	border: 2px solid var(--kiosko-brand);
	color: var(--kiosko-ink);
}

.single-product .kiosko-buy-now:hover {
	background: var(--kiosko-brand-dark);
	border-color: var(--kiosko-brand-dark);
}

.single-product .single_add_to_cart_button.disabled,
.single-product .single_add_to_cart_button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* The "Kuantitas" label should sit on its own row above the stepper. */
.single-product .kiosko-qty-label {
	flex: 1 0 100%;
	margin-bottom: 0;
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 781px) {
	.single-product .kiosko-product-columns {
		gap: 1.25rem;
	}
	.single-product .kiosko-product-columns .wp-block-column {
		flex-basis: 100% !important;
	}
	.single-product .single_add_to_cart_button,
	.single-product .kiosko-buy-now {
		flex: 1 1 100%;
	}
}

/* =========================================================================
   B. Shopee-style order cards  (scoped under .woocommerce-account .ny-orders)
   ========================================================================= */

.woocommerce-account .ny-orders {
	--ny-brand: #fdb902;
	--ny-brand-dark: #e0a600;
	--ny-ink: #222222;
	--ny-muted: #767676;
	--ny-line: #ececec;
}

/* Status tabs ----------------------------------------------------------- */
.woocommerce-account .ny-orders__tabs {
	display: flex;
	gap: 0.25rem;
	overflow-x: auto;
	border-bottom: 1px solid var(--ny-line);
	margin: 0 0 1.25rem;
	-webkit-overflow-scrolling: touch;
}

.woocommerce-account .ny-orders__tab {
	flex: 0 0 auto;
	padding: 0.7rem 1rem;
	color: var(--ny-muted);
	text-decoration: none;
	font-size: 0.9rem;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
}

.woocommerce-account .ny-orders__tab:hover {
	color: var(--ny-ink);
}

.woocommerce-account .ny-orders__tab.is-active {
	color: var(--ny-ink);
	font-weight: 600;
	border-bottom-color: var(--ny-brand);
}

.woocommerce-account .ny-orders__tab:focus-visible {
	outline: 2px solid var(--ny-brand);
	outline-offset: -2px;
}

/* Card ------------------------------------------------------------------ */
.woocommerce-account .ny-orders__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.woocommerce-account .ny-order-card {
	border: 1px solid var(--ny-line);
	border-radius: 10px;
	background: #ffffff;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.woocommerce-account .ny-order-card__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.85rem 1.1rem;
	border-bottom: 1px solid var(--ny-line);
	background: #fcfcfc;
}

.woocommerce-account .ny-order-card__store {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--ny-ink);
}

.woocommerce-account .ny-order-card__no {
	font-size: 0.85rem;
	color: var(--ny-muted);
}

.woocommerce-account .ny-order-card__date {
	font-size: 0.8rem;
	color: var(--ny-muted);
	margin-inline-start: auto;
}

/* Status badge ---------------------------------------------------------- */
.woocommerce-account .ny-order-card__badge {
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: #eeeeee;
	color: #555555;
	white-space: nowrap;
}

.woocommerce-account .ny-badge--pending,
.woocommerce-account .ny-badge--on-hold,
.woocommerce-account .ny-badge--failed {
	background: var(--ny-brand);
	color: var(--ny-ink);
}

.woocommerce-account .ny-badge--processing {
	background: #e6f0ff;
	color: #1c4fb3;
}

.woocommerce-account .ny-badge--shipped {
	background: #e3f5ee;
	color: #167a5b;
}

.woocommerce-account .ny-badge--completed {
	background: #e3f5e3;
	color: #1e7a1e;
}

.woocommerce-account .ny-badge--cancelled,
.woocommerce-account .ny-badge--refunded {
	background: #fdeaea;
	color: #b12a2a;
}

/* Line items ------------------------------------------------------------ */
.woocommerce-account .ny-order-card__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-account .ny-order-item {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.85rem;
	padding: 0.85rem 1.1rem;
	border-bottom: 1px solid var(--ny-line);
}

.woocommerce-account .ny-order-item:last-child {
	border-bottom: 0;
}

.woocommerce-account .ny-order-item__thumb img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	background: #f7f7f7;
}

.woocommerce-account .ny-order-item__info {
	min-width: 0;
}

.woocommerce-account .ny-order-item__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.9rem;
	line-height: 1.35;
}

.woocommerce-account .ny-order-item__name a {
	color: var(--ny-ink);
	text-decoration: none;
}

.woocommerce-account .ny-order-item__name a:hover {
	color: var(--ny-brand-dark);
}

.woocommerce-account .ny-order-item__meta,
.woocommerce-account .ny-order-item__meta .wc-item-meta {
	font-size: 0.78rem;
	color: var(--ny-muted);
	margin: 0.15rem 0 0;
	padding: 0;
	list-style: none;
}

.woocommerce-account .ny-order-item__meta .wc-item-meta p {
	margin: 0;
}

.woocommerce-account .ny-order-item__qty {
	display: inline-block;
	font-size: 0.8rem;
	color: var(--ny-muted);
	margin-top: 0.2rem;
}

.woocommerce-account .ny-order-item__price {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--ny-ink);
	white-space: nowrap;
	text-align: end;
}

/* Footer ---------------------------------------------------------------- */
.woocommerce-account .ny-order-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.9rem 1.1rem;
	border-top: 1px solid var(--ny-line);
	background: #fcfcfc;
}

.woocommerce-account .ny-order-card__total {
	font-size: 0.95rem;
	color: var(--ny-ink);
}

.woocommerce-account .ny-order-card__total {
	font-weight: 400;
}

.woocommerce-account .ny-order-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

/* Buttons --------------------------------------------------------------- */
.woocommerce-account .ny-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0 1.1rem;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
}

.woocommerce-account .ny-btn--primary {
	background: var(--ny-brand);
	border-color: var(--ny-brand);
	color: var(--ny-ink);
}

.woocommerce-account .ny-btn--primary:hover {
	background: var(--ny-brand-dark);
	border-color: var(--ny-brand-dark);
}

.woocommerce-account .ny-btn--outline {
	background: #ffffff;
	border-color: var(--ny-line);
	color: var(--ny-ink);
}

.woocommerce-account .ny-btn--outline:hover {
	border-color: var(--ny-brand);
	color: var(--ny-brand-dark);
}

.woocommerce-account .ny-btn--cancel:hover {
	border-color: #d15a5a;
	color: #b12a2a;
}

/* Empty state ----------------------------------------------------------- */
.woocommerce-account .ny-orders__empty {
	text-align: center;
	padding: 2.5rem 1rem;
	border: 1px dashed var(--ny-line);
	border-radius: 10px;
}

.woocommerce-account .ny-orders__empty-text {
	color: var(--ny-muted);
	margin: 0 0 1rem;
}

.woocommerce-account .ny-orders__empty .ny-btn--shop {
	display: inline-flex;
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 600px) {
	.woocommerce-account .ny-order-card__head {
		flex-wrap: wrap;
	}
	.woocommerce-account .ny-order-card__date {
		margin-inline-start: 0;
	}
	.woocommerce-account .ny-order-card__badge {
		margin-inline-start: auto;
	}
	.woocommerce-account .ny-order-item__thumb img {
		width: 48px;
		height: 48px;
	}
	.woocommerce-account .ny-order-card__foot {
		flex-direction: column;
		align-items: stretch;
	}
	.woocommerce-account .ny-order-card__actions {
		justify-content: stretch;
	}
	.woocommerce-account .ny-order-card__actions .ny-btn {
		flex: 1 1 auto;
	}
}
