/* Asere Shipping Package Builder — Public Styles */

/* ── Reset helpers ── */
.asere-hidden { display: none !important; }

/* ── Wrapper ── */
.asere-builder {
	max-width: 860px;
	margin: 0 auto;
	font-family: inherit;
	padding: 0 16px;
	box-sizing: border-box;
}

/* ── Hero ── */
.asere-hero {
	text-align: center;
	padding: 40px 24px;
	background: linear-gradient(135deg, #0073aa, #005a87);
	border-radius: 12px;
	color: #fff;
	margin-bottom: 32px;
}
.asere-hero h2 {
	font-size: 2em;
	margin: 0 0 8px;
	color: #fff;
	line-height: 1.2;
}
.asere-subtitle {
	font-size: 1.05em;
	opacity: .9;
	margin-bottom: 24px;
	line-height: 1.5;
}

.asere-how {
	background: #f0f4f8;
	border-radius: 10px;
	padding: 20px 24px;
	margin-top: 24px;
}
.asere-how h3 { margin-top: 0; color: #0073aa; }
.asere-how ol { margin: 0; padding-left: 20px; line-height: 2; }

/* ── Buttons ── */
.asere-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 22px;
	border-radius: 6px;
	font-size: .95em;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	text-decoration: none;
	transition: background .2s, border-color .2s, color .2s;
	white-space: nowrap;
	line-height: 1.2;
	box-sizing: border-box;
}
.asere-btn-primary {
	background: #0073aa;
	color: #fff;
	border-color: #0073aa;
}
.asere-btn-primary:hover { background: #005a87; border-color: #005a87; color: #fff; }
.asere-btn-secondary {
	background: #fff;
	color: #0073aa;
	border-color: #0073aa;
}
.asere-btn-secondary:hover { background: #e8f4fb; }
.asere-btn-link {
	background: none;
	border: none;
	color: #0073aa;
	padding: 11px 6px;
	text-decoration: underline;
	font-weight: 600;
}
.asere-btn-link:hover { color: #005a87; }
.asere-btn-lg { padding: 14px 34px; font-size: 1.1em; }
.asere-btn-sm { padding: 6px 14px; font-size: .85em; }
.asere-btn-danger { background: #d63638; color: #fff; border-color: #d63638; }
.asere-btn-danger:hover { background: #b32d2e; }

/* ── Step actions — buttons always on same row ── */
.asere-step-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: 12px;
	align-items: center;
	margin-top: 28px;
}
/* Primary/secondary buttons in step actions expand to fill available space equally */
.asere-step-actions .asere-btn-primary,
.asere-step-actions .asere-btn-secondary {
	flex: 1 1 auto;
	text-align: center;
}
/* Back/link button stays compact */
.asere-step-actions .asere-btn-link {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* ── Cards ── */
.asere-cards-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}
.asere-card {
	flex: 1 1 240px;
	background: #fff;
	border: 2px solid #e0e5ea;
	border-radius: 12px;
	padding: 22px 18px;
	transition: border-color .2s, box-shadow .2s;
	box-sizing: border-box;
}
.asere-card:hover { border-color: #0073aa; box-shadow: 0 4px 16px rgba(0,115,170,.12); }
.asere-card-icon { font-size: 2.2em; margin-bottom: 10px; }
.asere-card h3 { margin: 0 0 8px; font-size: 1.05em; line-height: 1.3; }
.asere-card p { color: #555; font-size: .9em; margin-bottom: 16px; line-height: 1.5; }
.asere-card > .asere-btn { width: 100%; text-align: center; margin-top: auto; }

.asere-shipping-card ul {
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
	font-size: .88em;
	color: #444;
}
.asere-shipping-card ul li { padding: 2px 0; }
.asere-shipping-card ul li::before { content: "• "; color: #0073aa; }

/* ── Step heading ── */
.asere-step > h2 {
	font-size: 1.45em;
	margin-bottom: 20px;
	color: #23282d;
	border-bottom: 2px solid #e0e5ea;
	padding-bottom: 10px;
	line-height: 1.3;
}

/* ── Form fields ── */
.asere-field-group { margin-bottom: 18px; }
.asere-field-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #333;
	font-size: .95em;
}
.asere-input {
	width: 100%;
	max-width: 440px;
	padding: 10px 13px;
	border: 2px solid #c8d0d8;
	border-radius: 6px;
	font-size: 1em;
	transition: border-color .2s;
	box-sizing: border-box;
	-webkit-appearance: none;
}
.asere-input:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0,115,170,.15);
}
.asere-input-sm { max-width: 120px; }

/* ── Search dropdown ── */
.asere-dropdown {
	border: 2px solid #0073aa;
	border-radius: 6px;
	background: #fff;
	max-height: 220px;
	overflow-y: auto;
	box-shadow: 0 4px 16px rgba(0,0,0,.12);
	z-index: 999;
	max-width: 440px;
}
.asere-dropdown-item {
	padding: 10px 14px;
	cursor: pointer;
	font-size: .93em;
	border-bottom: 1px solid #f0f0f0;
}
.asere-dropdown-item:hover { background: #e8f4fb; }
.asere-no-results { color: #888; cursor: default; }

.asere-info-box {
	background: #e8f4fb;
	border-left: 4px solid #0073aa;
	padding: 10px 14px;
	border-radius: 4px;
	font-size: .9em;
	margin-top: 8px;
	max-width: 440px;
}

/* ── Add-ons ── */
.asere-addons-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.asere-addon-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #f8f9fa;
	border: 1px solid #e0e5ea;
	border-radius: 8px;
	padding: 12px 16px;
	cursor: pointer;
	flex-wrap: wrap;
}
.asere-addon-item:hover { border-color: #0073aa; }
.asere-addon-name { font-weight: 600; flex: 1; min-width: 120px; }
.asere-addon-price { color: #0073aa; font-weight: 600; white-space: nowrap; }
.asere-addon-desc { width: 100%; color: #666; font-size: .88em; margin-top: 4px; }
.asere-addon-none { margin-top: 8px; }

/* ── Alerts ── */
.asere-alert {
	padding: 14px 18px;
	border-radius: 8px;
	margin: 16px 0;
	font-size: .95em;
	line-height: 1.5;
}
.asere-alert-error   { background: #fef0f0; border-left: 4px solid #d63638; color: #5c2122; }
.asere-alert-success { background: #edfaef; border-left: 4px solid #00a32a; color: #1a4d27; }
.asere-alert-warning { background: #fff8e5; border-left: 4px solid #f0b849; color: #4f3a0e; }
.asere-alert-warning h2 { margin-top: 0; color: inherit; }
.asere-notice { background: #f0f4f8; border-radius: 6px; padding: 10px 14px; font-size: .9em; color: #444; }

/* ── Quote card ── */
.asere-quote-card {
	background: #fff;
	border: 2px solid #0073aa;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
}
.asere-quote-card h2 { color: #0073aa; margin-top: 0; font-size: 1.4em; }
.asere-quote-subtitle { color: #666; margin-bottom: 20px; }
.asere-quote-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
}
.asere-quote-table td {
	padding: 9px 6px;
	border-bottom: 1px solid #f0f0f0;
	font-size: .93em;
	vertical-align: middle;
}
.asere-quote-table td:first-child { color: #555; padding-right: 12px; }
.asere-quote-table td:last-child { text-align: right; color: #222; font-weight: 500; }
.asere-total-row td { font-size: 1.05em; border-top: 2px solid #0073aa; border-bottom: none; padding-top: 12px; }
.asere-quote-expiry { color: #555; font-size: .88em; }
.asere-disclaimer {
	font-size: .82em;
	color: #888;
	border-top: 1px solid #eee;
	padding-top: 12px;
	margin-top: 12px;
	line-height: 1.5;
}
.asere-warnings { margin-bottom: 12px; }
.asere-warning {
	color: #8a6d3b;
	background: #fff8e5;
	border-left: 4px solid #f0b849;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: .88em;
	margin-bottom: 6px;
	line-height: 1.4;
}

/* ── User info confirmation card (step 7, logged-in) ── */
.asere-user-info-card {
	background: #f0f4f8;
	border: 2px solid #c2d4e0;
	border-radius: 10px;
	padding: 16px 20px;
	margin-bottom: 20px;
}
.asere-user-info-row {
	display: flex;
	gap: 12px;
	align-items: baseline;
	padding: 5px 0;
	font-size: .95em;
	border-bottom: 1px solid #dde5ec;
}
.asere-user-info-row:last-child { border-bottom: none; }
.asere-user-label {
	min-width: 72px;
	font-weight: 600;
	color: #555;
	font-size: .88em;
	text-transform: uppercase;
	letter-spacing: .03em;
}

/* ── Loading overlay ── */
.asere-loading-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255,255,255,.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	font-size: 1.2em;
	font-weight: 600;
	color: #0073aa;
}

/* ── Cuba address ── */
.asere-cuba-address-wrap { max-width: 700px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.asere-saved-addresses { margin-bottom: 24px; }
.asere-address-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.asere-address-card {
	flex: 1 1 220px;
	background: #f8f9fa;
	border: 2px solid #e0e5ea;
	border-radius: 10px;
	padding: 16px;
	box-sizing: border-box;
}
.asere-address-card p { margin: 4px 0; font-size: .9em; }
.asere-address-card .asere-btn { margin: 4px 2px 0; }
.asere-selected-address {
	background: #edfaef;
	border: 2px solid #00a32a;
	border-radius: 10px;
	padding: 18px 20px;
	margin-top: 16px;
}
.asere-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 20px;
}
.asere-full-width { grid-column: 1 / -1; }

/* ── Store products modal ── */
.asere-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 10000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
	box-sizing: border-box;
}
.asere-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 820px;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 48px);
	box-shadow: 0 10px 50px rgba(0,0,0,.25);
	overflow: hidden;
}
.asere-modal-header {
	padding: 18px 20px 14px;
	border-bottom: 2px solid #e0e5ea;
	flex-shrink: 0;
	background: #fff;
}
.asere-modal-title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.asere-modal-title-row h3 { margin: 0; font-size: 1.1em; color: #23282d; }
.asere-modal-close {
	background: none;
	border: none;
	font-size: 1.3em;
	cursor: pointer;
	color: #666;
	padding: 4px 8px;
	border-radius: 4px;
	line-height: 1;
}
.asere-modal-close:hover { background: #f0f4f8; color: #333; }

/* Weight progress meter */
.asere-weight-meter { display: flex; align-items: center; gap: 12px; }
.asere-weight-meter-bar {
	flex: 1;
	height: 10px;
	background: #e0e5ea;
	border-radius: 5px;
	overflow: hidden;
	display: flex;
	align-items: stretch;
}
.asere-weight-fill-locked {
	height: 100%;
	background: #8899aa;
	flex-shrink: 0;
	transition: width .3s ease;
	width: 0%;
}
.asere-weight-fill {
	height: 100%;
	background: #00a32a;
	flex-shrink: 0;
	transition: width .3s ease, background .3s;
	width: 0%;
}
.asere-weight-fill-warn   { background: #f0b849; }
.asere-weight-fill-danger { background: #d63638; }
.asere-weight-counter-text {
	font-size: .88em;
	font-weight: 700;
	color: #333;
	white-space: nowrap;
	min-width: 130px;
	text-align: right;
}
.asere-modal-body {
	padding: 16px 20px;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}
.asere-modal-footer {
	padding: 14px 20px;
	border-top: 2px solid #e0e5ea;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-shrink: 0;
}
.asere-weight-exceeded {
	background: #fef0f0;
	border: 1px solid #d63638;
	color: #5c2122;
	border-radius: 6px;
	padding: 8px 12px;
	font-size: .88em;
	margin-bottom: 12px;
}
body.asere-modal-open { overflow: hidden; }

/* ── Product grid (store products picker) ── */
.asere-product-search-bar { margin-bottom: 16px; }
.asere-product-search-bar .asere-input { max-width: 100%; }

.asere-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 16px;
}
.asere-product-card {
	background: #fff;
	border: 2px solid #e0e5ea;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color .2s, box-shadow .2s;
}
.asere-product-card:hover { border-color: #0073aa; box-shadow: 0 3px 12px rgba(0,115,170,.1); }
.asere-product-img {
	width: 100%;
	height: 110px !important;
	object-fit: cover !important;
	object-position: center;
	display: block;
	background: #f0f4f8;
	flex-shrink: 0;
}
.asere-product-img-placeholder {
	width: 100%;
	height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2.4em;
	background: #f0f4f8;
	flex-shrink: 0;
}
.asere-product-info { padding: 10px 10px 4px; flex: 1; }
.asere-product-name { font-weight: 600; font-size: .88em; margin: 0 0 4px; line-height: 1.35; color: #222; }
.asere-product-meta { font-size: .82em; color: #0073aa; margin: 0; }
.asere-product-action { padding: 8px 10px 10px; }
.asere-product-action .asere-btn { width: 100%; text-align: center; }

.asere-qty-control {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.asere-qty-btn {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid #0073aa;
	background: #fff;
	color: #0073aa;
	font-size: 1.1em;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: background .15s, color .15s;
}
.asere-qty-btn:hover { background: #0073aa; color: #fff; }
.asere-qty-val { font-weight: 700; font-size: .95em; min-width: 20px; text-align: center; }

.asere-product-pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.asere-page-btn {
	padding: 5px 11px;
	border: 2px solid #c8d0d8;
	border-radius: 5px;
	background: #fff;
	cursor: pointer;
	font-size: .88em;
	font-weight: 600;
	transition: border-color .2s, background .2s;
}
.asere-page-btn:hover, .asere-page-btn.active {
	border-color: #0073aa;
	background: #0073aa;
	color: #fff;
}

.asere-no-products { color: #888; font-size: .95em; padding: 20px 0; text-align: center; }

.asere-selected-summary {
	background: #f0f4f8;
	border: 2px solid #c2d4e0;
	border-radius: 10px;
	padding: 14px 16px;
	margin-top: 12px;
}
.asere-selected-summary h3 { margin: 0 0 10px; font-size: 1em; color: #0073aa; }
.asere-selected-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 5px 0;
	border-bottom: 1px solid #dde5ec;
	font-size: .9em;
}
.asere-selected-row:last-child { border-bottom: none; }
.asere-selected-name { flex: 1; font-weight: 600; }
.asere-selected-qty  { color: #555; white-space: nowrap; }
.asere-selected-weight { color: #0073aa; font-weight: 600; white-space: nowrap; }
.asere-selected-total { margin: 10px 0 0; font-size: .92em; color: #444; }

/* ── My Account — Cuba Addresses ── */
.asere-account-cuba-section {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #e0e5ea;
}
.asere-account-cuba-section h3 {
	font-size: 1.1em;
	margin-bottom: 6px;
}
.asere-account-cuba-section .asere-address-cards {
	margin-bottom: 16px;
}
.asere-acct-card-actions {
	margin-top: 10px;
	display: flex;
	gap: 8px;
}
.asere-acct-card-actions .button:last-child {
	color: #d63638;
	border-color: #d63638;
}
.asere-acct-card-actions .button:last-child:hover {
	background: #d63638;
	color: #fff;
}
.asere-acct-addr-form {
	margin-top: 16px;
	padding: 20px;
	background: #f8f9fa;
	border: 1px solid #e0e5ea;
	border-radius: 8px;
}
.asere-acct-addr-form h4 {
	margin-top: 0;
	margin-bottom: 16px;
	font-size: 1em;
	color: #23282d;
}
.asere-acct-addr-form .asere-form-grid .input-text,
.asere-acct-addr-form .asere-form-grid .select,
.asere-acct-addr-form .asere-form-grid textarea {
	width: 100%;
	box-sizing: border-box;
}
.asere-acct-form-btns { margin-top: 14px; display: flex; gap: 10px; }
.asere-acct-msg {
	padding: 9px 14px;
	border-radius: 5px;
	font-size: .9em;
	margin-bottom: 10px;
}
.asere-acct-msg-error   { background: #fef0f0; border-left: 3px solid #d63638; color: #5c2122; }
.asere-acct-msg-success { background: #edfaef; border-left: 3px solid #00a32a; color: #1a4d27; }

/* ── Miscellanies upsell section ── */
.asere-misc-upsell {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px dashed #c2d4e0;
}
.asere-upsell-message {
	background: #fff8e5;
	border-left: 4px solid #f0b849;
	border-radius: 4px;
	padding: 12px 16px;
	font-size: .9em;
	color: #4f3a0e;
	margin-bottom: 14px;
	line-height: 1.5;
}

/* ── Single product calculator notice ── */
.asere-single-calc-notice {
	margin-bottom: 16px;
}

/* ════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 680px)
   ════════════════════════════════════════ */
@media (max-width: 680px) {
	.asere-builder { padding: 0 12px; }

	.asere-hero { padding: 28px 16px; border-radius: 10px; }
	.asere-hero h2 { font-size: 1.55em; }
	.asere-subtitle { font-size: .97em; }

	.asere-cards-row { flex-direction: column; gap: 12px; }
	.asere-card { flex: none; width: 100%; }

	.asere-step > h2 { font-size: 1.25em; }

	.asere-input { max-width: 100%; }
	.asere-dropdown { max-width: 100%; }
	.asere-info-box { max-width: 100%; }

	.asere-quote-card { padding: 16px; border-radius: 10px; }
	.asere-quote-card h2 { font-size: 1.2em; }

	.asere-form-grid { grid-template-columns: 1fr; }

	.asere-address-cards { flex-direction: column; }
	.asere-address-card { flex: none; width: 100%; }

	.asere-product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* ════════════════════════════════════════
   RESPONSIVE — Phone (≤ 480px)
   ════════════════════════════════════════ */
@media (max-width: 480px) {
	.asere-builder { padding: 0 8px; }

	.asere-hero { padding: 22px 14px; border-radius: 8px; margin-bottom: 20px; }
	.asere-hero h2 { font-size: 1.35em; }
	.asere-btn-lg { padding: 12px 20px; font-size: 1em; }

	/* Stack step-action buttons vertically, full width */
	.asere-step-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.asere-step-actions .asere-btn-primary,
	.asere-step-actions .asere-btn-secondary {
		width: 100%;
		flex: none;
		padding: 13px 16px;
	}
	/* Back link stays its own line but left-aligned */
	.asere-step-actions .asere-btn-link {
		align-self: flex-start;
		padding: 6px 0;
		order: -1; /* keep "← Atrás" at top */
	}

	.asere-btn { font-size: .92em; }

	.asere-step > h2 { font-size: 1.15em; padding-bottom: 8px; margin-bottom: 16px; }

	.asere-how { padding: 16px; }
	.asere-how ol { font-size: .93em; line-height: 1.85; }

	.asere-quote-table td { font-size: .87em; padding: 7px 4px; }
	.asere-quote-card { padding: 14px 12px; }

	.asere-field-group label { font-size: .9em; }
	.asere-input { padding: 10px 11px; font-size: .97em; }

	.asere-addon-item { padding: 10px 12px; }
	.asere-addon-name { font-size: .93em; }

	.asere-alert { padding: 12px 14px; font-size: .9em; }

	.asere-cuba-address-wrap { padding: 0 4px; }

	.asere-product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.asere-product-img { height: 90px !important; }
	.asere-product-img-placeholder { height: 90px; }
}
