/* =========================================================
   Canadian Dance Company — Recital Pre-Orders
   Theme-matched styles
   ========================================================= */

/* --- CSS Variables (from main theme) --- */
:root {
    --alpha: #d5b15d;
    --alpha-light: #d5b15d;
    --alpha-dark: #cb9e34;
    --alpha-pale: #ead8ae;
    --beta: #0984b9;
    --beta-light: #0a96d1;
    --beta-dark: #0873a1;
    --beta-pale: #9edffa;
    --light: #eff6fb;
    --light-light: #fff;
    --light-dark: #dbecf5;
    --light-pale: #aed4ea;
    --dark: #132c3a;
    --dark-light: #193b4d;
    --dark-dark: #0c1d27;
    --dark-pale: #b2d4e6;
    --black: #000;
    --white: #fff;
    --off-white: #f2f2f2;
    --border: #ccc;
    --success: #62b51f;
    --warning: #e4be4c;
    --error: #c82727;

    --body-font: "Poppins", Helvetica, Arial, sans-serif;
    --title-font: "Poppins", Times, "Times New Roman", serif;
    --hero-font: "Permanent Marker", "Poppins", Helvetica;

    --btn-bg: var(--alpha);
    --btn-border: var(--alpha);
    --btn-color: #fff;
    --btn-bg-hover: var(--alpha-dark);
    --btn-border-hover: var(--alpha-dark);
    --btn-color-hover: #fff;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

:first-child { margin-top: 0; }
:last-child  { margin-bottom: 0; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--beta);
    text-decoration: none;
    transition: color 0.25s ease;
}
a:hover {
    color: var(--beta-dark);
}

/* --- Layout --- */
.wrapper {
    width: calc(100% - 10vw);
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--dark);
    transition: background 0.3s ease;
}

header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

header .logo img {
    height: 50px;
    width: auto;
}

header nav {
    display: flex;
    gap: 2.5rem;
}

header .nav-link {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.25s ease;
}
header .nav-link:hover {
    color: var(--alpha);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 120px 0 60px;
    background: url('images/BPAC-dusk-2000x870.jpg') center center / cover no-repeat;
    overflow: hidden;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 29, 39, 0.6);
    pointer-events: none;
}

.hero .wrapper {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--hero-font);
    font-size: 5.6rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--alpha-pale);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
    line-height: 1.6;
}

.hero-eyebrow {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--alpha);
    margin-bottom: 1rem;
}

/* =========================================================
   RECITAL INFO BANNER
   ========================================================= */
.recital-info {
    background: var(--dark-light);
    padding: 3rem 0;
    border-bottom: 3px solid var(--alpha);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    color: var(--white);
}

