/**
 * Offers Section Styles - Mobile First
 * 
 * Horizontal scroll/carousel section for offers
 * Uses Palette A CSS variables for consistent theming
 *
 * @package Garage_At_Home
 */

/* Palette A CSS Variables */
:root {
	--gh-bg: #0F1113;
	--gh-surface: #141618;
	--gh-accent: #C62828;
	--gh-accent-2: #FF6F61;
	--gh-text: #F5F6F7;
	--gh-muted: #BFC4C6;
}

/* Offers Section Container */
.gh-offers-section {
	background-color: var(--gh-bg);
	padding: 2rem 0;
	position: relative;
	width: 100%;
}

/* Mobile: Reduce offers section padding */
@media (max-width: 767px) {
	.gh-offers-section {
		padding: 1rem 0;
	}
}

.gh-offers-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
	width: 100%;
}

/* Offers Header */
.gh-offers-header {
	margin-bottom: 1.5rem;
	text-align: center;
}

/* Mobile: Reduce offers header margin */
@media (max-width: 767px) {
	.gh-offers-header {
		margin-bottom: 1rem;
		padding: 0 0.5rem;
	}
}

.gh-offers-title {
	font-size: 1.5rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex-wrap: wrap;
}

/* Mobile: Smaller offers title */
@media (max-width: 767px) {
	.gh-offers-title {
		font-size: 1.25rem;
		margin: 0 0 0.375rem 0;
		gap: 0.375rem;
	}
}

.gh-offers-title-primary {
	color: var(--gh-text);
}

.gh-offers-title-accent {
	color: var(--gh-accent-2);
}

.gh-offers-subtitle {
	font-size: 0.875rem;
	color: var(--gh-muted);
	margin: 0;
	font-weight: 400;
	letter-spacing: 0.3px;
}

/* Carousel Wrapper */
.gh-offers-carousel-wrapper {
	position: relative;
	width: 100%;
}

/* Carousel Container */
.gh-offers-carousel {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	cursor: grab;
	width: 100%;
	touch-action: pan-x;
	/* Allow vertical page scroll when touching cards */
	-ms-touch-action: pan-x;
}

.gh-offers-carousel::-webkit-scrollbar {
	display: none;
}

.gh-offers-carousel:active {
	cursor: grabbing;
}

.gh-offers-carousel:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 4px;
	border-radius: 8px;
}

/* Carousel Track */
.gh-offers-track {
	display: flex;
	gap: 0.875rem;
	padding: 0 0.5rem;
	width: max-content;
}

/* Mobile: Smaller carousel track gap */
@media (max-width: 767px) {
	.gh-offers-track {
		gap: 0.625rem;
		padding: 0 0.5rem;
	}
}

/* Offer Card */
.gh-offer-card {
	flex: 0 0 auto;
	width: 220px;
	min-width: 220px;
	background: var(--gh-surface);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(255, 111, 97, 0.1);
	/* Allow touch events to pass through for scrolling */
	touch-action: manipulation;
	pointer-events: auto;
}

/* Mobile: Smaller offer cards */
@media (max-width: 767px) {
	.gh-offer-card {
		width: 180px;
		min-width: 180px;
		border-radius: 10px;
	}
}

.gh-offer-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(255, 111, 97, 0.2);
	border-color: rgba(255, 111, 97, 0.3);
}

/* Offer Media Container */
.gh-offer-media {
	width: 100%;
	height: 150px;
	background-color: var(--gh-bg);
	background-size: cover !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
	flex-shrink: 0;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	min-height: 150px;
}

/* Mobile: Smaller offer media */
@media (max-width: 767px) {
	.gh-offer-media {
		height: 120px;
		border-radius: 10px 10px 0 0;
		min-height: 120px;
	}
}

/* Ensure background image is visible when set via inline style */
.gh-offer-media[style*="background-image"] {
	background-size: cover !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
}

/* Offer Content */
.gh-offer-content {
	padding: 1rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

/* Mobile: Smaller offer content padding */
@media (max-width: 767px) {
	.gh-offer-content {
		padding: 0.75rem;
		gap: 0.25rem;
	}
}

.gh-offer-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--gh-text);
	margin: 0;
	line-height: 1.3;
	letter-spacing: 0.2px;
}

