/*
Theme Name: Tapas Restaurant
Author: OK Multimedia
Author URI: https://okmultimedia.com
Description: A warm, elegant block theme for Spanish restaurants, tapas bars and family-run eateries by the sea. Full-width photo slider, house specialties, a daily menu card, a printed-style menu with prices, a dish gallery, opening hours and a booking call to action, all editable from the Site Editor.
Version: 0.1.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tapas-restaurant
Tags: food-and-drink, full-site-editing, block-patterns, custom-colors, editor-style, one-column, wide-blocks, translation-ready
*/

/* ---------- Header ---------- */
.tr-header { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 rgba(43,36,24,.08); }
.admin-bar .tr-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tr-header { top: 46px; } }
.tr-header .tr-logo img { width: 210px; height: auto; display: block; }
@media (max-width: 600px) { .tr-header .tr-logo img { width: 160px; } }

/* ---------- Kicker (handwritten line above headings) ---------- */
.tr-kicker { font-family: var(--wp--preset--font-family--hand); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--wp--preset--color--terracotta); line-height: 1; margin-bottom: .25rem !important; }

/* ---------- Slider ---------- */
.tr-slider { position: relative; overflow: hidden; height: min(88vh, 860px); min-height: 560px; }
.tr-slider > .tr-slide { position: absolute !important; inset: 0; margin: 0 !important; opacity: 0; transition: opacity 1.4s ease; min-height: 0 !important; height: 100%; }
.tr-slider > .tr-slide.is-active, .tr-slider:not(.is-ready) > .tr-slide:first-child { opacity: 1; z-index: 1; }
.tr-slider .tr-slide .wp-block-cover__image-background { transform: scale(1.06); transition: transform 7s ease-out; }
.tr-slider .tr-slide.is-active .wp-block-cover__image-background { transform: scale(1); }
.tr-slide h2 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.tr-slide p { color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.tr-slide .tr-kicker { color: #ffe6c7; }
/* Dots: 24px touch targets (WCAG 2.5.8) with a small visible dot inside. */
.tr-dots { position: absolute; z-index: 5; left: 0; right: 0; bottom: 1.25rem; display: flex; justify-content: center; align-items: center; gap: .25rem; }
.tr-dots button { position: relative; width: 28px; height: 28px; min-width: 24px; min-height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.tr-dots button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box; opacity: .9; box-shadow: 0 0 6px rgba(0,0,0,.35); }
.tr-dots button[aria-current="true"]::before { background: #fff; }
/* Pause / play button. */
.tr-dots .tr-toggle { width: 34px; height: 34px; margin-right: .5rem; background: rgba(255,250,240,.85); }
.tr-dots .tr-toggle::before { width: 10px; height: 12px; margin: -6px 0 0 -5px; border: 0; border-radius: 0; border-left: 3px solid var(--wp--preset--color--ink); border-right: 3px solid var(--wp--preset--color--ink); box-shadow: none; opacity: 1; }
.tr-dots .tr-toggle.is-paused::before { width: 0; height: 0; margin: -7px 0 0 -4px; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--wp--preset--color--ink); }
.tr-dots .tr-toggle:hover { background: #fff; }
.tr-arrow { position: absolute; z-index: 5; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,250,240,.85); color: var(--wp--preset--color--ink); font-size: 1.4rem; cursor: pointer; }
.tr-arrow:hover { background: #fff; }
.tr-arrow.prev { left: 1rem; } .tr-arrow.next { right: 1rem; }
@media (max-width: 600px) { .tr-slide .wp-block-cover__inner-container { padding-bottom: 4.25rem; } .tr-arrow { top: auto; bottom: .9rem; transform: none; width: 44px; height: 44px; } .tr-arrow.prev { left: .75rem; } .tr-arrow.next { right: .75rem; } .tr-dots { bottom: 1.1rem; } .tr-slider { height: 80svh; max-height: 740px; min-height: 540px; } .tr-slide .has-display-font-size { font-size: 2.6rem !important; } .tr-slide .has-large-font-size { font-size: 1.05rem !important; line-height: 1.5; } }
@media (prefers-reduced-motion: reduce) { .tr-slider > .tr-slide, .tr-slider .wp-block-cover__image-background { transition: none !important; transform: none !important; } }

/* ---------- Dish cards ---------- */
.tr-card { background: var(--wp--preset--color--paper); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(43,36,24,.45); height: 100%; }
.tr-card .wp-block-image { margin: 0; }
.tr-card .wp-block-image img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .6s ease; }
.tr-card:hover .wp-block-image img { transform: scale(1.04); }
.tr-card .tr-card-body { padding: 1.1rem 1.25rem 1.4rem; }
.tr-card h3 { margin: 0; }
.tr-price { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.5rem; color: var(--wp--preset--color--terracotta); }

/* ---------- Menu (carta) ---------- */
.tr-menu-section h3 { border-bottom: 1px solid rgba(84,84,38,.35); padding-bottom: .4rem; color: var(--wp--preset--color--olive); }
.tr-item { display: flex; align-items: baseline; gap: .5rem; margin: 0 !important; padding: .55rem 0; }
.tr-item strong { font-family: var(--wp--preset--font-family--heading); font-size: 1.3rem; font-weight: 600; }
.tr-item .tr-dots-line { flex: 1; border-bottom: 2px dotted rgba(43,36,24,.25); transform: translateY(-.3em); min-width: 1.5rem; }
.tr-item .tr-item-price { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.25rem; color: var(--wp--preset--color--terracotta); white-space: nowrap; }
.tr-item-desc { margin: -.35rem 0 .35rem !important; font-size: .92rem; opacity: .75; }

/* ---------- Daily menu card ---------- */
.tr-daily { background: var(--wp--preset--color--paper); border: 1px solid rgba(84,84,38,.25); border-radius: 6px; box-shadow: 0 0 0 10px var(--wp--preset--color--paper), 0 0 0 11px rgba(84,84,38,.25), 0 30px 60px -30px rgba(43,36,24,.5); }
.tr-daily .tr-hand { font-family: var(--wp--preset--font-family--hand); font-size: 1.6rem; line-height: 1.3; margin: 0 !important; }
.tr-daily h4 { letter-spacing: .14em; text-transform: uppercase; font-family: var(--wp--preset--font-family--body); font-size: .8rem; color: var(--wp--preset--color--olive); margin-top: 1.4rem !important; }

/* ---------- Gallery ---------- */
.tr-gallery .wp-block-image img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }

/* ---------- Visit ---------- */
.tr-hours p { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(43,36,24,.2); padding: .45rem 0; margin: 0 !important; }

/* ---------- Footer ---------- */
.tr-footer a { color: inherit; }
.tr-footer .tr-logo img { width: 200px; height: auto; }

/* ---------- Layout fixes ---------- */
.wp-site-blocks > header, .wp-site-blocks > footer, .wp-site-blocks > main { margin-block-start: 0; }
.tr-card { display: flex; flex-direction: column; }
.tr-card .tr-card-body { flex: 1; display: flex; flex-direction: column; }
.tr-card .tr-card-body .tr-price { margin-top: auto !important; padding-top: .5rem; }
.tr-header-cta .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) { .tr-header-cta .wp-block-button__link { padding: .7em 1.1em; font-size: .7rem !important; } }
@media (max-width: 781px) {
	.tr-dish-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: .9rem !important; }
	.tr-dish-grid .tr-card .tr-card-body { padding: .8rem .85rem 1rem; }
	.tr-dish-grid .tr-card h3 { font-size: 1.15rem !important; }
	.tr-dish-grid .tr-card .has-small-font-size { font-size: .8rem !important; line-height: 1.45; }
	.tr-dish-grid .tr-price { font-size: 1.2rem; }
}

/* ---------- Keyboard focus ---------- */
.tr-arrow:focus-visible, .tr-dots button:focus-visible, .tr-header a:focus-visible, .wp-block-button__link:focus-visible { outline: 3px solid var(--wp--preset--color--ink); outline-offset: 3px; }
.tr-slide a:focus-visible { outline-color: #fff; }
.tr-dots button:focus-visible { outline-color: #fff; outline-offset: 1px; }