.info-item > i {
    font-size: 2.2rem;
    color: var(--alpha);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.info-item div {
    display: flex;
    flex-direction: column;
}

.info-item strong {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.info-item span {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.3rem;
}

/* =========================================================
   BUTTONS (match theme .button)
   ========================================================= */
.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 22px;
    background: var(--btn-bg);
    border: 2px solid var(--btn-border);
    border-radius: 0;
    color: var(--btn-color);
    font-family: var(--body-font);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 28px;
    min-width: 150px;
    overflow: hidden;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}

.button:hover {
    background: var(--btn-bg-hover);
    border-color: var(--btn-border-hover);
    color: var(--btn-color-hover);
}

.button:active {
    transform: scale(0.97);
}

.button:disabled,
.button[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.button.small {
    height: 40px;
    font-size: 1.3rem;
    min-width: 120px;
    padding: 0 16px;
}

.button.beta {
    --btn-bg: var(--beta);
    --btn-border: var(--beta);
    --btn-bg-hover: var(--beta-dark);
    --btn-border-hover: var(--beta-dark);
}

.button.white {
    --btn-bg: var(--white);
    --btn-border: var(--white);
    --btn-color: var(--dark);
    --btn-bg-hover: var(--off-white);
    --btn-border-hover: var(--off-white);
    --btn-color-hover: var(--dark);
}

/* =========================================================
   SECTION SHARED
   ========================================================= */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-family: var(--title-font);
    font-size: 3.6rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.section-desc {
    font-size: 1.7rem;
    color: var(--dark-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* =========================================================
   FLOWERS SECTION
   ========================================================= */
.flowers {
    padding: 8rem 0;
    background: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-image {
    background: var(--light);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--light-pale);
}

.image-placeholder i {
    font-size: 4rem;
}

.image-placeholder span {
    font-size: 1.4rem;
    font-weight: 500;
}

.product-info {
    padding: 1.8rem;
}

.product-info h3 {
    font-family: var(--title-font);
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.product-details {
    list-style: none;
    margin-bottom: 1.5rem;
}

.product-details li {
    font-size: 1.3rem;
    color: var(--dark-light);
    padding: 0.2rem 0;
    padding-left: 1.8rem;
    position: relative;
}

.product-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.product-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.product-price .tax {
    font-size: 1.4rem;
    font-weight: 400;
    color: #707070;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* --- Quantity Selector --- */
.qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 0;
    overflow: hidden;
}

.qty-btn {
    width: 42px;
    height: 42px;
    background: var(--off-white);
    border: none;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-family: var(--body-font);
}

.qty-btn:hover {
    background: var(--light-dark);
}

.qty-input {
    width: 50px;
    height: 42px;
    text-align: center;
    border: none;
    border-left: 2px solid var(--border);
    border-right: 2px solid var(--border);
    font-size: 1.6rem;
    font-weight: 600;
    font-family: var(--body-font);
    color: var(--dark);
    background: var(--white);
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* =========================================================
   KUDOS SECTION
   ========================================================= */
.kudos {
    padding: 8rem 0;
    background: var(--light);
}

.kudos-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.kudos-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--dark);
}

.kudos-meta .deadline i {
    color: var(--error);
}

.kudos-meta .kudos-price i {
    color: var(--alpha);
}

.kudos-price .tax {
    font-weight: 400;
    color: #707070;
}

/* --- Form --- */
.kudos-form {
    max-width: 750px;
    margin: 0 auto;
    background: var(--white);
    padding: 4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-group label .required {
    color: var(--error);
}

.form-group label .char-count {
    font-weight: 400;
    text-transform: none;
    color: #707070;
    font-size: 1.2rem;
}

.form-group input,
.form-group textarea {
    font-family: var(--body-font);
    font-size: 1.6rem;
    padding: 1.2rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 0;
    color: var(--dark);
    background: var(--white);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--beta);
    box-shadow: 0 0 0 3px rgba(9, 132, 185, 0.12);
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: var(--error);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    font-size: 1.2rem;
    color: #707070;
    text-align: right;
    margin-top: 0.4rem;
}

.form-actions {
    text-align: center;
    margin-top: 3rem;
}

/* --- Feedback --- */
.form-feedback {
    margin-top: 2rem;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.form-feedback.success {
    background: var(--success);
    color: var(--white);
    padding: 1.5rem;
}

.form-feedback.error {
    background: var(--error);
    color: var(--white);
    padding: 1.5rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 5rem 0 3rem;
}

.footer-top {
    text-align: center;
    margin-bottom: 4rem;
}

.footer-logo {
    height: 60px;
    margin: 0 auto;
}

.footer-mid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-mid h6 {
    font-size: 1.6rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--alpha);
}

.footer-mid ul {
    list-style: none;
}

.footer-mid li {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.footer-mid li .icon {
    color: var(--alpha);
    width: 2.4rem;
    flex-shrink: 0;
    margin-top: 0.3rem;
}

.footer-mid li p {
    margin: 0;
    line-height: 1.6;
}

.footer-mid li a {
    color: rgba(255, 255, 255, 0.75);
}
.footer-mid li a:hover {
    color: var(--white);
}

.footer-btm {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-btm p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.5);
}

.privacy-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
    transition: color 0.2s;
}

.privacy-link:hover {
    color: var(--alpha);
}

/* =========================================================
   ORDER DRAWER
   ========================================================= */
.order-drawer {
    position: fixed;
    top: 0;
    right: -560px;
    width: 540px;
    max-width: 95vw;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-drawer.open {
    right: 0;
}

.drawer-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.drawer-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.5rem;
    background: var(--dark);
    color: var(--white);
}

.drawer-header h4 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.close-drawer {
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s;
}
.close-drawer:hover {
    opacity: 0.7;
}

.drawer-body {
    padding: 1rem 2.5rem 0;
}

.empty-cart {
    text-align: center;
    color: #707070;
    font-size: 1.5rem;
    padding: 4rem 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--off-white);
}

.order-item .item-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--dark);
}

.order-item .item-qty {
    font-size: 1.4rem;
    color: #707070;
}

.order-item .item-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

.order-item .remove-item {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 1rem;
    padding: 0.2rem 0.5rem;
    font-family: var(--body-font);
    font-weight: 600;
}
.order-item .remove-item:hover {
    text-decoration: underline;
}

.drawer-footer {
    padding: 1.5rem 2.5rem 2.5rem;
    border-top: 2px solid var(--off-white);
}

