/*
Theme Name: TravelWP Child
Theme URI: http://travelWP.physcode.com/
Author: Physcode
Author URI: http://physcode.com/
Description: Description
Version: 1.0.1
Template:  travelwp
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: travelWP
Tags: two-columns, left-sidebar, right-sidebar, editor-style, rtl-language-support, sticky-post, theme-options, translation-ready, translation-ready

 */

/* ==========================================================================
   "Общи условия" page (page-id-13) — visual structure only.
   The parent theme rendered this page as flat <p> blocks with no headings
   or lists; the content itself was restructured into semantic HTML
   (h2/h3/ul/ol) and this styles that structure to match the site's
   existing look (Montserrat headings, amber accent), no other page is
   affected by the .page-id-13 scope.

   USE px HERE, NOT rem. The parent theme sets a 10px root font size, so
   rem lands at 62.5% of the usual assumption and this whole block was
   silently rendering at that scale: h2 at 15px, h3 at 10.5px — smaller
   than the 14px body text, so the heading hierarchy read backwards — the
   section label at 7.8px, and the 46rem measure at 460px inside an 848px
   column. (Two earlier commits tried to widen the gap above the first
   heading and it kept looking unchanged for the same reason.)
   ========================================================================== */

.page-id-13 .entry-content {
	max-width: 700px;
}

