/**
 * Bourbon Distilleries Directory Stylesheet
 * Premium styling matching the card design mockup and original site layout.
 */

:root {
	--bdd-gold: #f3c043;
	--bdd-gold-hover: #d9a01c;
	--bdd-dark-blue: #1b355a;
	--bdd-text-dark: #334155;
	--bdd-text-light: #64748b;
	--bdd-bg-card: #ffffff;
	--bdd-bg-page: #fafaf9;
	--bdd-border-radius: 16px;
	--bdd-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	--bdd-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bdd-card-image-container img {
	aspect-ratio: 1 / 1;
}

/* Container Layout */
.bdd-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 1250px;
	margin: 0 auto;
	padding: 0px;
	font-family: 'Montserrat', sans-serif;
	color: var(--bdd-text-dark);
	border-radius: 20px;
	box-shadow: var(--bdd-shadow);
}

@media (min-width: 913px) {
	.bdd-container {
		flex-direction: row;
	}
}

/* Sidebar Styling */
.bdd-sidebar {
	flex: 0 0 100%;
	max-width: 100%;
}

@media (min-width: 913px) {
	.bdd-sidebar {
		flex: 0 0 280px;
		max-width: 280px;
	}
}

.bdd-sidebar-sticky {
	position: sticky;
	top: 30px;
	background: #ffffff;
	padding: 25px;
	border-radius: var(--bdd-border-radius);
	border: 1px solid rgba(243, 192, 67, 0.3);
	box-shadow: var(--bdd-shadow);
}

.bdd-sidebar-title {
	font-family: 'Cinzel', serif;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--bdd-dark-blue);
	margin-top: 0;
	margin-bottom: 20px;
	position: relative;
	padding-bottom: 10px;
}

.bdd-sidebar-title::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 50px;
	height: 3px;
	background-color: var(--bdd-gold);
	border-radius: 2px;
}

/* Search input wrapper */
.bdd-search-wrapper {
	position: relative;
	margin-bottom: 20px;
}

.bdd-search-input {
	width: 100%;
	padding: 12px 40px 12px 16px;
	font-size: 0.95rem;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	background-color: #f8fafc;
	color: var(--bdd-text-dark);
	transition: var(--bdd-transition);
	box-sizing: border-box;
}

.bdd-search-input:focus {
	outline: none;
	border-color: var(--bdd-gold);
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(243, 192, 67, 0.15);
}

.bdd-search-icon {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--bdd-text-light);
	pointer-events: none;
	display: flex;
	align-items: center;
}

.bdd-search-input:focus + .bdd-search-icon {
	color: var(--bdd-gold);
}

/* Location select dropdown */
.bdd-location-wrapper {
	margin-bottom: 20px;
}

.bdd-location-select {
	width: 100%;
	padding: 12px 16px;
	font-size: 0.95rem;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	background-color: #f8fafc;
	color: var(--bdd-text-dark);
	transition: var(--bdd-transition);
	box-sizing: border-box;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%252364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' class='feather feather-chevron-down' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
}

.bdd-location-select:focus {
	outline: none;
	border-color: var(--bdd-gold);
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(243, 192, 67, 0.15);
}

/* Sidebar count and loading */
.bdd-sidebar-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15px;
	font-size: 0.85rem;
	color: var(--bdd-text-light);
}

.bdd-count-status {
	font-weight: 500;
}

.bdd-count-current, .bdd-count-total {
	color: var(--bdd-dark-blue);
	font-weight: 700;
}

/* Spinner */
.bdd-loader {
	display: inline-block;
}

.bdd-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid rgba(243, 192, 67, 0.2);
	border-top-color: var(--bdd-gold);
	border-radius: 50%;
	animation: bdd-spin 0.8s linear infinite;
}

@keyframes bdd-spin {
	to { transform: rotate(360deg); }
}

/* Main Content area */
.bdd-main-content {
	flex: 1;
}

/* Grid & Cards (Responsive setup) */
.bdd-grid {
	display: grid;
	grid-template-columns: 1fr; /* 1 column default (mobile) */
	gap: 10px;
	transition: opacity 0.2s ease-in-out;
}

@media (min-width: 601px) and (max-width: 1023px) {
	.bdd-grid {
		grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on tablet */
	}
}

@media (min-width: 1025px) {
	.bdd-grid {
		grid-template-columns: repeat(3, 1fr) !important; /* 3 columns on desktop */
	}
}

@media (max-width: 1024px) {
	.bdd-grid {
		grid-template-columns: repeat(2, 1fr) !important; /* 3 columns on desktop */
	}
}
@media (max-width: 480px) {
    .bdd-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}
/* Individual Card Styling */
.bdd-card {
	background-color: var(--bdd-bg-card);
	border: 1.5px solid var(--bdd-gold);
	border-radius: var(--bdd-border-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	box-shadow: var(--bdd-shadow);
	transition: var(--bdd-transition);
}

.bdd-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(243, 192, 67, 0.15);
}

