/*
 * AhmedabadMart public styles (Section 12: responsive, Indian directory
 * style, WhatsApp & Call buttons). Namespaced under .ahm- to avoid
 * clashing with theme styles; kept deliberately simple so any theme's
 * typography/colors still show through.
 */

.ahm-container,
.ahm-home,
.ahm-search-page,
.ahm-categories-page,
.ahm-areas-page,
.ahm-business-profile,
.ahm-add-business,
.ahm-vendor-dashboard,
.ahm-login-register {
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px;
	box-sizing: border-box;
}

.ahm-listing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
	margin-top: 15px;
}

.ahm-listing-card {
	position: relative;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ahm-listing-card-thumb img {
	width: 100%;
	height: 160px;
	object-fit: cover;
	display: block;
}

.ahm-listing-card h3 {
	font-size: 16px;
	margin: 10px 12px 4px;
}

.ahm-listing-card-actions {
	display: flex;
	gap: 8px;
	padding: 0 12px 12px;
}

.ahm-badge {
	position: absolute;
	top: 8px;
	z-index: 2;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 20px;
	color: #fff;
	font-weight: 600;
}

.ahm-badge-featured {
	left: 8px;
	background: #ff6a00;
}

.ahm-badge-verified {
	right: 8px;
	background: #1e8e3e;
}

.ahm-badge-emergency {
	background: #d93025;
	margin-left: 8px;
}

.ahm-btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	border: none;
}

.ahm-btn-call {
	background: #1a73e8;
	color: #fff;
}

.ahm-btn-whatsapp {
	background: #25d366;
	color: #fff;
}

.ahm-btn-submit {
	background: #128c7e;
	color: #fff;
	margin-top: 15px;
}

.ahm-term-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.ahm-term-grid li a {
	display: block;
	padding: 8px 16px;
	background: #f2f2f2;
	border-radius: 20px;
	text-decoration: none;
	color: #333;
}

.ahm-term-grid-large li a {
	display: flex;
	justify-content: space-between;
	min-width: 180px;
	border-radius: 8px;
}

.ahm-search-bar input[type="text"],
.ahm-search-form input[type="text"],
.ahm-search-form select {
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	margin-right: 8px;
}

fieldset {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	margin-bottom: 20px;
	padding: 15px 20px;
}

fieldset label {
	display: block;
	margin-bottom: 12px;
	font-weight: 600;
}

fieldset input[type="text"],
fieldset input[type="email"],
fieldset input[type="url"],
fieldset input[type="number"],
fieldset input[type="date"],
fieldset input[type="password"],
fieldset select,
fieldset textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-weight: 400;
	margin-top: 4px;
	box-sizing: border-box;
}

.ahm-checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 6px;
}

.ahm-inline-checkbox {
	display: flex !important;
	align-items: center;
	gap: 6px;
	font-weight: 400 !important;
}

.ahm-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 15px;
}

.ahm-notice-success {
	background: #e6f4ea;
	color: #1e8e3e;
}

.ahm-notice-error {
	background: #fce8e6;
	color: #d93025;
}

.ahm-notice-info {
	background: #e8f0fe;
	color: #1a73e8;
}

.ahm-profile-header {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.ahm-profile-header img {
	width: 160px;
	height: 160px;
	object-fit: cover;
	border-radius: 10px;
}

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

.ahm-gallery-grid img {
	width: 100%;
	height: 110px;
	object-fit: cover;
	border-radius: 6px;
}

.ahm-dashboard-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}

.ahm-dashboard-table th,
.ahm-dashboard-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
}

.ahm-login-register {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
}

@media (max-width: 640px) {
	.ahm-login-register {
		grid-template-columns: 1fr;
	}

	.ahm-profile-header {
		flex-direction: column;
	}
}

/* AJAX image upload widget (drag-drop + preview + progress) */
.ahm-upload-field {
	margin-bottom: 10px;
}

.ahm-upload-dropzone {
	border: 2px dashed #c8ccd4;
	border-radius: 8px;
	padding: 24px;
	text-align: center;
	cursor: pointer;
	background: #fafbfc;
	transition: border-color 0.15s, background 0.15s;
}

.ahm-upload-dropzone:hover,
.ahm-upload-dropzone.is-dragover {
	border-color: #128c7e;
	background: #f0faf8;
}

.ahm-upload-dropzone p {
	margin: 0;
	color: #667;
	font-weight: 400;
	font-size: 13px;
}

.ahm-upload-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 10px;
}

.ahm-upload-item {
	position: relative;
	width: 100px;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	font-size: 11px;
	padding-bottom: 4px;
}

.ahm-upload-item img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	display: block;
}

.ahm-upload-name {
	display: block;
	padding: 4px 6px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ahm-upload-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	height: 3px;
	background: #128c7e;
	width: 0%;
	transition: width 0.2s;
}

.ahm-upload-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(0,0,0,0.6);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	cursor: pointer;
	line-height: 1;
}

.ahm-upload-item.ahm-upload-error {
	border-color: #d93025;
}

.ahm-upload-error-message {
	display: block;
	padding: 2px 6px;
	color: #d93025;
}