.page-id-13 .entry-content h2,
.page-id-13 .entry-content h3 {
	font-family: var(--phys-heading-font-family, "Montserrat", Helvetica, Arial, sans-serif);
	color: var(--phys-heading-color, #333);
	font-weight: 600;
	text-wrap: balance;
	scroll-margin-top: 110px;
}

.page-id-13 .entry-content h2 {
	font-size: 24px;
	margin: 42px 0 18px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--phys-body_color_primary, #ffb300);
}

.page-id-13 .entry-content h2:first-of-type {
	margin-top: 48px;
}

.page-id-13 .entry-content h3 {
	font-size: 17px;
	margin: 26px 0 11px;
	padding-left: 11px;
	border-left: 3px solid var(--phys-body_color_primary, #ffb300);
}

.page-id-13 .entry-content p {
	font-size: 16px;
	line-height: 1.75;
	margin: 0 0 14px;
}

.page-id-13 .entry-content ul.tos-list,
.page-id-13 .entry-content ol.tos-list {
	margin: 0 0 19px;
	padding-left: 21px;
}

.page-id-13 .entry-content .tos-list li {
	font-size: 16px;
	line-height: 1.75;
	margin-bottom: 10px;
}

.page-id-13 .entry-content .tos-list--refund {
	list-style: none;
	padding-left: 0;
	border-top: 1px solid #e6e6e6;
}

.page-id-13 .entry-content .tos-list--refund li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 11px 0;
	border-bottom: 1px solid #e6e6e6;
}

.page-id-13 .entry-content .tos-refund-when {
	color: #555;
}

.page-id-13 .entry-content .tos-refund-pct {
	flex: none;
	font-weight: 700;
	color: var(--phys-body_color_primary, #ffb300);
	white-space: nowrap;
}

.page-id-13 .entry-content .tos-toc {
	background: #f9f6ee;
	border-left: 3px solid var(--phys-body_color_primary, #ffb300);
	padding: 18px 22px 19px;
	margin: 0 0 32px;
	border-radius: 0 6px 6px 0;
}

.page-id-13 .entry-content .tos-toc-label {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6e6e6e;
	font-weight: 800;
}

/* Single column, with the section's own Roman numeral in front of each
   entry. The numeral comes from a counter rather than the list marker so
   it can be coloured and aligned; it mirrors the "I."–"VII." that are
   written into the h2 text below, so the two always read as a pair.
   Numerals are right-aligned in a fixed column so the titles line up
   despite "I." and "VII." being different widths. */

.page-id-13 .entry-content .tos-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: tos-section;
}

.page-id-13 .entry-content .tos-toc li {
	counter-increment: tos-section;
	display: flex;
	gap: 10px;
	font-size: 15px;
	line-height: 1.5;
	margin-bottom: 8px;
}

.page-id-13 .entry-content .tos-toc li::before {
	content: counter(tos-section, upper-roman) ".";
	flex: none;
	min-width: 2.6em;
	text-align: right;
	font-weight: 700;
	color: var(--phys-body_color_primary, #ffb300);
}

.page-id-13 .entry-content .tos-toc a {
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.page-id-13 .entry-content .tos-toc a:hover,
.page-id-13 .entry-content .tos-toc a:focus-visible {
	color: var(--phys-body_color_primary, #ffb300);
	border-bottom-color: currentColor;
}

@media (max-width: 600px) {
	.page-id-13 .entry-content .tos-list--refund li {
		flex-direction: column;
		gap: 2px;
	}
}

/* ==========================================================================
   "Защита на личните данни" page (page-id-1410) — visual structure only.
   Same treatment as page-id-13 above: the content was flat <p> blocks (plus
   a duplicate hand-written H1 on top of the theme's own page title) with no
   headings/lists. Restructured into semantic HTML and a new "Вашите права"
   section was added (standard GDPR rights, drafted generically — it does
   not state any company-specific facts). All pre-existing wording preserved
   verbatim. This scopes to .page-id-1410, reusing the same heading font/
   accent tokens as the TOS page above for a consistent look.

   Sizes are in px for the same reason as the TOS block — see the note
   there about the theme's 10px root font size.
   ========================================================================== */

.page-id-1410 .entry-content {
	max-width: 700px;
}

.page-id-1410 .entry-content h2,
.page-id-1410 .entry-content h3 {
	font-family: var(--phys-heading-font-family, "Montserrat", Helvetica, Arial, sans-serif);
	color: var(--phys-heading-color, #333);
	font-weight: 600;
	text-wrap: balance;
	scroll-margin-top: 110px;
}

.page-id-1410 .entry-content h2 {
	font-size: 24px;
	margin: 42px 0 18px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--phys-body_color_primary, #ffb300);
}

.page-id-1410 .entry-content h2:first-of-type {
	margin-top: 48px;
}

.page-id-1410 .entry-content h3 {
	font-size: 17px;
	margin: 26px 0 11px;
	padding-left: 11px;
	border-left: 3px solid var(--phys-body_color_primary, #ffb300);
}

.page-id-1410 .entry-content p {
	font-size: 16px;
	line-height: 1.75;
	margin: 0 0 14px;
}

.page-id-1410 .entry-content ul,
.page-id-1410 .entry-content ol {
	margin: 0 0 19px;
	padding-left: 21px;
}

.page-id-1410 .entry-content li {
	font-size: 16px;
	line-height: 1.75;
	margin-bottom: 10px;
}

.page-id-1410 .entry-content .privacy-authority {
	background: #f9f6ee;
	border-left: 3px solid var(--phys-body_color_primary, #ffb300);
	padding: 3px 22px;
	border-radius: 0 6px 6px 0;
}

.page-id-1410 .entry-content .privacy-authority p {
	margin: 14px 0;
}

.page-id-1410 .entry-content .privacy-toc {
	background: #f9f6ee;
	border-left: 3px solid var(--phys-body_color_primary, #ffb300);
	padding: 18px 22px 19px;
	margin: 0 0 32px;
	border-radius: 0 6px 6px 0;
}

.page-id-1410 .entry-content .privacy-toc-label {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6e6e6e;
	font-weight: 800;
}

/* Same single-column, numbered treatment as the TOS contents above —
   this page's sections run I.–VI. */

.page-id-1410 .entry-content .privacy-toc ol {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: privacy-section;
}

.page-id-1410 .entry-content .privacy-toc li {
	counter-increment: privacy-section;
	display: flex;
	gap: 10px;
	font-size: 15px;
	line-height: 1.5;
	margin-bottom: 8px;
}

.page-id-1410 .entry-content .privacy-toc li::before {
	content: counter(privacy-section, upper-roman) ".";
	flex: none;
	min-width: 2.6em;
	text-align: right;
	font-weight: 700;
	color: var(--phys-body_color_primary, #ffb300);
}

.page-id-1410 .entry-content .privacy-toc a {
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}

.page-id-1410 .entry-content .privacy-toc a:hover,
.page-id-1410 .entry-content .privacy-toc a:focus-visible {
	color: var(--phys-body_color_primary, #ffb300);
	border-bottom-color: currentColor;
}


/* ==========================================================================
   Tour listing grids — make every card in a listing identical in size.

   Applies to two places that render the same card markup through different
   containers:
     • the homepage "Популярни" block   -> .home .tours-type-pain
     • the tour category archives       -> ul.products.tours on
       /tour-category/* (Екскурзии, Почивки, Круизи, Еднодневни, Уикенд —
       these pages are all the product archive and carry identical body
       classes, so they cannot be targeted individually)

   Measured on the live site the cards were ragged everywhere: 346–460px on
   the homepage (114px spread), 376–511px on Екскурзии (135px, and 246px at
   phone width). Two independent causes:

   1. Image heights: the source images have different aspect ratios
      (500x500, 500x360, even a 194x259 portrait) and the parent theme gives
      .post_images no height, only min-height:125px, so each image imposed
      its own.
   2. Text height: even cards whose images were identical still differed,
      because some tours carry a .post_date line, long titles wrap to two
      lines, and descriptions vary in length.

   So cropping the images alone is not enough — the cards themselves have to
   be stretched to a common height. The parent theme floats the items, and
   floats cannot equalise heights, hence the switch to grid.

   Note the ::before/::after reset: the parent theme puts a clearfix on both
   containers, and in a grid formatting context those pseudo-elements become
   real grid items, which shifts every card one cell over and leaves an
   orphan on its own row.

   Column counts match what the theme already produced (4 / 2 / 1), so only
   the sizing changes, not the layout the visitor is used to. The 600px
   switch to a single column is deliberate: at 700px two columns give ~330px
   cards, while one column would stretch a card to ~680px.

   Single tour pages are unaffected — their related-tours slider is not a
   product archive and does not match either scope.
   ========================================================================== */

.home .tours-type-pain .post_images,
.post-type-archive-product ul.products.tours .post_images {
	aspect-ratio: 4 / 3;
	min-height: 0;
}

.home .tours-type-pain .post_images > a.woocommerce-LoopProduct-link,
.post-type-archive-product ul.products.tours .post_images > a.woocommerce-LoopProduct-link {
	display: block;
	height: 100%;
}

.home .tours-type-pain .post_images img.attachment-woocommerce_thumbnail,
.post-type-archive-product ul.products.tours .post_images img.attachment-woocommerce_thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.home .tours-type-pain,
.post-type-archive-product ul.products.tours {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 1fr;
}

.home .tours-type-pain::before,
.home .tours-type-pain::after,
.post-type-archive-product ul.products.tours::before,
.post-type-archive-product ul.products.tours::after {
	display: none;
}

.home .tours-type-pain .item-tour,
.post-type-archive-product ul.products.tours .item-tour {
	float: none;
	width: auto;
	display: flex;
}

.home .tours-type-pain .item_border,
.post-type-archive-product ul.products.tours .item_border {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin-bottom: 0;
}

.home .tours-type-pain .item_content,
.post-type-archive-product ul.products.tours .item_content {
	flex: 1 1 auto;
}

/* Pins the "Още" button to the bottom edge of every card */
.home .tours-type-pain .read_more,
.post-type-archive-product ul.products.tours .read_more {
	margin-top: auto;
}

@media (max-width: 991px) {
	.home .tours-type-pain,
	.post-type-archive-product ul.products.tours {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.home .tours-type-pain,
	.post-type-archive-product ul.products.tours {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Hide the empty star rating on tour listing cards.

   No tour on the site has a review, so every card rendered a row of five
   empty stars — an "0 out of 5" signal on every listing rather than a
   neutral absence. This already looked hidden on the homepage, but only by
   accident: WooCommerce scopes its .star-rating sizing under a .woocommerce
   ancestor, which the homepage body does not carry, so the element
   collapsed to 0px there while rendering at 14px on the category archives.

   Hiding it in both scopes makes the two consistent and keeps the homepage
   from suddenly growing stars if that body class ever changes. Remove this
   block if real ratings are ever collected.
   ========================================================================== */

.home .tours-type-pain .item_rating,
.post-type-archive-product ul.products.tours .item_rating {
	display: none;
}

/* ==========================================================================
   Single tour pages — let a too-wide content table scroll instead of being
   clipped on phones.

   The Adriatic cruise page (/tours/adria_cruise) has a cabin-price table
   authored in the WordPress editor with an inline `width: 1180px` and a
   pixel width on every one of its 8 columns. Measured on the live site at
   360–390px: the table renders at its full 1180px inside a ~330–356px tab
   panel, every ancestor up to <body> is `overflow-x: visible`, and
   <body>/<html> are `overflow-x: hidden` — so the overflow was simply cut
   off with no scrollbar anywhere, leaving the right-hand cabin columns and
   their prices unreachable.

   Fix: make the tab panel a horizontal scroll container so the wide table
   can be swiped sideways rather than clipped. Covers both forms of the
   WooCommerce tour tabs — desktop (`.tab-content .wc-tab`) and the phone
   accordion the tabcollapse plugin builds (`.js-tabcollapse-panel-body`).
   Inert when nothing overflows, so it is safe for every tour page and only
   the price table actually gets a scrollbar.
   ========================================================================== */

.tb_single_tour .woocommerce-tabs .tab-content .wc-tab,
.tb_single_tour .woocommerce-tabs .js-tabcollapse-panel-body {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

