/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* ==========================================================
   Описания на продукти: менюта, слайдшоу, превключвател, видео, мрежи
   (използва се заедно с js/dc-product.js)
   ========================================================== */
/* празни абзаци, които WordPress добавя автоматично между елементите */
.dc-tabs p:empty,
.dc-slider p:empty,
.dc-toggle p:empty,
.dc-media p:empty,
.dc-grid-2 p:empty,
.dc-grid-3 p:empty { display: none; }

.dc-tabs { margin: 20px 0 32px; }
.dc-tabs__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.wd-entry-content .dc-tabs__btn,
.dc-tabs__btn {
	appearance: none; display: inline-flex; align-items: center; min-height: 38px; margin: 0; padding: 8px 18px;
	border: 1px solid rgba(0, 0, 0, .12); border-radius: 999px; background: #fff; box-shadow: none;
	color: var(--wd-title-color, #242424); font-family: var(--wd-title-font); font-size: 14px; font-weight: 500;
	line-height: 1.2; letter-spacing: 0; text-transform: none; cursor: pointer;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.wd-entry-content .dc-tabs__btn:hover,
.wd-entry-content .dc-tabs__btn:focus-visible,
.wd-entry-content .dc-tabs__btn.is-active,
.dc-tabs__btn.is-active {
	background: var(--wd-primary-color); border-color: var(--wd-primary-color); color: #fff;
}
.dc-tabs__pane { display: none; }
.dc-tabs__pane.is-active { display: block; animation: dcFade .35s ease; }
.dc-tabs__pane > p { margin: 12px auto 0; max-width: 760px; text-align: center; }
/* Абзац преди снимката е текст, не надпис под нея: подравнен вляво и с разстояние до снимката */
.dc-tabs__pane > p:has(+ figure) { margin: 0 auto 16px; text-align: start; }
@keyframes dcFade { from { opacity: 0; } to { opacity: 1; } }

.dc-media img,
.dc-tabs__pane > img { display: block; width: auto; max-width: 100%; height: auto; max-height: 680px; margin: 0 auto; border-radius: var(--wd-brd-radius, 10px); }
.dc-video { display: block; width: 100%; height: auto; border-radius: var(--wd-brd-radius, 10px); background: #0b0b0b; object-fit: cover; }
.dc-media { margin: 16px 0 28px; }

.dc-grid-2,
.dc-grid-3 { display: grid; gap: 12px; margin: 16px 0 28px; }
.dc-tabs__pane .dc-grid-2,
.dc-tabs__pane .dc-grid-3 { margin: 0; }
.dc-grid-2 { grid-template-columns: repeat(2, 1fr); }
.dc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.dc-grid-2 figure,
.dc-grid-3 figure { position: relative; margin: 0; }
.dc-grid-2 img,
.dc-grid-3 img { display: block; width: 100%; height: auto; border-radius: var(--wd-brd-radius, 10px); }
.dc-label { position: absolute; left: 12px; bottom: 12px; z-index: 1; max-width: calc(100% - 24px); padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; line-height: 1.4; }
.dc-label.is-accent { background: var(--wd-primary-color); }

/* Слайдшоу със стрелки */
.dc-slider { position: relative; overflow: hidden; margin: 16px 0 28px; border-radius: var(--wd-brd-radius, 10px); }
.dc-tabs__pane .dc-slider { margin: 0; }
.dc-slider__track { display: flex; transition: transform .5s ease; will-change: transform; }
.dc-slider__slide { position: relative; flex: 0 0 100%; min-width: 0; margin: 0; }
.dc-slider__slide img,
.dc-slider__slide video { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; }
.dc-slider .dc-label { left: 50%; bottom: 40px; transform: translateX(-50%); white-space: nowrap; }
.wd-entry-content .dc-slider__arrow,
.dc-slider__arrow {
	position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0; transform: translateY(-50%);
	border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	color: var(--wd-title-color, #242424); cursor: pointer; transition: background-color .2s ease, color .2s ease;
}
.dc-slider__arrow svg { width: 20px; height: 20px; }
.dc-slider__prev { left: 14px; }
.dc-slider__next { right: 14px; }
.wd-entry-content .dc-slider__arrow:hover,
.wd-entry-content .dc-slider__arrow:focus-visible,
.dc-slider__arrow:hover { background: var(--wd-primary-color); color: #fff; }
.dc-slider__dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; display: flex; justify-content: center; gap: 6px; }
.wd-entry-content .dc-slider__dot,
.dc-slider__dot {
	width: 8px; height: 8px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 999px;
	background: rgba(255, 255, 255, .6); box-shadow: 0 0 3px rgba(0, 0, 0, .35); cursor: pointer; transition: width .25s ease, background-color .25s ease;
}
.wd-entry-content .dc-slider__dot.is-active,
.dc-slider__dot.is-active { width: 22px; background: #fff; }

/* Превключвател OFF / ON (напр. P-Log) */
.dc-toggle { margin: 16px 0 28px; text-align: center; }
.dc-toggle__media { position: relative; overflow: hidden; border-radius: var(--wd-brd-radius, 10px); }
.dc-toggle__media .dc-video { border-radius: 0; }
.dc-toggle__shade {
	position: absolute; inset: 0; z-index: 1; pointer-events: none;
	background: rgba(216, 216, 216, .8); border-left: 1px solid #fff; transition: transform 1s ease;
}
.dc-toggle.is-on .dc-toggle__shade { transform: translateX(100%); }
.dc-toggle__switch { position: relative; display: inline-flex; margin-top: 14px; padding: 0; border-radius: 80px; background: #4c4d51; }
.dc-toggle__switch::after {
	content: ""; position: absolute; top: 4px; left: 4px; width: calc(50% - 8px); height: calc(100% - 8px);
	border-radius: 80px; background: #fff; transition: left .35s ease, background-color .35s ease;
}
.dc-toggle.is-on .dc-toggle__switch::after { left: calc(50% + 4px); background: var(--wd-primary-color); }
.wd-entry-content .dc-toggle__btn,
.dc-toggle__btn {
	position: relative; z-index: 1; width: 80px; height: 44px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 80px; background: transparent; box-shadow: none; color: #fff;
	font-family: var(--wd-title-font); font-size: 15px; font-weight: 600; line-height: 44px; letter-spacing: .5px; text-transform: uppercase;
	cursor: pointer; transition: color .35s ease;
}
.wd-entry-content .dc-toggle__btn:hover,
.wd-entry-content .dc-toggle__btn:focus { background: transparent; color: #fff; }
.wd-entry-content .dc-toggle:not(.is-on) .dc-toggle__btn[data-state="off"],
.dc-toggle:not(.is-on) .dc-toggle__btn[data-state="off"] { color: #242424; }

.wd-entry-content ul.dc-stats,
.dc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 28px; padding: 0; list-style: none; }
.wd-entry-content ul.dc-stats li,
.dc-stats li { margin: 0; padding: 16px 12px; border-radius: var(--wd-brd-radius, 10px); background: #f3f6fd; text-align: center; line-height: 1.4; }
.wd-entry-content ul.dc-stats li::before { display: none; }
.dc-stats strong { display: block; margin-bottom: 4px; color: var(--wd-primary-color); font-family: var(--wd-title-font); font-size: 22px; font-weight: 600; }

.dc-note { font-size: 13px; opacity: .85; }

@media (max-width: 767px) {
	.dc-tabs__nav { gap: 6px; }
	.wd-entry-content .dc-tabs__btn,
	.dc-tabs__btn { font-size: 13px; padding: 7px 13px; min-height: 44px; }
	.dc-grid-3 { grid-template-columns: 1fr; }
	.wd-entry-content .dc-slider__arrow,
	.dc-slider__arrow { width: 34px; height: 34px; }
	.dc-slider__arrow svg { width: 16px; height: 16px; }
	.dc-slider__prev { left: 8px; }
	.dc-slider__next { right: 8px; }
	.dc-slider__dots { bottom: 8px; }
	.dc-slider .dc-label { bottom: 26px; font-size: 12px; padding: 3px 10px; }
	.dc-label { left: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 12px; padding: 3px 10px; }
	.wd-entry-content ul.dc-stats,
	.dc-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.wd-entry-content ul.dc-stats li,
	.dc-stats li { padding: 12px 8px; font-size: 13px; }
	.wd-entry-content ul.dc-stats li:last-child:nth-child(odd),
	.dc-stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
	.dc-stats strong { font-size: 18px; }
}
