/*
Theme Name: WayOut Worldwide
Theme URI: https://wayoutworldwide.org/
Author: WayOut Worldwide
Author URI: https://wayoutworldwide.org/
Description: The WayOut Worldwide redesign as a WordPress theme. Dark navy and gold, with the rotating eight-division wheel on the front page, an Events custom post type, and full WooCommerce shop support. When WooCommerce is not active the shop degrades gracefully to a priced catalogue with Stripe Payment Link checkout (WayOut Stripe Checkout plugin). Real product, event and division photos from wayoutworldwide.org are used wherever the Media Library has them; the gold-initial placeholder tile remains only where no photo exists.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wayout-worldwide
Tags: dark, custom-menu, featured-images, threaded-comments, translation-ready, e-commerce, events
*/

/* ------------------------------------------------------------------
   WayOut Worldwide theme styles.
   Palette and layout follow the Laravel redesign exactly: navy
   #0a1030, gold #d4a017 / #f2c94c, ink #eef0ff, muted #aab0d6.
   Product and event cards show the featured image when the Media
   Library has one (import demo-content.xml and products.csv to get
   the real photos); the gold-initial placeholder tile (.thumb) is
   kept only where no photo exists.
   ------------------------------------------------------------------ */
:root {
    --navy: #0a1030;
    --navy2: #101a4a;
    --gold: #d4a017;
    --gold2: #f2c94c;
    --ink: #eef0ff;
    --muted: #aab0d6;
    --line: #26306b;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
    margin: 0;
    background: var(--navy);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}
a { color: var(--gold2); }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
h1 { font-size: 42px; margin: 6px 0; line-height: 1.15; }
h2 { font-size: 26px; margin: 30px 0 10px; }
h3 { font-size: 20px; }
.muted { color: var(--muted); }