/* Mobile: Smaller offer title and subtext */
@media (max-width: 767px) {
	.gh-offer-title {
		font-size: 0.875rem;
		line-height: 1.25;
	}
}

.gh-offer-subtext {
	font-size: 0.8125rem;
	color: var(--gh-muted);
	margin: 0;
	line-height: 1.4;
	font-weight: 400;
	opacity: 0.9;
}

/* Mobile: Smaller offer subtext */
@media (max-width: 767px) {
	.gh-offer-subtext {
		font-size: 0.75rem;
		line-height: 1.35;
	}
}

/* Dot Indicators (Mobile) */
.gh-offers-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1rem;
	padding: 0 1rem;
}

.gh-offer-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background-color: var(--gh-muted);
	opacity: 0.4;
	cursor: pointer;
	transition: all 0.3s ease;
	padding: 0;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	touch-action: manipulation;
}

.gh-offer-dot:hover {
	opacity: 0.7;
	transform: scale(1.2);
}

.gh-offer-dot:focus {
	outline: 2px solid var(--gh-accent-2);
	outline-offset: 2px;
}

.gh-offer-dot.active {
	background-color: var(--gh-accent-2);
	opacity: 1;
	width: 24px;
	border-radius: 4px;
}

/* Desktop Layout */
@media (min-width: 768px) {
	.gh-offers-section {
		padding: 2.5rem 0;
	}
	
	.gh-offers-container {
		padding: 0 2rem;
	}
	
	.gh-offers-header {
		margin-bottom: 1.75rem;
		text-align: left;
	}
	
	.gh-offers-title {
		font-size: 1.875rem;
		justify-content: flex-start;
		gap: 0.75rem;
	}
	
	.gh-offers-subtitle {
		font-size: 0.9375rem;
		text-align: left;
	}
	
	.gh-offers-track {
		gap: 1.25rem;
		padding: 0 1rem;
	}
	
	.gh-offer-card {
		width: 260px;
		min-width: 260px;
	}
	
	.gh-offer-media {
		height: 180px;
	}
	
	.gh-offer-content {
		padding: 1.25rem;
		gap: 0.5rem;
	}
	
	.gh-offer-title {
		font-size: 1.125rem;
	}
	
	.gh-offer-subtext {
		font-size: 0.875rem;
	}
	
	/* Hide dots on desktop - show scrollbar instead */
	.gh-offers-dots {
		display: none;
	}
	
	/* Show thin scrollbar on desktop */
	.gh-offers-carousel {
		scrollbar-width: thin;
		scrollbar-color: var(--gh-accent-2) var(--gh-surface);
	}
	
	.gh-offers-carousel::-webkit-scrollbar {
		display: block;
		height: 6px;
	}
	
	.gh-offers-carousel::-webkit-scrollbar-track {
		background: var(--gh-surface);
		border-radius: 3px;
	}
	
	.gh-offers-carousel::-webkit-scrollbar-thumb {
		background: var(--gh-accent-2);
		border-radius: 3px;
	}
	
	.gh-offers-carousel::-webkit-scrollbar-thumb:hover {
		background: var(--gh-accent);
	}
}

/* Large Desktop */
@media (min-width: 1024px) {
	.gh-offer-card {
		width: 280px;
		min-width: 280px;
	}
	
	.gh-offer-media {
		height: 200px;
	}
}

/* Small Mobile */
@media (max-width: 480px) {
	.gh-offers-section {
		padding: 1.5rem 0;
	}
	
	.gh-offers-title {
		font-size: 1.375rem;
	}
	
	.gh-offers-header {
		margin-bottom: 1.25rem;
	}
	
	.gh-offers-track {
		gap: 0.75rem;
		padding: 0 1rem;
	}
	
	.gh-offer-card {
		width: 200px;
		min-width: 200px;
	}
	
	.gh-offer-media {
		height: 140px;
	}
	
	.gh-offer-content {
		padding: 0.875rem;
	}
}



