
/* ==========================================================
   Captain Candy Product Showcase
   Frontend styles
   ========================================================== */

@font-face {
	font-family: "Algeria";
	src: url("https://captaincandy.us/wp-content/uploads/2026/08/ALGERIA.ttf") format("truetype");
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

.ccps-section {
	--ccps-bg: #fbf5e4;
	--ccps-card: #ffffff;
	--ccps-text: #211813;
	--ccps-red: #a60000;
	--ccps-gold-light: #f7e2a0;
	--ccps-gold: #ddb94e;
	--ccps-gold-dark: #c39a29;
	position: relative;
	width: 100%;
	background: transparent;
	box-sizing: border-box;
	font-family: Arial, Helvetica, sans-serif;
}

.ccps-section *,
.ccps-section *::before,
.ccps-section *::after {
	box-sizing: border-box;
}

.ccps-container {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

/* ==========================================================
   SHOWCASE: exact 2 columns x 2 rows inside the available area
   ========================================================== */

.ccps-layout-showcase {
	padding: 20px 10px 30px;
	background: transparent;
	overflow: hidden;
}

.ccps-products-slider {
	position: relative;
	width: 100%;
	padding-bottom: 30px;
	overflow: hidden;
}

.ccps-layout-showcase .ccps-products-track {
	--ccps-slider-gap: 14px;
	display: grid;
	grid-template-rows: repeat(2, auto);
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - var(--ccps-slider-gap)) / 2);
	gap: var(--ccps-slider-gap);
	align-items: stretch;
	width: 100%;
	padding: 2px 1px 15px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ccps-layout-showcase .ccps-products-track::-webkit-scrollbar {
	display: none;
}

/* ==========================================================
   CUSTOM RESPONSIVE GRID + SHOWCASE SLIDER
   Reuses the exact same lightweight slider controls as Showcase,
   while allowing independent responsive column counts. Two rows
   are retained so the slider behaves like the approved showcase.
   ========================================================== */

.ccps-layout-custom-slider {
	padding: 20px 0 30px;
	background: transparent;
	overflow: hidden;
}

.ccps-layout-custom-slider .ccps-products-track {
	--ccps-slider-gap: 14px;
	display: grid;
	grid-template-rows: repeat(2, auto);
	grid-auto-flow: column;
	grid-auto-columns: var(--ccps-custom-slider-desktop-basis);
	gap: var(--ccps-slider-gap);
	align-items: stretch;
	width: 100%;
	padding: 2px 1px 15px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.ccps-layout-custom-slider .ccps-products-track::-webkit-scrollbar {
	display: none;
}

/* ==========================================================
   STANDARD GRID: full-width normal product display
   ========================================================== */

.ccps-layout-grid {
	padding: 20px 0 30px;
	background: transparent;
}

.ccps-layout-grid .ccps-products-track {
	display: grid;
	grid-template-columns: repeat(var(--ccps-grid-columns, 4), minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
	width: 100%;
}

/* ==========================================================
   CUSTOM RESPONSIVE GRID: full-width layout with independent
   desktop / tablet / mobile column controls.
   ========================================================== */

.ccps-layout-custom {
	padding: 20px 0 30px;
	background: transparent;
}

.ccps-layout-custom .ccps-products-track {
	display: grid;
	grid-template-columns: repeat(var(--ccps-custom-desktop-columns, 4), minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
	width: 100%;
}

/* ==========================================================
   PRODUCT CARD
   ========================================================== */

.ccps-product-card {
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 0;
	border-radius: 17px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, .02);
}

.ccps-layout-showcase .ccps-product-card,
.ccps-layout-custom-slider .ccps-product-card {
	scroll-snap-align: start;
}

/* ==========================================================
   BADGE
   ========================================================== */

.ccps-product-tag {
	position: absolute;
	z-index: 10;
	top: 14px;
	left: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: calc(100% - 20px);
	min-height: 38px;
	padding: 8px 13px;
	border-radius: 6px;
	background: #a60000;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: clamp(10px, 1vw, 15px);
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	text-transform: uppercase;
	overflow: hidden;
}

.ccps-tag-bestseller {
	background: #a60000;
	color: #fff;
}

.ccps-tag-licorice {
	background: #7f1818;
	color: #fff;
}

/* Keep other source badges visually consistent. */
.ccps-product-tag:not(.ccps-tag-bestseller):not(.ccps-tag-licorice) {
	background: #7f1818;
	color: #fff;
}

/* ==========================================================
   CARD IMAGE
   ========================================================== */

.ccps-card-gallery {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 13px 6px 0;
}

.ccps-card-image-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.ccps-card-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	transform: scale(1.03);
	transition: transform .35s ease, opacity .2s ease;
}

.ccps-product-card:hover .ccps-card-image {
	transform: scale(1.06);
}

.ccps-card-image-arrow {
	position: absolute;
	z-index: 8;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #ccc;
	font-size: 35px;
	line-height: 1;
	cursor: pointer;
}

.ccps-card-image-prev {
	left: 4px;
}

.ccps-card-image-next {
	right: 4px;
}

/* ==========================================================
   CARD CONTENT
   ========================================================== */

.ccps-card-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 5px 9px 20px;
}

.ccps-product-title {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	width: 100%;
	min-height: 50px;
	margin: 0 auto 16px;
	text-align: center;
	color: #211813;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(13px, 1.15vw, 20px);
	font-weight: 400;
	line-height: 1.06;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.ccps-card-action {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.ccps-view-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 88%;
	min-height: 50px;
	padding: 10px 15px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(110deg, #f8e5a6 0%, #e2bf50 48%, #c69c2a 100%);
	color: #231d17;
	font-family: "Algeria", Arial, Helvetica, sans-serif;
	font-size: clamp(13px, 1.1vw, 18px);
	text-transform: uppercase;
	font-weight: 700;
	letter-spacing: .10em;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(205, 163, 44, .20);
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.ccps-view-button:hover {
	transform: translateY(-2px);
	filter: brightness(1.03);
	box-shadow: 0 13px 30px rgba(205, 163, 44, .28);
}

.ccps-view-icon {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	color: currentColor;
}

/* ==========================================================
   SHOWCASE SLIDER NAVIGATION
   ========================================================== */

.ccps-slider-arrow {
	position: absolute;
	z-index: 20;
	top: 43%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid rgba(166, 0, 0, .12);
	border-radius: 50%;
	background: rgba(255, 255, 255, .96);
	color: #a60000;
	font-size: 30px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 5px 18px rgba(0, 0, 0, .13);
	transform: translateY(-50%);
	transition: opacity .2s ease, transform .2s ease;
}

.ccps-slider-arrow:hover {
	transform: translateY(-50%) scale(1.07);
}

.ccps-slider-prev {
	left: 4px;
}

.ccps-slider-next {
	right: 4px;
}

.ccps-slider-arrow.is-disabled {
	opacity: .25;
	pointer-events: none;
}

.ccps-slider-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 3px;
	width: 100%;
	height: 7px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(198, 156, 42, .13);
}

.ccps-slider-progress-bar {
	position: absolute;
	top: 0;
	left: 0;
	width: 25%;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, #f0d271 0%, #d1a52b 100%);
	transition: left .12s linear;
}

/* ==========================================================
   MODAL
   ========================================================== */

.ccps-modal {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .25s ease, visibility .25s ease;
}

.ccps-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ccps-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .69);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.ccps-modal-dialog {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: 1.14fr 1fr;
	/*
	 * Stable desktop modal size: large enough for the product detail, but
	 * deliberately smaller than the viewport so it never feels full-screen.
	 * The viewport fallback only applies on shorter/smaller desktop screens.
	 */
	width: min(980px, calc(100vw - 80px));
	height: min(640px, calc(100vh - 80px));
	max-width: 980px;
	max-height: 640px;
	overflow: hidden;
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .32);
	transform: translateY(18px) scale(.985);
	transition: transform .28s ease;
}

.ccps-modal.is-open .ccps-modal-dialog {
	transform: translateY(0) scale(1);
}

.ccps-modal-close {
	position: absolute;
	z-index: 30;
	top: 18px;
	right: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #111;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: transform .2s ease;
}

.ccps-modal-close:hover {
	transform: rotate(90deg);
}

.ccps-modal-gallery {
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	border-right: 1px solid #eee;
}

.ccps-modal-image-stage {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 65px 72px 30px;
}

.ccps-modal-main-image {
	display: block;
	width: min(82%, 440px);
	height: min(420px, 100%);
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	transition: opacity .15s ease;
}

.ccps-modal-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #929292;
	color: #fff;
	font-size: 48px;
	line-height: .8;
	cursor: pointer;
}

