/*
Theme Name:   Rummu Diving (Astra child)
Theme URI:    https://rummudiving.ee
Description:  Rummu Diving & WaterSports – lihtsustatud Astra alamteema. Brändi värvid, fondid, plokkide ja WooCommerce/Bookings kujundus.
Author:       Rummu Diving & WaterSports
Template:     astra
Version:      1.1.0
Requires at least: 6.5
Requires PHP: 8.0
License:      GPL-2.0-or-later
Text Domain:  rummudiving-child
*/

/* ------------------------------------------------------------------
 * 1. Brand tokens (from the current site: Astra palette + page colours)
 * ------------------------------------------------------------------ */
:root {
	--rummu-navy:   #1a407a;  /* main brand blue (headings, dark sections) */
	--rummu-deep:   #025176;  /* deep water */
	--rummu-ocean:  #05608a;  /* links / hover */
	--rummu-sky:    #cce6f2;  /* light section background */
	--rummu-mist:   #f2f5f6;  /* very light background */
	--rummu-amber:  #fbbf24;  /* buttons / accents (current button colour) */
	--rummu-gold:   #e9c65e;
	--rummu-sand:   #faecc5;
	--rummu-red:    #dc2626;  /* logo red, warnings */
	--rummu-ink:    #1a0e00;  /* Astra heading colour */
	--rummu-text:   #291901;  /* Astra text colour */
	--rummu-white:  #ffffff;
	--rummu-radius: 14px;
	--rummu-pill:   30px;
	--rummu-shadow: 0 6px 24px rgba(10, 30, 60, .10);
	--rummu-font-body: Helvetica, Verdana, Arial, sans-serif;
	--rummu-font-head: 'Montserrat', Helvetica, Arial, sans-serif;

	/* Astra global palette – same values as the current site so imported blocks look identical */
	--ast-global-color-0: #291901;
	--ast-global-color-1: #291901;
	--ast-global-color-2: #1A0E00;
	--ast-global-color-3: #291901;
	--ast-global-color-4: #FFF7F0;
	--ast-global-color-5: #FFFFFF;
	--ast-global-color-6: #FFE0C1;
	--ast-global-color-7: #1C1001;
	--ast-global-color-8: #222222;
}

body { font-family: var(--rummu-font-body); color: var(--rummu-text); }
h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
	font-family: var(--rummu-font-head);
	font-weight: 600;
	line-height: 1.25;
}
a { color: var(--rummu-ocean); }
a:hover, a:focus { color: var(--rummu-navy); }

/* ------------------------------------------------------------------
 * 2. Buttons (same look as today: amber pill, Montserrat 600, uppercase)
 * ------------------------------------------------------------------ */
.wp-block-button__link,
.wp-element-button,
.button, button.button, a.button, input[type="submit"],
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .wc-block-components-button:not(.is-link) {
	background-color: var(--rummu-amber);
	color: #121212;
	border: 0;
	border-radius: var(--rummu-pill);
	padding: 12px 24px;
	font-family: var(--rummu-font-head);
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1.1;
	transition: background-color .15s ease, color .15s ease;
}
.wp-block-button__link:hover, .wp-element-button:hover,
.button:hover, a.button:hover, button.button:hover, input[type="submit"]:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.wc-block-components-button:not(.is-link):hover {
	background-color: var(--rummu-navy);
	color: #fff;
}
.woocommerce a.button.alt, .woocommerce button.button.alt, .single_add_to_cart_button {
	background-color: var(--rummu-amber) !important;
	color: #121212 !important;
}
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .single_add_to_cart_button:hover {
	background-color: var(--rummu-navy) !important;
	color: #fff !important;
}

/* ------------------------------------------------------------------
 * 3. Converted page blocks (former Otter blocks -> core blocks)
 * ------------------------------------------------------------------ */
