/*
Theme Name: Caster Creek Mega
Theme URI: https://castercreek.com/
Description: Custom Amazon-style storefront child theme for Caster Creek. Built on Astra.
Author: Caster Creek
Version: 1.1.0
Template: astra
Text Domain: castercreek-mega
*/

:root {
	--ddm-ink: #1D3B74;
	--ddm-ink-2: #0E1728;
	--ddm-accent: #f5b83d;
	--ddm-accent-d: #e3a521;
	--ddm-buy: #ffa41c;
}
.ddm-topbar { background: #0E1728; }

/* ---------- Archive / shop page ---------- */
.ddm-shop-page { padding: 16px 0 34px; }
.ddm-crumbs { font-size: 13px; color: #565959; margin: 0 0 14px; }
.ddm-crumbs a { color: #007185; }
.ddm-crumbs a:hover { text-decoration: underline; }
.ddm-crumbs .ddm-sep { margin: 0 6px; color: #9aa0a6; }
.ddm-shop__main > .ddm-muted { margin: -4px 0 14px; color: #565959; font-size: 14px; }

.ddm-item__media { aspect-ratio: 1; display: block; }
.ddm-item__img { display: block; width: 100%; height: 100%; }
.ddm-item__img img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 10px; }
.ddm-item__off {
	position: absolute; top: 10px; left: 10px; z-index: 2;
	background: #cc0c39; color: #fff; font-size: 12px; font-weight: 700;
	padding: 3px 9px; border-radius: 4px; letter-spacing: .02em;
}
.ddm-item__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.ddm-item__title { font-size: 15px; line-height: 1.35; margin: 0; font-weight: 600; }
.ddm-item__title a { color: #0f1111; }
.ddm-item__title a:hover { color: #007185; text-decoration: underline; }
.ddm-item__price { font-size: 19px; font-weight: 700; color: var(--ddm-ink); }
.ddm-item__price del { font-size: 14px; font-weight: 400; color: #8a8f94; margin-right: 6px; }
.ddm-item__price ins { text-decoration: none; color: #cc0c39; }
.ddm-item__ship { font-size: 12.5px; color: #565959; }
.ddm-item__cta { margin-top: auto; padding-top: 4px; }
.ddm-qv-btn {
	position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%) translateY(6px);
	opacity: 0; transition: .16s; background: rgba(255,255,255,.96); border: 1px solid #d5d9d9;
	border-radius: 18px; padding: 5px 14px; font-size: 12px; cursor: pointer; color: #0f1111;
}
.ddm-item:hover .ddm-qv-btn { opacity: 1; transform: translateX(-50%) translateY(0); }

.ddm-empty { background: #fff; border: 1px solid #d5d9d9; border-radius: 8px; padding: 46px 28px; text-align: center; }
.ddm-empty h2 { margin: 0 0 8px; font-size: 22px; color: var(--ddm-ink); }
.ddm-empty p { color: #565959; margin: 0 0 18px; }
.ddm-empty .ddm-btn { display: inline-block; background: #ffd814; border: 1px solid #fcd200; color: #0f1111; border-radius: 20px; padding: 9px 22px; font-weight: 600; }

.ddm-filters-toggle { display: none; }
.ddm-filters-close { display: none; position: absolute; top: 8px; right: 10px; border: 0; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- Navigation polish ---------- */
.ddm-strip__row { gap: 2px; }
.ddm-nav__item > a { display: block; padding: 9px 11px; border-radius: 4px; color: #fff; font-size: 14px; white-space: nowrap; }
.ddm-nav__item > a:hover { background: rgba(255,255,255,.12); outline: 1px solid rgba(255,255,255,.22); }
.ddm-nav__morebtn { background: transparent; border: 0; color: #fff; font-size: 14px; padding: 9px 11px; cursor: pointer; border-radius: 4px; }
.ddm-nav__morebtn:hover { background: rgba(255,255,255,.12); }
.ddm-nav__morelist { background: #fff; border-radius: 8px; box-shadow: 0 10px 28px rgba(15,17,17,.22); padding: 8px; min-width: 220px; }
.ddm-nav__morelist a { display: block; padding: 8px 12px; color: #0f1111; font-size: 14px; border-radius: 6px; }
.ddm-nav__morelist a:hover { background: #f0f2f2; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.ddm-shop { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 900px) {
	.ddm-shop { display: block; }
	.ddm-filters-toggle {
		display: inline-block; margin-bottom: 12px; border: 1px solid #d5d9d9;
		border-radius: 8px; padding: 9px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
	}
	.ddm-filters {
		position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 1200;
		border-radius: 0; max-height: none; transform: translateX(-104%);
		transition: transform .22s ease; padding-top: 44px;
	}
	.ddm-shop.show-filters .ddm-filters { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
	.ddm-filters-close { display: block; }
	.ddm-toolbar { align-items: flex-start; }
}
@media (max-width: 640px) {
	.ddm-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.ddm-item__title { font-size: 13.5px; }
	.ddm-item__price { font-size: 17px; }
	.ddm-item__ship { font-size: 11.5px; }
	.ddm-qv-btn { display: none; }
	.ddm-shop__title { font-size: 18px; }
	.ddm-toolbar { padding: 10px 12px; }
	.ddm-sort { font-size: 13px; }
	.ddm-view { display: none; }
	.ddm-boxes { margin-top: 18px; }
	.ddm-section__head h2 { font-size: 19px; }
	.ddm-news__inner { display: block; text-align: center; }
	.ddm-footer__grid { gap: 10px; }
}
@media (max-width: 420px) {
	.ddm-grid { grid-template-columns: 1fr; }
	.ddm-logo { font-size: 23px; }
}

/* ---------- Single product + generic pages ---------- */
.single-product .ast-container, .page .ast-container, .archive .ast-container { max-width: 1500px; }
.single-product .site-content, .page .site-content { background: #fff; }
.single-product div.product .product_title { font-size: 26px; color: #0f1111; }
.single-product div.product .price { color: var(--ddm-ink); font-weight: 700; }
.single-product .single_add_to_cart_button { background: #ffd814 !important; border: 1px solid #fcd200 !important; color: #0f1111 !important; border-radius: 22px !important; font-weight: 600 !important; }
.single-product .single_add_to_cart_button:hover { background: #f7ca00 !important; }
body.ddm .entry-content a.button, body.ddm .wc-block-components-button { border-radius: 22px; }
@media (max-width: 640px) { .single-product div.product .product_title { font-size: 20px; } .page .entry-content { font-size: 15px; } }

/* ---------- Single product (PDP) ---------- */
.ddm-pdp-page { padding: 14px 0 30px; }
.ddm-catbar { font-size: 13px; font-weight: 700; color: var(--ddm-ink); padding: 8px 0; border-bottom: 1px solid #e3e6e6; margin-bottom: 10px; }
.ddm-info { min-width: 0; }
.ddm-pdp__title { font-size: 26px; line-height: 1.3; margin: 0 0 4px; font-weight: 600; color: #0f1111; }
.ddm-pdp__sub { font-size: 13px; color: #007185; margin-bottom: 4px; }
.ddm-rrow__c { font-size: 13px; color: #007185; }
.ddm-hr { border: 0; border-top: 1px solid #e3e6e6; margin: 12px 0; }
.ddm-prow { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ddm-prow__off { font-size: 13.5px; color: #cc0c39; font-weight: 600; }
.ddm-prow__off del { color: #8a8f94; font-weight: 400; }
.ddm-ret { font-size: 13px; color: #007185; margin-bottom: 14px; }
.ddm-ret summary { cursor: pointer; }
.ddm-ret p { color: #565959; font-size: 13px; margin: 6px 0 0; }
.ddm-h2 { font-size: 18px; font-weight: 700; color: #0f1111; margin: 16px 0 8px; }
.ddm-more { display: inline-block; margin-top: 12px; color: #007185; font-size: 14px; }
.ddm-buyform { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.ddm-qty { font-size: 13px; color: #0f1111; display: flex; align-items: center; gap: 8px; }
.ddm-qty select { flex: 1; padding: 6px 8px; border: 1px solid #d5d9d9; border-radius: 8px; background: #f0f2f2; }
.ddm-add, .ddm-now { border: 1px solid #fcd200; border-radius: 22px; padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%; }
.ddm-add { background: #ffd814; color: #0f1111; }
.ddm-add:hover { background: #f7ca00; }
.ddm-now { background: #ffa41c; border-color: #ff8f00; color: #0f1111; }
.ddm-now:hover { background: #fa8900; }
.ddm-stock { color: #007600; font-size: 17px; font-weight: 600; margin: 8px 0 2px; }
.ddm-stock--out { color: #cc0c39; }
.ddm-bb__t { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.ddm-bb__t th { text-align: left; color: #565959; font-weight: 400; padding: 3px 0; }
.ddm-bb__t td { text-align: right; padding: 3px 0; }
.ddm-bb__t a { color: #007185; }
.ddm-secure { font-size: 12.5px; color: #565959; margin: 8px 0 0; }
.ddm-lists { display: flex; flex-direction: column; gap: 8px; }
.ddm-wish, .ddm-cmp { background: #fff; border: 1px solid #d5d9d9; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; cursor: pointer; }
.ddm-wish:hover, .ddm-cmp:hover { background: #f7fafa; }
.ddm-sec { background: #fff; border-top: 1px solid #e3e6e6; padding: 22px 0; }
.ddm-aplus { font-size: 15px; line-height: 1.6; color: #0f1111; max-width: 980px; }
.ddm-aplus ul { margin-left: 18px; }
.ddm-reviews__grid { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 28px; }
.ddm-reviews__sum .ddm-rate__p { font-size: 20px; font-weight: 700; color: #0f1111; }
.ddm-muted { color: #565959; }
@media (max-width: 1100px) { .ddm-pdp { grid-template-columns: minmax(0,45fr) minmax(0,55fr); } .ddm-buy { grid-column: 1 / -1; position: static; } }
@media (max-width: 760px) { .ddm-pdp { display: block; } .ddm-gal { position: static; flex-direction: column-reverse; } .ddm-gal__thumbs { flex-direction: row; width: auto; overflow-x: auto; } .ddm-info { margin-top: 16px; } .ddm-buy { margin-top: 18px; } .ddm-pdp__title { font-size: 20px; } .ddm-reviews__grid { display: block; } .ddm-reviews__sum { margin-bottom: 16px; } }

/* ---------- Rail arrows (override Astra button styles) ---------- */
body.ddm .ddm-rail__nav, body.ddm .ddm-rail__nav:hover, body.ddm .ddm-rail__nav:focus {
	background: #ffffff; color: #0f1111; border: 1px solid #d5d9d9; border-radius: 999px;
	width: 38px; height: 38px; min-height: 0; padding: 0; line-height: 1; font-size: 22px;
	box-shadow: 0 2px 10px rgba(15,17,17,.18); display: flex; align-items: center; justify-content: center;
	position: absolute; top: 38%; z-index: 4; cursor: pointer; transition: background .15s, opacity .15s;
}
body.ddm .ddm-rail__nav:hover { background: #f0f2f2; }
body.ddm .ddm-rail__prev { left: 2px; }
body.ddm .ddm-rail__next { right: 2px; }
body.ddm .ddm-rail__wrap.is-start .ddm-rail__prev, body.ddm .ddm-rail__wrap.is-end .ddm-rail__next { opacity: 0; pointer-events: none; }
body.ddm .ddm-rail__wrap.no-scroll .ddm-rail__nav { display: none; }
body.ddm .ddm-rail__track { scroll-behavior: smooth; }
body.ddm .ddm-rail__track > * { flex: 0 0 200px; }

/* ---------- Archive pagination ---------- */
body.ddm .ddm-pager ul { display: flex; gap: 6px; justify-content: center; list-style: none; margin: 24px 0 8px; padding: 0; flex-wrap: wrap; }
body.ddm .ddm-pager li { margin: 0; }
body.ddm .ddm-pager a.page-numbers, body.ddm .ddm-pager span.page-numbers {
	display: block; padding: 8px 14px; border: 1px solid #d5d9d9; border-radius: 8px;
	background: #fff; color: #0f1111; font-size: 14px; text-decoration: none; min-width: 42px; text-align: center;
}
body.ddm .ddm-pager a.page-numbers:hover { background: #f0f2f2; border-color: #b7bcc2; }
body.ddm .ddm-pager span.current { background: var(--ddm-ink); border-color: var(--ddm-ink); color: #fff; font-weight: 700; }
body.ddm .ddm-pager .dots { border: 0; background: transparent; }
@media (max-width: 520px) { body.ddm .ddm-pager a.page-numbers, body.ddm .ddm-pager span.page-numbers { padding: 7px 11px; min-width: 36px; font-size: 13px; } }

/* ---------- Hero arrows + slide polish ---------- */
body.ddm .ddm-hero__nav, body.ddm .ddm-hero__nav:hover, body.ddm .ddm-hero__nav:focus {
	background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35);
	border-radius: 999px; width: 46px; height: 46px; min-height: 0; padding: 0; font-size: 26px;
	display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
	box-shadow: none; cursor: pointer; transition: background .15s;
}
body.ddm .ddm-hero__nav:hover { background: rgba(255,255,255,.3); }
body.ddm .ddm-hero__prev { left: 16px; }
body.ddm .ddm-hero__next { right: 16px; }
body.ddm .ddm-slide { background-color: #0E1728; }
body.ddm .ddm-slide__inner { position: relative; z-index: 2; }
body.ddm .ddm-slide p { max-width: 520px; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
body.ddm .ddm-hero h1, body.ddm .ddm-slide__title { text-shadow: 0 2px 18px rgba(0,0,0,.5); }

/* ---------- Share + gallery buttons (override Astra) ---------- */
body.ddm .ddm-share, body.ddm .ddm-share:hover, body.ddm .ddm-share:focus {
	position: absolute; top: 10px; right: 10px; z-index: 5;
	width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 999px;
	background: #fff; color: #565959; border: 1px solid #d5d9d9; box-shadow: 0 1px 4px rgba(15,17,17,.12);
	display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
body.ddm .ddm-share:hover { background: #f0f2f2; color: var(--ddm-ink); border-color: #b7bcc2; }
body.ddm .ddm-gal__main { position: relative; }
body.ddm .ddm-gal__full, body.ddm .ddm-gal__full:hover, body.ddm .ddm-gal__full:focus {
	display: block; width: 100%; margin-top: 10px; background: #fff; color: #565959;
	border: 1px solid #d5d9d9; border-radius: 8px; padding: 8px 12px; font-size: 13px;
	min-height: 0; box-shadow: none; cursor: pointer; font-weight: 400;
}
body.ddm .ddm-gal__full:hover { background: #f0f2f2; color: var(--ddm-ink); }
body.ddm .ddm-gal__t, body.ddm .ddm-gal__t:hover, body.ddm .ddm-gal__t:focus { background: #fff; min-height: 0; box-shadow: none; }
body.ddm .ddm-qv__x, body.ddm .ddm-qv__x:hover { background: #fff; color: #0f1111; border: 1px solid #d5d9d9; border-radius: 999px; width: 34px; height: 34px; min-height: 0; padding: 0; font-size: 20px; line-height: 1; box-shadow: none; }
body.ddm .ddm-filters-close, body.ddm .ddm-filters-close:hover { background: transparent; color: #0f1111; border: 0; box-shadow: none; min-height: 0; padding: 0; }

/* ---------- Lightbox ---------- */
body.ddm .ddm-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(8,17,31,.9); display: flex; align-items: center; justify-content: center; padding: 40px 70px; }
body.ddm .ddm-lb[hidden] { display: none; }
body.ddm .ddm-lb img { max-width: 100%; max-height: 90vh; object-fit: contain; background: #fff; border-radius: 10px; }
body.ddm .ddm-lb__x, body.ddm .ddm-lb__p, body.ddm .ddm-lb__n,
body.ddm .ddm-lb__x:hover, body.ddm .ddm-lb__p:hover, body.ddm .ddm-lb__n:hover {
	position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3);
	border-radius: 999px; width: 48px; height: 48px; min-height: 0; padding: 0; font-size: 28px; line-height: 1;
	display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: none; z-index: 2;
}
body.ddm .ddm-lb__x:hover, body.ddm .ddm-lb__p:hover, body.ddm .ddm-lb__n:hover { background: rgba(255,255,255,.28); }
body.ddm .ddm-lb__x { top: 18px; right: 22px; }
body.ddm .ddm-lb__p { left: 18px; top: 50%; transform: translateY(-50%); }
body.ddm .ddm-lb__n { right: 18px; top: 50%; transform: translateY(-50%); }
body.ddm .ddm-gal__stage { cursor: zoom-in; overflow: hidden; }
body.ddm .ddm-gal__stage img { transition: transform .2s; }
body.ddm.ddm-noscroll { overflow: hidden; }
@media (max-width: 640px) { body.ddm .ddm-lb { padding: 20px 10px; } body.ddm .ddm-lb__p { left: 6px; } body.ddm .ddm-lb__n { right: 6px; } body.ddm .ddm-lb__x { top: 10px; right: 10px; } }

/* ---------- Hero: mobile ---------- */
@media (max-width: 860px) {
	body.ddm .ddm-hero__track { min-height: 330px; }
	body.ddm .ddm-slide { padding-bottom: 44px; padding-top: 26px; align-items: flex-end; }
	body.ddm .ddm-slide.is-active { min-height: 330px; }
	body.ddm .ddm-slide:after { background: linear-gradient(180deg, rgba(8,17,31,.30) 0%, rgba(8,17,31,.55) 45%, rgba(8,17,31,.86) 100%); }
	body.ddm .ddm-slide__kicker { font-size: 11.5px; margin-bottom: 8px; }
	body.ddm .ddm-slide h1, body.ddm .ddm-slide__title { font-size: clamp(21px, 6.4vw, 30px); max-width: 100%; margin-bottom: 8px; letter-spacing: -.4px; }
	body.ddm .ddm-slide p { font-size: 14px; margin-bottom: 16px; max-width: 100%; }
	body.ddm .ddm-cta { padding: 11px 22px; font-size: 14.5px; }
	body.ddm .ddm-hero__nav { display: none !important; }
	body.ddm .ddm-hero__dots { bottom: 12px; }
	body.ddm .ddm-boxes { margin-top: 16px; }
}
@media (max-width: 480px) {
	body.ddm .ddm-hero__track, body.ddm .ddm-slide.is-active { min-height: 300px; }
	body.ddm .ddm-slide { padding-bottom: 38px; }
}

/* ---------- Mobile: header not sticky ---------- */
@media (max-width: 860px) {
	body.ddm .ddm-header { position: static !important; top: auto !important; }
	body.admin-bar.ddm .ddm-header { top: auto !important; }
	body.ddm .ddm-filters { top: 0; }
	body.ddm .ddm-gal, body.ddm .ddm-buy { position: static !important; top: auto !important; }
	body.ddm .ddm-hero { touch-action: pan-y; }
}

/* Hero transition speed on mobile */
@media (max-width: 860px) { body.ddm .ddm-slide { transition: opacity .3s ease; } }

body.ddm .ddm-nav__morelist { max-height: 60vh; overflow-y: auto; padding: 8px; }
body.ddm .ddm-nav__more[hidden] { display: none !important; }