.ccps-modal-prev {
	left: 44px;
}

.ccps-modal-next {
	right: 44px;
}

.ccps-modal-arrow.is-hidden {
	display: none;
}

.ccps-modal-thumbnails {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	min-height: 95px;
	padding: 10px 28px 27px;
}

.ccps-modal-thumb {
	width: 54px;
	height: 54px;
	padding: 3px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
}

.ccps-modal-thumb.is-active {
	border: 2px solid #c39a29;
}

.ccps-modal-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ccps-modal-content {
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	padding: 39px 34px 35px;
}

.ccps-modal-copy {
	flex: 1;
	overflow-y: auto;
	padding-right: 25px;
}

.ccps-modal-tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 16px;
	padding: 9px 15px;
	border-radius: 6px;
	background: #7f1818;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.ccps-modal-tag.is-bestseller {
	background: #a60000;
}

.ccps-modal-title {
	margin: 0 0 14px;
	padding-right: 40px;
	color: #29211e;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(20px, 1.5vw, 27px);
	font-weight: 400;
	line-height: 1.15;
	text-transform: uppercase;
}

.ccps-modal-description {
	color: #3b3b3b;
	font-size: 16px;
	line-height: 1.62;
}

.ccps-modal-description p {
	margin: 0 0 15px;
}