.order-totals {
    margin-bottom: 2rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.6rem;
    padding: 0.6rem 0;
    color: var(--dark-light);
}

.total-row.total-final {
    font-weight: 700;
    font-size: 2rem;
    color: var(--dark);
    border-top: 2px solid var(--dark);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.checkout-btn {
    width: 100%;
    justify-content: center;
    margin-top: 1.5rem;
}

.checkout-note {
    text-align: center;
    font-size: 1.2rem;
    color: #707070;
    margin-top: 1rem;
}

/* Drawer contact form — collapsible */
.drawer-contact {
    border-top: 1px solid var(--off-white);
    margin-top: 1.5rem;
}

.contact-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 1.2rem 0;
    cursor: pointer;
    font-family: var(--body-font);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--dark);
}

.contact-toggle span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.required-star {
    color: #d9534f;
    font-weight: 700;
    font-size: 1.4rem;
}

.contact-toggle .toggle-arrow {
    font-size: 1.1rem;
    transition: transform 0.25s ease;
}

.contact-toggle.open .toggle-arrow {
    transform: rotate(180deg);
}

.contact-fields {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.contact-fields.open {
    max-height: 400px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    padding-bottom: 1rem;
}

.drawer-field {
    margin-bottom: 0;
}

.drawer-field label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-light);
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.drawer-field input {
    width: 100%;
    font-family: var(--body-font);
    font-size: 1.3rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--dark);
    background: var(--white);
    transition: border-color 0.25s ease;
    outline: none;
}

.drawer-field input:focus {
    border-color: var(--beta);
}

.drawer-field input.invalid {
    border-color: var(--error);
}

/* Order confirmation */
.order-confirmation {
    text-align: center;
    padding: 3rem 0;
}

.order-confirmation .order-number {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--beta);
    background: var(--light);
    padding: 1rem 2rem;
    display: inline-block;
    margin: 1rem 0;
    letter-spacing: 0.05em;
}

/* Kudos item in drawer */
.order-item.kudos-item {
    align-items: flex-start;
}

.order-item .item-msg {
    font-size: 1.2rem;
    color: #999;
    font-style: italic;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* Receipt lines on confirmation */
.receipt-lines {
    margin: 1.5rem 0;
    text-align: left;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--light);
    border-radius: 4px;
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
}

.receipt-type {
    font-weight: 600;
    color: var(--dark);
    min-width: 100px;
}

.receipt-num {
    font-weight: 700;
    color: var(--beta);
    letter-spacing: 0.03em;
    flex: 1;
    text-align: center;
}

.receipt-total {
    font-weight: 700;
    color: var(--dark);
    min-width: 70px;
    text-align: right;
}

/* =========================================================
   FLOATING CART BUTTON
   ========================================================= */
.cart-fab {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--alpha);
    color: var(--white);
    border: none;
    font-size: 2.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.2s ease;
}

.cart-fab:hover {
    background: var(--alpha-dark);
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media only screen and (max-width: 900px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .info-item {
        justify-content: center;
    }

    .footer-mid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-mid li {
        justify-content: center;
    }

    .footer-btm {
        justify-content: center;
        text-align: center;
    }
}

@media only screen and (max-width: 768px) {
    html {
        font-size: 58%;
    }

    .hero {
        min-height: 340px;
        padding: 100px 0 50px;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 1.7rem;
    }

    .flowers,
    .kudos {
        padding: 5rem 0;
    }

    .section-header h2 {
        font-size: 2.8rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .kudos-form {
        padding: 2.5rem;
    }

    .kudos-meta {
        flex-direction: column;
        gap: 1rem;
    }

    .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .product-actions .button {
        width: 100%;
    }

    .qty-selector {
        align-self: flex-start;
    }
}

@media only screen and (max-width: 480px) {
    header .wrapper {
        height: 65px;
    }

    header .logo img {
        height: 38px;
    }

    header .nav-link {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }
}

/* ══════════════════════════════════════════════════════
   SQUARE PAYMENT FORM
   ══════════════════════════════════════════════════════ */
.drawer-payment {
    margin-top: 1.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid #e0e0e0;
}

.payment-label {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.payment-label i {
    color: var(--alpha);
    font-size: 1.2rem;
}

#card-container {
    min-height: 40px;
}

/* Square iframe fields inherit some styling */
#card-container iframe {
    border-radius: 6px !important;
}

.payment-errors {
    color: #d9534f;
    font-size: 1.2rem;
    margin-top: 0.8rem;
    min-height: 1.4rem;
}