/* Header */
header.site {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 14px 28px; background: #070b24;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
header.site .brand { font-weight: 800; letter-spacing: .12em; font-size: 20px; color: #fff; text-decoration: none; }
header.site .brand span { color: var(--gold2); }
header.site .custom-logo { max-height: 44px; width: auto; }
nav.main ul { display: flex; gap: 16px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
nav.main a { color: var(--ink); text-decoration: none; font-size: 14px; }
nav.main a:hover, nav.main .current-menu-item a { color: var(--gold2); }
.spacer { flex: 1; }
main.site-main { max-width: 1100px; margin: 0 auto; padding: 28px; overflow-x: clip; }
@media (max-width: 640px) {
    main.site-main { padding: 16px; }
    header.site { padding: 10px 16px; }
    h1 { font-size: 32px; }
}
footer.site {
    text-align: center; color: var(--muted); padding: 28px;
    font-size: 13px; border-top: 1px solid var(--line); margin-top: 40px;
}
footer.site ul { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; list-style: none; margin: 0 0 12px; padding: 0; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--gold2); }

/* Buttons, cards, grids */
.btn {
    display: inline-block; background: var(--gold); color: #1a1200; font-weight: 700;
    border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--gold2); color: #1a1200; }
.btn-ghost {
    display: inline-block; background: transparent; color: var(--gold2);
    border: 1px solid var(--gold); padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.btn-ghost:hover { color: #fff; border-color: var(--gold2); }
.card { background: var(--navy2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.flash { background: #17351f; border: 1px solid #2e7d32; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.err { background: #3d1420; border: 1px solid #b3261e; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
input, select, textarea {
    width: 100%; padding: 10px; border-radius: 8px;
    border: 1px solid #3a4480; background: #0d1440; color: var(--ink); margin: 4px 0 12px;
}
input[type="checkbox"], input[type="radio"] { width: auto; }
label { font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }

/* Placeholder tile where a product or event has no photo yet.
   No image URLs are invented: a gold initial on a navy tile. */
.thumb {
    display: flex; align-items: center; justify-content: center; height: 96px;
    border-radius: 8px; background: linear-gradient(135deg, #16205c, #0a1030);
    border: 1px solid var(--line); color: var(--gold2);
    font-size: 40px; font-weight: 800; margin-bottom: 12px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* ------------------------------------------------------------------
   The wheel. Hard-won layout rules, kept from the Laravel site:
   - The status pill lives on its own line above the wheel, never
     overlapping the subtitle, the wheel or a node button.
   - Below 1200px the section STACKS (wheel centred on top, detail
     full-width below). The 1200px threshold is load-bearing, not
     cosmetic: side-by-side at 1024px the 9 o'clock node pill overhung
     the viewport by 18px, so "Wayout Productions" lost its "Pr" and
     "Concierge-Q" lost its "C". Stacking below 1200px covers the
     whole range where side-by-side clips.
   - Node buttons are capped in width with wrapping text, so their
     overhang past the rim stays inside the page.
   - The detail panel is strict block flow: the description is its
     own block and the actions sit in a footer row below it. Nothing
     is absolutely positioned, so no button can sit on top of text.
   ------------------------------------------------------------------ */
.wheel-status { margin: 4px 0 16px; }
.status-pill {
    display: inline-block; padding: 5px 12px; border: 1px solid var(--gold);
    border-radius: 999px; color: var(--gold2); font-size: 12px; font-weight: 700; letter-spacing: .08em;
}
.wheel-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: center; overflow-x: clip; }
.wheel {
    position: relative; --size: min(320px, 88vw);
    width: var(--size); height: var(--size); margin: 0 auto; flex: none;
    --R: calc(var(--size) / 2 - 20px);
}
@media (max-width: 1200px) {
    .wheel-wrap { flex-direction: column; align-items: center; }
    .detail { width: 100%; min-width: 0; }
}
@media (max-width: 480px) { .wheel { --size: min(260px, 84vw); } }
.wheel .ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 3px solid var(--gold);
    background: radial-gradient(circle, #16205c 0%, #0a1030 70%);
}
.wheel .center {
    position: absolute; inset: 32%; border-radius: 50%; background: var(--gold);
    color: #1a1200; display: flex; align-items: center; justify-content: center;
    text-align: center; font-weight: 800; font-size: 14px; padding: 10px; z-index: 3;
}
.wheel .node {
    position: absolute; left: 50%; top: 50%; width: 0; height: 0;
    transform: rotate(var(--a)) translateY(calc(var(--R) * -1)) rotate(calc(var(--a) * -1));
}
.wheel .node button {
    position: absolute; transform: translate(-50%, -50%);
    background: #1b2560; color: #fff; border: 2px solid var(--gold); border-radius: 999px;
    padding: 8px 12px; font-size: 11px; cursor: pointer;
    max-width: 132px; min-height: 36px; line-height: 1.25; text-align: center;
    touch-action: manipulation; z-index: 2;
}
@media (max-width: 480px) {
    .wheel .node button { max-width: 118px; font-size: 10px; padding: 6px 8px; }
}
.wheel .node button.active { background: var(--gold); color: #1a1200; font-weight: 700; }
.detail { flex: 1; min-width: 260px; min-height: 230px; display: flex; flex-direction: column; }
.detail-logo { margin: 0 0 10px; }
.detail-logo img { max-height: 80px; width: auto; max-width: 100%; }
.detail .detail-desc { margin: 0 0 18px; padding-bottom: 4px; }
.detail .detail-actions {
    position: static; margin-top: auto; padding-top: 14px;
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.detail .detail-actions .btn, .detail .detail-actions .btn-ghost { position: static; }

/* Blog / posts */
.post-card h2, .post-card h3 { margin-top: 0; }
.post-meta { color: var(--muted); font-size: 13px; }
.pagination { margin: 28px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none;
}
.pagination .current { background: var(--gold); color: #1a1200; border-color: var(--gold); font-weight: 700; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { background: var(--navy2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.alignright { float: right; margin: 0 0 12px 16px; }
.alignleft { float: left; margin: 0 16px 12px 0; }
.aligncenter { display: block; margin: 0 auto 12px; }
.wp-caption-text { color: var(--muted); font-size: 13px; }

/* ------------------------------------------------------------------
   WooCommerce (only applies when WooCommerce is active).
   ------------------------------------------------------------------ */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
    background: var(--navy2); border: 1px solid var(--line); border-radius: 12px;
    padding: 18px; margin: 0; width: auto; float: none; text-align: left;
}
.woocommerce ul.products li.product a { text-decoration: none; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--ink); font-size: 18px; padding: 0; }
.woocommerce ul.products li.product .price { color: var(--gold2); font-size: 16px; }
.woocommerce ul.products li.product .button {
    background: var(--gold); color: #1a1200; font-weight: 700; border-radius: 8px; padding: 10px 18px;
}
.woocommerce ul.products li.product .button:hover { background: var(--gold2); }
.woocommerce div.product .price, .woocommerce div.product p.price { color: var(--gold2); font-size: 22px; }
.woocommerce div.product .single_add_to_cart_button,
.woocommerce .cart .button, .woocommerce .checkout .button, .woocommerce #place_order,
.woocommerce .woocommerce-message .button, .woocommerce a.checkout-button {
    background: var(--gold); color: #1a1200; font-weight: 700; border-radius: 8px; padding: 10px 18px;
}
.woocommerce div.product .single_add_to_cart_button:hover,
.woocommerce .cart .button:hover, .woocommerce .checkout .button:hover { background: var(--gold2); }
.woocommerce table.shop_table { border-color: var(--line); background: var(--navy2); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--line); }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error {
    background: var(--navy2); border: 1px solid var(--line); color: var(--ink); border-radius: 8px;
}
.woocommerce .woocommerce-message { border-top-color: #2e7d32; }
.woocommerce .woocommerce-error { border-top-color: #b3261e; }
.woocommerce form .form-row input, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
    background: #0d1440; color: var(--ink); border: 1px solid #3a4480; border-radius: 8px; padding: 10px;
}
.woocommerce .quantity .qty { background: #0d1440; color: var(--ink); border: 1px solid #3a4480; }
.woocommerce nav.woocommerce-pagination ul { border: none; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--ink); margin-right: 6px;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--gold); color: #1a1200; border-color: var(--gold); }