.ccps-modal-description strong {
	color: #222;
}

.ccps-modal-purchase {
	padding-top: 18px;
	border-top: 1px solid #e7e7e7;
}

.ccps-modal-tube-note {
	margin: 0 0 18px;
	color: #111;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.ccps-modal-tube-note[hidden] {
	display: none !important;
}

.ccps-buy-now {
	width: 100%;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: linear-gradient(110deg, #f2d77f, #ddb52c, #c6961c);
	color: #fff !important;
	text-decoration: none !important;
	font-family: "Algeria", Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 800;
	text-transform: uppercase;
	transition: transform .18s ease, filter .18s ease;
}

.ccps-buy-now:hover {
	color: #fff !important;
	filter: brightness(.97);
	transform: translateY(-2px);
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1099px) {

	.ccps-layout-showcase .ccps-products-track {
		--ccps-slider-gap: 12px;
	}

	.ccps-layout-custom-slider .ccps-products-track {
		--ccps-slider-gap: 12px;
		grid-auto-columns: var(--ccps-custom-slider-tablet-basis);
	}


	.ccps-layout-grid .ccps-products-track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	.ccps-layout-custom .ccps-products-track {
		grid-template-columns: repeat(var(--ccps-custom-tablet-columns, 3), minmax(0, 1fr));
		gap: 18px;
	}

	.ccps-modal-dialog {
		grid-template-columns: 1fr 1fr;
		width: min(900px, calc(100vw - 48px));
		height: min(620px, calc(100vh - 48px));
		max-width: 900px;
		max-height: 620px;
	}

	.ccps-modal-image-stage {
		padding-inline: 55px;
	}

	.ccps-modal-prev {
		left: 18px;
	}

	.ccps-modal-next {
		right: 18px;
	}
}

/* ==========================================================
   MOBILE
   Showcase stays 2 x 2 exactly as requested.
   Standard grid also stays 2 columns.
   ========================================================== */

@media (max-width: 639px) {

	.ccps-layout-showcase {
		padding: 10px 6px 22px;
	}

	.ccps-layout-showcase .ccps-products-track {
		--ccps-slider-gap: 8px;
		padding-bottom: 13px;
	}

	.ccps-layout-custom-slider {
		padding: 10px 0 22px;
	}

	.ccps-layout-custom-slider .ccps-products-track {
		--ccps-slider-gap: 8px;
		grid-auto-columns: var(--ccps-custom-slider-mobile-basis);
		padding-bottom: 13px;
	}

	.ccps-layout-grid {
		padding: 10px 0 22px;
	}

	.ccps-layout-grid .ccps-products-track {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.ccps-layout-custom {
		padding: 10px 0 22px;
	}

	.ccps-layout-custom .ccps-products-track {
		grid-template-columns: repeat(var(--ccps-custom-mobile-columns, 2), minmax(0, 1fr));
		gap: 8px;
	}

	.ccps-product-card {
		border: 0;
		border-radius: 14px;
	}

	.ccps-product-tag {
		top: 8px;
		left: 6px;
		max-width: calc(100% - 12px);
		min-height: 28px;
		padding: 6px 8px;
		border-radius: 5px;
		font-size: clamp(8px, 2.5vw, 11px);
	}

	.ccps-card-gallery {
		aspect-ratio: 1 / 1;
		padding: 10px 4px 0;
	}

	.ccps-card-content {
		padding: 3px 5px 14px;
	}

	.ccps-product-title {
		min-height: 42px;
		margin: 0 auto 11px;
		font-size: clamp(11px, 3.4vw, 15px);
		line-height: 1.04;
	}

	.ccps-view-button {
		width: 92%;
		min-height: 41px;
		padding: 8px;
		gap: 5px;
		font-size: clamp(11px, 3vw, 14px);
		letter-spacing: .07em;
	}

	.ccps-view-icon {
		width: 14px;
		height: 14px;
	}

	.ccps-slider-arrow {
		width: 30px;
		height: 30px;
		font-size: 25px;
	}

	.ccps-slider-prev {
		left: 2px;
	}

	.ccps-slider-next {
		right: 2px;
	}

	.ccps-slider-progress {
		height: 6px;
	}

	.ccps-modal {
		align-items: flex-end;
		padding: 0;
	}

	.ccps-modal-dialog {
		display: block;
		width: 100%;
		max-width: none;
		height: 94dvh;
		max-height: 94dvh;
		overflow-y: auto;
		border-radius: 18px 18px 0 0;
	}

	.ccps-modal-gallery {
		min-height: 405px;
		border-right: 0;
		border-bottom: 1px solid #eee;
	}

	.ccps-modal-image-stage {
		min-height: 320px;
		padding: 55px 45px 8px;
	}

	.ccps-modal-main-image {
		width: 92%;
		height: 275px;
	}

	.ccps-modal-arrow {
		width: 40px;
		height: 40px;
		font-size: 40px;
	}

	.ccps-modal-prev {
		left: 12px;
	}

	.ccps-modal-next {
		right: 12px;
	}

	.ccps-modal-thumbnails {
		min-height: 70px;
		padding: 7px 15px 16px;
	}

	.ccps-modal-thumb {
		width: 48px;
		height: 48px;
	}

	.ccps-modal-content {
		min-height: 390px;
		padding: 27px 20px 22px;
	}

	.ccps-modal-copy {
		overflow: visible;
		padding-right: 0;
	}

	.ccps-modal-title {
		padding-right: 35px;
		font-size: 21px;
	}

	.ccps-modal-description {
		font-size: 15px;
		line-height: 1.55;
	}

	.ccps-modal-close {
		position: fixed;
		top: max(13px, env(safe-area-inset-top));
		right: 13px;
	}

	.ccps-buy-now {
		min-height: 56px;
	}
}

@media (max-width: 380px) {

	.ccps-layout-showcase .ccps-products-track,
	.ccps-layout-custom-slider .ccps-products-track {
		--ccps-slider-gap: 6px;
	}


	.ccps-product-title {
		font-size: 10.5px;
	}

	.ccps-view-button {
		min-height: 38px;
		font-size: 10.5px;
	}

	.ccps-product-tag {
		font-size: 8px;
		padding: 5px 6px;
	}
}

/* ==========================================================
   ACCESSIBILITY
   ========================================================== */

.ccps-section button:focus-visible,
.ccps-section a:focus-visible {
	outline: 3px solid rgba(166, 0, 0, .35);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.ccps-section *,
	.ccps-section *::before,
	.ccps-section *::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
	}
}