.rummu-section { padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 32px); }
.rummu-bg-light { background: var(--rummu-sky); }
.rummu-bg-dark  { background: var(--rummu-navy); color: #fff; }
.rummu-bg-dark h1, .rummu-bg-dark h2, .rummu-bg-dark h3, .rummu-bg-dark h4, .rummu-bg-dark p, .rummu-bg-dark li { color: #fff; }
.rummu-bg-white { background: #fff; }
.rummu-bg-brand { background: var(--rummu-mist); }
.rummu-bg-gradient { background: linear-gradient(180deg, #fff 0%, var(--rummu-sky) 100%); }
.has-light-bg { background: var(--rummu-mist); }
.has-dark-bg  { background: var(--rummu-navy); color: #fff; }
.has-dark-bg h2, .has-dark-bg h3, .has-dark-bg p { color: #fff; }

.rummu-text-dark  { color: var(--rummu-navy); }
.rummu-text-light { color: var(--rummu-amber); }
.rummu-text-white { color: #fff; }
.rummu-text-brand { color: var(--rummu-ink); }

.rummu-card {
	background: #fff;
	border-radius: var(--rummu-radius);
	box-shadow: var(--rummu-shadow);
	padding: 24px;
	display: flex;
	flex-direction: column;
}
.rummu-card.rummu-bg-dark { background: var(--rummu-navy); }
.rummu-card.rummu-bg-light { background: var(--rummu-sky); }
.rummu-card > .wp-block-buttons { margin-top: auto; padding-top: 12px; }
.rummu-card--image { padding: 0 0 20px; overflow: hidden; }
.rummu-card--image > *:not(.rummu-card__img) { padding-left: 20px; padding-right: 20px; }
.rummu-card__img { margin: 0 0 16px !important; }
.rummu-card__img img { width: 100%; height: 220px; object-fit: cover; display: block; }

.rummu-cards .wp-block-column { display: flex; flex-direction: column; }
.rummu-cards .wp-block-column .wp-block-buttons { margin-top: auto; }

.rummu-cover { border-radius: var(--rummu-radius); overflow: hidden; }

ul.rummu-checklist { list-style: none; padding-left: 0; margin-left: 0; }
ul.rummu-checklist li { position: relative; padding-left: 26px; margin-bottom: 8px; }
ul.rummu-checklist li::before {
	content: ""; position: absolute; left: 4px; top: .55em;
	width: 9px; height: 9px; border-radius: 50%; background: var(--rummu-amber);
}

.rummu-gallery img { border-radius: 10px; }
.rounded-image img { border-radius: var(--rummu-radius); }

/* hide post meta like before */
.entry-header .entry-meta, .o-posts-grid-post-meta { display: none; }
#ast-mobile-header .ast-site-title-wrap { display: none; }

/* transparent header must not cover shop pages */
.ast-theme-transparent-header.woocommerce-page #masthead { position: relative; background: #000; }
.ast-theme-transparent-header.woocommerce-page.ast-main-header-nav-open #masthead { position: absolute; }

/* ------------------------------------------------------------------
 * 4. WooCommerce product lists ([products] shortcode on pages)
 * ------------------------------------------------------------------ */
.woocommerce ul.products li.product {
	background: #fff;
	border-radius: var(--rummu-radius);
	box-shadow: var(--rummu-shadow);
	padding: 0 0 18px;
	overflow: hidden;
	text-align: left;
	display: flex;
	flex-direction: column;
}
.woocommerce ul.products li.product a img { margin: 0 0 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .button { margin-left: 18px; margin-right: 18px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.05rem; color: var(--rummu-navy); }
.woocommerce ul.products li.product .price { color: var(--rummu-text); font-weight: 600; }
.woocommerce ul.products li.product .button { margin-top: auto; align-self: flex-start; }

/* ------------------------------------------------------------------
 * 5. WooCommerce Bookings form
 * ------------------------------------------------------------------ */
.wc-bookings-booking-form {
	border: 1px solid #e5e7eb;
	border-radius: var(--rummu-radius);
	padding: 18px;
	background: #fff;
}
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker td.bookable a,
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker td.bookable span {
	background-color: var(--rummu-sky) !important;
	color: var(--rummu-navy) !important;
	font-weight: 600;
}
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker td.ui-datepicker-current-day a,
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker td.bookable-range a {
	background-color: var(--rummu-navy) !important;
	color: #fff !important;
}
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker td.fully_booked a,
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker td.fully_booked span {
	background-color: #fde2e2 !important;
	color: #9b1c1c !important;
}
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header { background: var(--rummu-navy); color: #fff; border: 0; border-radius: 8px; }
.wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header .ui-datepicker-title { color: #fff; }
.wc-bookings-booking-form ul.block-picker li a {
	border: 1px solid var(--rummu-navy);
	border-radius: 8px;
	color: var(--rummu-navy);
	padding: 8px 10px;
}
.wc-bookings-booking-form ul.block-picker li a.selected,
.wc-bookings-booking-form ul.block-picker li a:hover {
	background: var(--rummu-navy) !important;
	color: #fff !important;
}
.wc-bookings-booking-form .wc-bookings-booking-cost {
	background: var(--rummu-mist);
	border-radius: 8px;
	padding: 10px 12px;
	font-weight: 600;
}

/* Product Add-Ons fields */
.wc-pao-addon-container { margin-bottom: 14px; }
.wc-pao-addon-name { font-weight: 600; color: var(--rummu-navy); }
.wc-pao-addon-field, .wc-pao-addon-custom-textarea { border-radius: 8px; }

/* rummu-core boxes */
.rummu-notice {
	border-left: 4px solid var(--rummu-amber);
	background: var(--rummu-sand);
	padding: 12px 15px;
	border-radius: 6px;
	margin: 16px 0;
}
.rummu-notice--season { border-left-color: var(--rummu-red); background: #fff1f1; }
.rummu-counter { margin: 15px 0; padding: 15px; border: 1px solid #ddd; border-radius: 10px; background: #f9fafb; }
.rummu-counter__bar { background: #eee; border-radius: 20px; height: 12px; margin: 8px 0 10px; overflow: hidden; }
.rummu-counter__fill { height: 12px; border-radius: 20px; width: 0; transition: width .3s; background: var(--rummu-amber); }
.rummu-contact summary, .rummu-quote summary { cursor: pointer; font-weight: 600; text-decoration: underline; }
.rummu-quote { margin-top: 12px; }

/* Gift card (rummu-core 2.0) */
.rummu-gc-fields { border: 1px solid #ddd; border-radius: 10px; padding: 10px 16px 4px; margin: 0 0 16px; }
.rummu-gc-fields legend { font-weight: 600; padding: 0 6px; color: var(--rummu-navy); }
.rummu-gc-fields p { margin: 0 0 10px; }
.rummu-gc-fields label { display: block; font-size: .92em; margin-bottom: 3px; }
.rummu-gc-fields input, .rummu-gc-fields textarea { width: 100%; border-radius: 8px; }
.rummu-gc-fields textarea { min-height: 70px; }
.rummu-gc { margin: 24px 0; }
.rummu-gc-table td, .rummu-gc-table th { text-align: left; }
.woonp label { font-weight: 600; color: var(--rummu-navy); }

/* Cart / checkout */
.woocommerce-cart .cart_item dl.variation, .woocommerce-checkout dl.variation { font-size: .92em; }

@media (max-width: 781px) {
	.rummu-card { padding: 18px; }
	.rummu-card__img img { height: 180px; }
}
