/* ═══════════════════════════════════════════════════════════════
   ASABA SEAFOOD — MOBILE-FIXES.CSS
   Enqueue after fixes.css. Covers:
   1. Search icon-toggle + mobile overlay
   2. Location as a proper tappable link
   3. Dish card as <a> wrapper (removes underline, fixes colours)
   4. Dish card button isolation (fav + add-to-cart)
   ═══════════════════════════════════════════════════════════════ */


/* ──────────────────────────────────────────
   1. TOPBAR SEARCH — DESKTOP (always visible)
────────────────────────────────────────── */

/* The pill container */
.topbar-search {
	flex: 1;
	max-width: 420px;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--card, #161C24);
	border: 1px solid var(--border, rgba(255,255,255,0.07));
	border-radius: 12px;
	padding: 0 14px;
	height: 40px;
	transition: border-color 0.2s;
}
.topbar-search:focus-within {
	border-color: var(--orange, #FF6240);
}

/* Search icon button (shows on mobile, acts as label on desktop) */
.search-icon-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--muted, #8896A6);
	display: flex;
	align-items: center;
	flex-shrink: 0;
	transition: color 0.2s;
	line-height: 1;
}
.search-icon-btn:hover,
.topbar-search:focus-within .search-icon-btn {
	color: var(--orange, #FF6240);
}

/* Input wrapper — always shown on desktop */
.search-input-wrap {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
}

/* The actual search form + input */
.asaba-search-form {
	display: contents;
}
.asaba-search-form input[type="search"],
.asaba-search-form input[name="s"] {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: var(--white, #fff);
	font-size: 14px;
	font-family: var(--font-body, sans-serif);
	min-width: 0;
	width: 100%;
	-webkit-appearance: none;
	appearance: none;
}
.asaba-search-form input[type="search"]::-webkit-search-cancel-button,
.asaba-search-form input[type="search"]::-webkit-search-decoration {
	display: none;
}
.asaba-search-form input[type="search"]::placeholder,
.asaba-search-form input[name="s"]::placeholder {
	color: var(--muted2, #5E6E7E);
}
/* Hide the form's own submit button — the icon is enough */
.asaba-search-form .asaba-search-submit {
	display: none;
}


/* ──────────────────────────────────────────
   MOBILE SEARCH OVERLAY
   Full-width drop-down bar that slides in from the top
────────────────────────────────────────── */
.mobile-search-overlay {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 1050;
	background: rgba(8,12,16,0.96);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--border2, rgba(255,255,255,0.12));
	padding: 14px 16px;
	transform: translateY(-110%);
	transition: transform 0.28s cubic-bezier(0.32, 1.1, 0.64, 1);
	pointer-events: none;
}
.mobile-search-overlay.open {
	transform: translateY(0);
	pointer-events: all;
}

.mobile-search-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--card, #161C24);
	border: 1px solid var(--border2, rgba(255,255,255,0.12));
	border-radius: 14px;
	padding: 0 14px;
	height: 48px;
}
.mobile-search-inner:focus-within {
	border-color: var(--orange, #FF6240);
}
.mobile-search-inner .asaba-search-form {
	flex: 1;
	display: flex;
	align-items: center;
}
.mobile-search-inner .asaba-search-form input[type="search"],
.mobile-search-inner .asaba-search-form input[name="s"] {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: var(--white, #fff);
	font-size: 16px; /* 16px prevents iOS zoom-in on focus */
	font-family: var(--font-body, sans-serif);
	min-width: 0;
	width: 100%;
	-webkit-appearance: none;
}
.mobile-search-inner .asaba-search-form input::placeholder { color: var(--muted2, #5E6E7E); }
.mobile-search-inner .asaba-search-form .asaba-search-submit { display: none; }

.mobile-search-close {
	background: none;
	border: none;
	color: var(--muted, #8896A6);
	font-size: 16px;
	cursor: pointer;
	padding: 4px;
	flex-shrink: 0;
	transition: color 0.15s;
	line-height: 1;
}
.mobile-search-close:hover { color: var(--white, #fff); }

/* On desktop: overlay is never shown — always use inline search */
@media (min-width: 641px) {
	.mobile-search-overlay { display: none !important; }
	.search-input-wrap { display: flex; }
}

/* On mobile: hide the inline input, only show the toggle icon */
@media (max-width: 640px) {
	.topbar-search {
		flex: 0 0 40px;
		width: 40px;
		max-width: 40px;
		min-width: 40px;
		padding: 0;
		justify-content: center;
		background: var(--card, #161C24);
	}
	.topbar-search:focus-within {
		/* Don't expand the container — overlay handles that */
		border-color: var(--border, rgba(255,255,255,0.07));
	}
	.search-input-wrap {
		display: none; /* hidden on mobile — overlay takes over */
	}
	.search-icon-btn {
		width: 40px;
		height: 40px;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}


/* ──────────────────────────────────────────
   2. LOCATION — TAPPABLE LINK STYLES
────────────────────────────────────────── */
a.topbar-location {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	cursor: pointer;
	flex-shrink: 0;
	border-radius: 10px;
	padding: 6px 8px;
	margin: -6px -8px; /* keep visual size, expand tap target */
	transition: background 0.15s;
	-webkit-tap-highlight-color: rgba(255,98,64,0.15);
}
a.topbar-location:hover,
a.topbar-location:focus {
	background: rgba(255,98,64,0.08);
	outline: none;
}
a.topbar-location:active {
	background: rgba(255,98,64,0.15);
}
.loc-text-wrap { display: flex; flex-direction: column; }
.loc-text  { font-size: 13px; font-weight: 500; color: var(--white, #fff); }
.loc-sub   { font-size: 11px; color: var(--muted, #8896A6); margin-top: 1px; }

/* Hide the sub-text on small phones to save space */
@media (max-width: 400px) {
	.loc-sub { display: none; }
}
/* Hide text on very small phones — keep only the pin icon */
@media (max-width: 360px) {
	.loc-text { display: none; }
}


/* ──────────────────────────────────────────
   3. DISH CARD AS <a> WRAPPER
   Reset link styles so the card doesn't look like a hyperlink
────────────────────────────────────────── */
a.dish-card {
	text-decoration: none;
	color: inherit;
	display: flex;        /* was block — flex keeps column layout */
	flex-direction: column;
	/* Tap highlight on mobile */
	-webkit-tap-highlight-color: rgba(255,98,64,0.08);
}
a.dish-card:hover,
a.dish-card:focus {
	outline: none; /* we handle focus via border-color below */
}
a.dish-card:focus-visible {
	outline: 2px solid var(--orange, #FF6240);
	outline-offset: 2px;
}
/* Keep all child text colours unchanged */
a.dish-card .dish-cat  { color: var(--orange, #FF6240); }
a.dish-card .dish-name { color: var(--white, #fff); }
a.dish-card .dish-price,
a.dish-card .dish-price .woocommerce-Price-amount { color: var(--gold, #F4C153); }


/* ──────────────────────────────────────────
   4. BUTTON ISOLATION
   .add-btn and .dish-fav must NOT trigger the card navigation.
   They use JS stopPropagation, but we also need pointer-events
   and z-index so touch events land on the button not the card.
────────────────────────────────────────── */
a.dish-card .add-btn,
a.dish-card .dish-fav {
	position: relative;
	z-index: 3; /* above the card link layer */
	/* Enlarge tap target without changing visual size */
	-webkit-tap-highlight-color: transparent;
}
/* Minimum 44×44px tap target (WCAG 2.5.5) */
a.dish-card .add-btn {
	min-width: 44px;
	min-height: 44px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}
a.dish-card .dish-fav {
	min-width: 44px;
	min-height: 44px;
}

/* ──────────────────────────────────────────
   5. TOPBAR RESPONSIVE CLEANUP
────────────────────────────────────────── */
@media (max-width: 480px) {
	.topbar-cart-label { display: none; }
	.asaba-topbar { gap: 8px; padding: 0 12px; }
}
@media (max-width: 360px) {
	.loc-icon { width: 28px; height: 28px; font-size: 14px; }
}
/* ──────────────────────────────────────────
   Ensure front‑page content is full‑width on mobile
────────────────────────────────────────── */
.asaba-front-page-content {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 16px; /* keep a little breathing room, or set to 0 if you want edge‑to‑edge */
    box-sizing: border-box;
}

/* Remove any possible restrictions from parent containers */
@media (max-width: 768px) {
    .site-main,
    main,
    .site-content,
    .content-area {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
}

/* ──────────────────────────────────────────
   FULL WIDTH ON MOBILE
   Forces hero and front-page content to be edge-to-edge
────────────────────────────────────────── */

/* Hero – remove outer margins on mobile */
@media (max-width: 768px) {
    .asaba-hero {
        margin: 0 !important;
        border-radius: 0 !important;
    }
}

/* Front‑page content wrapper – full width with optional side padding */
.asaba-front-page-content {
    width: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 16px;
    box-sizing: border-box;
}

/* If you want the content to touch the very edges (no padding), change to: padding: 0; */

/* Remove any width restrictions from parent containers that might interfere */
@media (max-width: 768px) {
    .site-main,
    main,
    .site-content,
    .content-area,
    .woocommerce .woocommerce-breadcrumb,
    .woocommerce .woocommerce-notices-wrapper {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}