/* Card Image container */
.bdd-card-image-container {
	width: 100%;
	height: 280px;
	border-radius: 12px;
	overflow: hidden;
	background-color: #fcfbf7;
	position: relative;
	border: 1px solid rgba(0, 0, 0, 0.03);
}

.bdd-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: var(--bdd-transition);
}

/* Product bottles centered fit fallback */
.bdd-card-image[src*="png"], 
.bdd-card-image[src*="bottle"],
.bdd-card-image[src*="Low_Res"],
.bdd-card-image[src*="BOTTLEDINBOND"] {
	object-fit: contain;
	padding: 10px;
	box-sizing: border-box;
}

.bdd-card:hover .bdd-card-image {
	transform: scale(1.05);
}

.bdd-card-image-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(243, 192, 67, 0.1) 0%, rgba(27, 53, 90, 0.05) 100%);
}

.bdd-card-image-placeholder span {
	font-family: 'Cinzel', serif;
	font-size: 3rem;
	font-weight: 700;
	color: var(--bdd-gold);
	opacity: 0.6;
}

/* Card Body text elements */
.bdd-card-body {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.bdd-card-title {
	font-family: Denton Test !important;
	font-size: 17px !important;
	color: #040726;
	line-height: 22px !important;
	font-weight: 700;
	margin: 0 0 12px 0;
	min-height: 2.2rem;
	display: flex;
	align-items: center;
}

.bdd-card-divider {
	border: 0;
	height: 1.5px;
	background-color: var(--bdd-gold);
	margin: 0 0 16px 0;
	width: 100%;
}

.bdd-card-info-item {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
	font-size: 0.95rem;
}

.bdd-card-icon-wrapper {
	color: var(--bdd-gold);
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.bdd-card-link {
	color: #0f172a;
	text-decoration: none;
	word-break: break-all;
	transition: var(--bdd-transition);
	font-size: 13px;
	line-height: 20px;
}

.bdd-card-link:hover {
	color: var(--bdd-gold-hover);
	text-decoration: underline;
}

.bdd-no-link {
	color: var(--bdd-text-light);
	font-style: italic;
}

.bdd-location-text {
	color: #0f172a;
}

/* Pagination container */
.bdd-pagination-container {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

.bdd-pagination {
	display: flex;
	align-items: center;
	gap: 8px;
}

.bdd-page-btn {
	background: #ffffff;
	border: 1px solid rgba(243, 192, 67, 0.4);
	color: var(--bdd-text-dark);
	font-weight: 600;
	font-size: 0.95rem;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: var(--bdd-transition);
}

.bdd-page-btn:hover {
	border-color: var(--bdd-gold);
	background-color: rgba(243, 192, 67, 0.05);
	color: var(--bdd-dark-blue);
}

.bdd-page-btn.active {
	background-color: var(--bdd-gold);
	border-color: var(--bdd-gold);
	color: #ffffff;
	box-shadow: 0 4px 10px rgba(243, 192, 67, 0.25);
}

.bdd-page-btn.disabled, .bdd-page-btn:disabled {
	background-color: #f1f5f9;
	border-color: #cbd5e1;
	color: #94a3b8;
	cursor: not-allowed;
}

/* Loading Skeletons CSS */
.bdd-skeleton-card {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: var(--bdd-border-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	box-shadow: var(--bdd-shadow);
	pointer-events: none;
}

.bdd-skeleton-image {
	width: 100%;
	height: 280px;
	border-radius: 12px;
	background-color: #f1f5f9;
	position: relative;
	overflow: hidden;
}

.bdd-skeleton-title {
	height: 24px;
	width: 70%;
	background-color: #f1f5f9;
	border-radius: 6px;
	margin-top: 16px;
	margin-bottom: 12px;
	position: relative;
	overflow: hidden;
}

.bdd-skeleton-line {
	height: 1.5px;
	background-color: #e2e8f0;
	margin-bottom: 16px;
}

.bdd-skeleton-text {
	height: 16px;
	width: 90%;
	background-color: #f1f5f9;
	border-radius: 4px;
	margin-bottom: 12px;
	position: relative;
	overflow: hidden;
}

.bdd-skeleton-text-short {
	height: 16px;
	width: 50%;
	background-color: #f1f5f9;
	border-radius: 4px;
	margin-bottom: 12px;
	position: relative;
	overflow: hidden;
}

/* Skeleton animation */
.bdd-skeleton-image::after,
.bdd-skeleton-title::after,
.bdd-skeleton-text::after,
.bdd-skeleton-text-short::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	transform: translateX(-100%);
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.6) 20%,
		rgba(255, 255, 255, 0.6) 60%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: bdd-shimmer 1.5s infinite;
}

@keyframes bdd-shimmer {
	100% { transform: translateX(100%); }
}

/* No results state */
.bdd-no-results {
	grid-column: 1 / -1;
	text-align: center;
	padding: 50px 20px;
	background: #ffffff;
	border-radius: var(--bdd-border-radius);
	border: 1px dashed rgba(243, 192, 67, 0.5);
}

.bdd-no-results p {
	font-family: 'Cinzel', serif;
	font-size: 1.2rem;
	color: var(--bdd-text-light);
	margin: 0;
}