@import "https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";

/* ============================================
   Header Info banner (event group announcement)
   Full-width strip at the top of ordering pages
   ============================================ */
.v3-header-info-banner {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.55rem 1.25rem;
    box-sizing: border-box;
}

.v3-header-info-banner-text {
    font-family: Poppins, system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 640px) {
    .v3-header-info-banner {
        padding: 0.5rem 0.75rem;
    }

    .v3-header-info-banner-text {
        font-size: 0.75rem;
    }
}

/* ============================================
   V3 Online Ordering - Stage 2 & 3
   CSS Variables, Grid/Flexbox Layout, and Styling
   ============================================ */

/* ============================================
   CSS Variables - Colors, Spacing, Fonts
   ============================================ */
:root {
    /* Colors - These will be overridden by inline styles from user settings */
    --v3-primary-color: #6633FF; /* Default, will be replaced by user's PrimaryColor */
    --v3-on-primary-color: #FFFFFF; /* Black or white for readable text on primary fills */
    --v3-secondary-color: #F3F4F6; /* Default, will be replaced by user's SecondaryColor */
    --v3-font-color: #000000; /* Text on primary colour areas (header) */
    --v3-secondary-font-color: #000000; /* Text on secondary colour backgrounds */
    --v3-primary-indigo: #6366F1;
    --v3-secondary-teal: #14B8A6;
    --v3-secondary-pink: #EC4899;
    --v3-success-green: #10B981;
    --v3-error-red: #EF4444;
    --v3-info-blue: #0EA5E9;
    --v3-warning-yellow: #F59E0B;
    
    /* Backgrounds */
    --v3-bg-gradient-start: #E0E7FF;
    --v3-bg-gradient-end: #FEF3C7;
    --v3-card-bg: #FFFFFF;
    --v3-bg-light: #F9FAFB;
    --v3-bg-muted: #F3F4F6;
    
    /* Text Colors */
    --v3-text-dark: #000000; /* Black text for most areas */
    --v3-text-medium: #4B5563;
    --v3-text-light: #9CA3AF;
    --v3-text-white: #FFFFFF;
    
    /* Borders */
    --v3-border-light: #E5E7EB;
    --v3-border-medium: #D1D5DB;
    --v3-border-focus: var(--v3-primary-indigo);
    /* Dark grey keyline so white-edged photos remain visible on white page/card backgrounds */
    --v3-image-keyline: #6B7280;
    
    /* Shadows */
    --v3-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --v3-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --v3-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --v3-spacing-xs: 0.25rem;   /* 4px */
    --v3-spacing-sm: 0.5rem;    /* 8px */
    --v3-spacing-md: 1rem;      /* 16px */
    --v3-spacing-lg: 1.5rem;    /* 24px */
    --v3-spacing-xl: 2rem;      /* 32px */
    --v3-spacing-2xl: 3rem;     /* 48px */
    
    /* Fonts */
    --v3-font-family: "Poppins", sans-serif;
    --v3-font-size-xs: 0.75rem;    /* 12px */
    --v3-font-size-sm: 0.8125rem;   /* 13px */
    --v3-font-size-base: 1rem;     /* 16px */
    --v3-font-size-lg: 1.125rem;   /* 18px */
    --v3-font-size-xl: 1.25rem;    /* 20px */
    --v3-font-size-2xl: 1.5rem;    /* 24px */
    --v3-font-size-3xl: 1.875rem;  /* 30px */
    --v3-font-size-4xl: 2.25rem;   /* 36px */
    
    /* Border Radius */
    --v3-radius-sm: 0.25rem;
    --v3-radius-md: 0.5rem;
    --v3-radius-lg: 0.75rem;
    --v3-radius-xl: 1rem;
    --v3-radius-full: 9999px;
    
    /* Transitions */
    --v3-transition: all 0.2s ease-in-out;
}

/* ============================================
   Image keyline — parent-facing photos / product art
   Keeps white-background images visible on white cards
   ============================================ */
.v3-photo-image,
.v3-photo-selection-image,
.v3-photo-viewer-image,
.v3-photo-thumbnail,
.v3-item-image,
.v3-order-item-image,
.v3-cart-item-thumbnail img,
.v3-item-image-wrap img,
.v3-photo-thumbnail-wrap img,
.v3-order-item-image-wrap img,
.v3-cart-preview-wrap .v3-cart-preview-canvas {
    outline: 1px solid var(--v3-image-keyline);
    outline-offset: -1px;
}

/* ============================================
   Reset and Base Styles
   ============================================ */
.v3-page-container {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    font-family: var(--v3-font-family);
    background: #FFFFFF;
    color: #000000;
}

/* ============================================
   Access Code Page (Index)
   ============================================ */

/* Container with gradient background */
.v3-access-code-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--v3-spacing-md);
    background: linear-gradient(135deg, var(--v3-bg-gradient-start) 0%, var(--v3-bg-gradient-end) 100%);
}

/* Main card container */
.v3-card {
    width: 100%;
    max-width: 28rem;
    background: #FFFFFF;
    border-radius: var(--v3-radius-xl);
    padding: var(--v3-spacing-2xl);
    box-shadow: var(--v3-shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-lg);
}

/* Card header */
.v3-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--v3-spacing-md);
}

.v3-icon-container {
    width: 4rem;
    height: 4rem;
    border-radius: var(--v3-radius-full);
    background: linear-gradient(135deg, var(--v3-primary-indigo) 0%, var(--v3-primary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v3-camera-icon,
.v3-email-icon {
    width: 2rem;
    height: 2rem;
    color: var(--v3-font-color);
}

.v3-main-title {
    font-size: var(--v3-font-size-3xl);
    font-weight: 700;
    color: var(--v3-primary-color);
    margin: 0;
}

.v3-subtitle {
    font-size: var(--v3-font-size-base);
    color: var(--v3-text-medium);
    text-align: center;
    margin: 0;
}

/* Form styles */
.v3-access-code-form {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-lg);
}

/* Tighter spacing between Unique Ref and Password on login-with-password page */
.v3-login-with-password-form {
    gap: var(--v3-spacing-md);
}

.v3-email-form {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-lg);
}

.v3-button-group {
    display: flex;
    gap: var(--v3-spacing-md);
    flex-direction: column;
}

@media (min-width: 640px) {
    .v3-button-group {
        flex-direction: row;
    }
}

.v3-button-group .v3-button {
    flex: 1;
}

.v3-email-form .v3-button-group {
    align-self: center;
    width: 100%;
}

.v3-email-form .v3-button {
    align-self: center;
}

.v3-email-form .v3-button-group .v3-button {
    align-self: stretch;
}

.v3-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

.v3-label {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
}

.v3-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.v3-input-icon {
    position: absolute;
    left: var(--v3-spacing-md);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--v3-text-medium);
    pointer-events: none;
}

.v3-input {
    width: 100%;
    padding: var(--v3-spacing-md) var(--v3-spacing-md) var(--v3-spacing-md) 2.75rem;
    font-size: var(--v3-font-size-base);
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-md);
    background: #FFFFFF;
    color: #000000 !important;
}

.v3-input::placeholder {
    color: var(--v3-text-light);
}

.v3-input:focus {
    outline: none;
    border-color: var(--v3-border-focus);
    color: var(--v3-text-dark) !important;
}

.v3-input:not(:placeholder-shown) {
    color: var(--v3-text-dark) !important;
}

/* Browser autofill: dark text on white background (tel/email autofill often renders very light). */
input.v3-input:-webkit-autofill,
input.v3-input:-webkit-autofill:hover,
input.v3-input:-webkit-autofill:focus,
input.v3-input:-webkit-autofill:active {
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
    caret-color: #000000;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
}

.v3-input-error {
    border-color: var(--v3-error-red) !important;
}

.v3-urn-code-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.v3-urn-code-row .v3-input {
    /* Equal columns; ignore browser input intrinsic min-width on phones */
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    text-align: center;
    letter-spacing: 0.08em;
    padding-left: var(--v3-spacing-sm);
    padding-right: var(--v3-spacing-sm);
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .v3-urn-code-row {
        gap: 0.35rem;
    }

    .v3-urn-code-row .v3-input {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        letter-spacing: 0.05em;
    }
}

.v3-urn-code-dash {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--v3-text-dark);
}

.v3-form-group > .v3-error-message {
    margin-top: 0.75rem;
}

.v3-error-message {
    color: var(--v3-error-red);
    font-size: var(--v3-font-size-xs);
    margin-top: var(--v3-spacing-xs);
    display: block;
    width: 100%;
    line-height: 1.35;
}

.v3-error-alert {
    background: #FEE2E2;
    border: 1px solid var(--v3-error-red);
    border-radius: var(--v3-radius-md);
    padding: var(--v3-spacing-md);
    color: var(--v3-error-red);
    font-size: var(--v3-font-size-sm);
}

.v3-error-alert p {
    margin: 0;
}

/* Button styles */
.v3-button {
    padding: var(--v3-spacing-md) var(--v3-spacing-lg);
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    border: none;
    border-radius: var(--v3-radius-md);
    cursor: pointer;
    transition: var(--v3-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--v3-spacing-sm);
}

.v3-button-primary {
    background: var(--v3-secondary-color);
    color: var(--v3-secondary-font-color, var(--v3-font-color));
}

.v3-button-primary:hover {
    background: var(--v3-secondary-color);
    opacity: 0.9;
}

/* Prominent primary button on access-code / login forms (View My Photos, Login with Ref and Password) */
.v3-access-code-form .v3-button-primary,
.v3-access-code-page .v3-button.v3-button-primary,
.v3-alt-login .v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-access-code-form .v3-button-primary:hover,
.v3-access-code-page .v3-button.v3-button-primary:hover,
.v3-alt-login .v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-alt-login--prominent {
    margin-top: 0.25rem;
    padding: 1.1rem 1rem 1rem;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--v3-primary-color) 35%, transparent);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--v3-primary-color) 14%, transparent) 0%,
        color-mix(in srgb, var(--v3-primary-color) 6%, transparent) 100%
    );
}

.v3-alt-login-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.3;
    opacity: 1;
}

.v3-alt-login-copy {
    font-size: 0.86rem;
    margin: 0 0 0.9rem;
    line-height: 1.4;
    opacity: 0.75;
}

.v3-button-full-width {
    width: 100%;
}

.v3-button-large {
    padding: var(--v3-spacing-lg) var(--v3-spacing-xl);
    font-size: var(--v3-font-size-lg);
}

/* Separator */
.v3-separator {
    height: 1px;
    background: var(--v3-border-light);
    width: 100%;
}

/* Help section */
.v3-help-section {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-help-link {
    text-align: center;
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-dark);
    margin: 0;
}

/* Alert boxes */
.v3-alert {
    padding: var(--v3-spacing-md);
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: flex-start;
    gap: var(--v3-spacing-md);
}

.v3-alert-info {
    background: var(--v3-info-blue);
    color: var(--v3-text-white);
}

.v3-alert-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.v3-alert-content {
    flex: 1;
}

.v3-alert-content p {
    margin: 0;
    font-size: var(--v3-font-size-sm);
    line-height: 1.5;
}

/* Demo notice */
.v3-demo-notice {
    padding: var(--v3-spacing-md);
    background: var(--v3-bg-muted);
    border-radius: var(--v3-radius-md);
    text-align: center;
}

.v3-demo-notice p {
    margin: 0;
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-medium);
}

/* Photographer login link (bottom of access code page) */
.v3-photographer-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--v3-spacing-sm);
    padding-top: var(--v3-spacing-md);
}

.v3-photographer-login-prompt {
    margin: 0;
    font-size: var(--v3-font-size-sm);
}

.v3-photographer-login-link {
    font-size: var(--v3-font-size-sm);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.v3-photographer-login-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   Email Verification Page
   ============================================ */
.v3-email-verification-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--v3-spacing-md);
    background: linear-gradient(135deg, var(--v3-bg-gradient-start) 0%, var(--v3-bg-gradient-end) 100%);
}

.v3-success-alert {
    background: var(--v3-success-green);
    color: var(--v3-text-white);
    padding: var(--v3-spacing-md);
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
}

.v3-checkmark-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.v3-success-content {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
}

.v3-success-title {
    font-weight: 700;
    font-size: var(--v3-font-size-base);
    margin: 0;
}

.v3-success-code {
    font-size: var(--v3-font-size-sm);
    margin: 0;
}

.v3-input-focused {
    border-color: var(--v3-border-focus);
}

input.v3-input {
    color: var(--v3-text-dark) !important;
    -webkit-text-fill-color: var(--v3-text-dark) !important;
}

input.v3-input:focus,
input.v3-input:not(:placeholder-shown),
input.v3-input-focused {
    color: var(--v3-text-dark) !important;
    -webkit-text-fill-color: var(--v3-text-dark) !important;
}

.v3-info-section {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-info-title {
    text-align: center;
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-bullet-list {
    list-style: none;
    padding: 0;
    margin: var(--v3-spacing-sm) 0 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
}

.v3-bullet-list li {
    font-size: var(--v3-font-size-sm);
    padding-left: var(--v3-spacing-md);
}

.v3-alert-heading {
    font-weight: 700;
    margin: 0 0 var(--v3-spacing-xs) 0;
}

.v3-privacy-notice {
    padding: var(--v3-spacing-md);
    text-align: center;
}

.v3-privacy-notice p {
    margin: 0;
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-light);
}

/* ============================================
   Available Photos Page
   ============================================ */

/* Main header */
.v3-main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--v3-primary-color);
    /* ~10% shorter than previous 1.5rem vertical padding */
    padding: 1.35rem var(--v3-spacing-md);
    box-shadow: var(--v3-shadow-md);
}

.v3-header-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v3-spacing-md);
    min-width: 0;
    width: 100%;
}

/* Logo | centered nav | actions — only when a nav menu is present */
.v3-header-content--with-nav:has(.v3-header-nav) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: var(--v3-spacing-md);
}

.v3-header-content--with-nav:has(.v3-header-nav) .v3-header-branding {
    justify-self: start;
    flex: 0 1 auto;
    min-width: 0;
}

.v3-header-content--with-nav .v3-header-nav {
    justify-self: center;
}

.v3-header-content--with-nav:has(.v3-header-nav) .v3-header-actions {
    justify-self: end;
}

.v3-header-branding {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    min-width: 0;
    flex: 1 1 auto;
}

.v3-header-actions {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    flex-shrink: 0;
}

/* Center menu links (Choose Options layout) */
.v3-header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.15rem;
}

.v3-header-nav-link {
    color: var(--v3-font-color, #fff);
    text-decoration: none;
    font-size: var(--v3-font-size-sm, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.75rem;
    border-radius: var(--v3-radius-md, 0.5rem);
    white-space: nowrap;
    opacity: 0.9;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.v3-header-nav-link:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--v3-font-color, #fff) 12%, transparent);
}

.v3-header-nav-link--active {
    opacity: 1;
    background: color-mix(in srgb, var(--v3-font-color, #fff) 18%, transparent);
}

@media (max-width: 900px) {
    .v3-header-content--with-nav:has(.v3-header-nav) {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "brand actions"
            "nav nav";
        row-gap: 0.65rem;
    }

    .v3-header-content--with-nav:has(.v3-header-nav) .v3-header-branding { grid-area: brand; }
    .v3-header-content--with-nav:has(.v3-header-nav) .v3-header-actions { grid-area: actions; }
    .v3-header-content--with-nav .v3-header-nav {
        grid-area: nav;
        width: 100%;
        justify-content: center;
    }

    .v3-header-nav-link {
        padding: 0.35rem 0.55rem;
        font-size: 0.8125rem;
    }
}

/* Branding as link (Checkout/Confirmation back to Available Photos) */
a.v3-header-branding-link,
a.v3-brand-logo {
    text-decoration: none;
    color: inherit;
}
a.v3-header-branding-link:hover,
a.v3-brand-logo:hover {
    opacity: 0.95;
}

/* Keep photographer logos a consistent header height on all shop pages (~10% shorter) */
.v3-brand-logo img {
    max-width: 180px;
    max-height: 72px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Event name and photographer message below the shop header after login */
.v3-event-shop-intro {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    text-align: center;
}

.v3-event-shop-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.v3-event-shop-comments {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.v3-event-shop-comments img {
    max-width: 100%;
    height: auto;
}

.v3-brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v3-brand-icon svg {
    width: 1.35rem;
    height: 1.35rem;
    color: var(--v3-font-color);
}

.v3-brand-text {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
}

.v3-brand-title {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-font-color);
    margin: 0;
}

.v3-brand-tagline {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-font-color);
    opacity: 0.9;
    margin: 0;
}

.v3-cart-button {
    position: relative;
    width: 2.7rem;
    height: 2.7rem;
    background: transparent;
    border: none;
    border-radius: var(--v3-radius-full);
    color: var(--v3-font-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--v3-transition);
    text-decoration: none;
}

.v3-cart-button:hover {
    background: color-mix(in srgb, var(--v3-font-color) 12%, transparent);
}

.v3-cart-button svg {
    width: 1.5rem;
    height: 1.5rem;
    color: inherit;
    stroke: currentColor;
}

.v3-cart-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: var(--v3-accent-primary);
    color: var(--v3-text-white);
    border-radius: var(--v3-radius-full);
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    min-width: 1.25rem;
    padding: 0.125rem;
}

.v3-add-photos-button {
    background: color-mix(in srgb, var(--v3-font-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--v3-font-color) 28%, transparent);
    border-radius: var(--v3-radius-md);
    color: var(--v3-font-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-sm);
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    transition: var(--v3-transition);
    text-decoration: none;
}

.v3-add-photos-button:hover {
    background: color-mix(in srgb, var(--v3-font-color) 20%, transparent);
    border-color: color-mix(in srgb, var(--v3-font-color) 40%, transparent);
}

.v3-add-photos-button svg {
    width: 1.125rem;
    height: 1.125rem;
    color: inherit;
    stroke: currentColor;
}

@media (max-width: 640px) {
    .v3-page-container {
        min-height: auto;
    }

    .v3-access-code-page {
        align-items: flex-start;
        justify-content: flex-start;
        min-height: auto;
        padding-top: var(--v3-spacing-md);
        padding-bottom: var(--v3-spacing-md);
    }

    .v3-add-photos-button span {
        display: none;
    }
    
    .v3-add-photos-button {
        min-width: 3rem;
        width: 3rem;
        height: 3rem;
        padding: 0;
        justify-content: center;
    }

    /* Keep checkout header within viewport when logo + cart actions are shown */
    .v3-header-branding img,
    .v3-brand-logo img {
        max-width: min(120px, 35vw) !important;
        max-height: 48px !important;
    }

    .v3-brand-title {
        font-size: var(--v3-font-size-base);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .v3-brand-tagline {
        display: none;
    }

    /* Stack payment/shipping choices on narrow screens */
    .v3-payment-methods-grid,
    .v3-shipping-options {
        grid-template-columns: 1fr;
    }

    .v3-checkout-content,
    .v3-checkout-grid,
    .v3-checkout-main-columns,
    .v3-forms-section,
    .v3-form-card,
    .v3-order-summary-section {
        max-width: 100%;
        min-width: 0;
    }

    .v3-form-card {
        padding: var(--v3-spacing-md);
    }

    .v3-voucher-input-group,
    .v3-voucher-input-group .v3-input {
        min-width: 0;
    }

    .v3-order-item-name {
        overflow-wrap: anywhere;
    }
}

/* ============================================
   Add More Photos Modal
   ============================================ */

.v3-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--v3-spacing-md);
    box-sizing: border-box;
}

.v3-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.v3-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    box-shadow: var(--v3-shadow-lg);
    width: 90%;
    min-width: 20rem;
    max-width: 32rem;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 10002;
    animation: v3-modal-fade-in 0.2s ease-out;
    margin: 0 auto;
    transform: none;
}

@media (min-width: 640px) {
    .v3-modal-content {
        width: auto;
        min-width: 28rem;
    }
}

@keyframes v3-modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0) translateX(0);
    }
}

.v3-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--v3-spacing-lg);
    flex-shrink: 0;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.v3-modal-header-left {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    flex: 1;
}

.v3-modal-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(102, 51, 255, 0.2);
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.v3-modal-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v3-primary-color);
    stroke-width: 2.5;
}

.v3-modal-header-text {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
    flex: 1;
    min-width: 0;
}

.v3-modal-subtitle {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0;
    word-wrap: break-word;
}

/* Active Access Codes Section */
.v3-active-codes-section {
    background: var(--v3-info-blue);
    padding: var(--v3-spacing-md);
    border-radius: var(--v3-radius-md);
    margin-top: var(--v3-spacing-lg);
    margin-bottom: var(--v3-spacing-md);
}

.v3-active-codes-title {
    font-size: var(--v3-font-size-base);
    font-weight: 700;
    color: var(--v3-text-white);
    margin: 0 0 var(--v3-spacing-sm) 0;
}

.v3-active-codes-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--v3-spacing-sm);
}

.v3-access-code-tag {
    background: rgba(102, 51, 255, 0.9);
    color: var(--v3-text-white);
    padding: var(--v3-spacing-xs) var(--v3-spacing-md);
    border-radius: var(--v3-radius-full);
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    display: inline-block;
}

.v3-modal-body {
    padding: var(--v3-spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.v3-modal-title {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.v3-modal-close {
    background: transparent;
    border: none;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--v3-text-medium);
    border-radius: var(--v3-radius-md);
    transition: var(--v3-transition);
}

.v3-modal-close:hover {
    background: var(--v3-bg-muted);
    color: var(--v3-text-dark);
}

.v3-modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.v3-modal-body {
    padding: var(--v3-spacing-lg);
}

.v3-modal-description {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0 0 var(--v3-spacing-lg) 0;
}

.v3-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
    margin-bottom: var(--v3-spacing-lg);
}

.v3-form-label {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
}

.v3-error-message {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-error-red);
    margin-top: var(--v3-spacing-xs);
    padding: var(--v3-spacing-sm);
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--v3-radius-sm);
}

.v3-success-message {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-success-green);
    margin-top: var(--v3-spacing-xs);
    padding: var(--v3-spacing-sm);
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--v3-radius-sm);
}

.v3-modal-actions {
    display: flex;
    gap: var(--v3-spacing-md);
    justify-content: flex-end;
}

/* Add More Photos modal — brand primary / secondary buttons + secondary icon */
#v3-add-photos-modal #v3-add-photos-submit.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

#v3-add-photos-modal #v3-add-photos-submit.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

#v3-add-photos-modal .v3-button-secondary {
    background: var(--v3-secondary-color);
    color: var(--v3-secondary-font-color, var(--v3-font-color, #111827));
    border: 1px solid rgba(0, 0, 0, 0.12);
}

#v3-add-photos-modal .v3-button-secondary:hover {
    background: var(--v3-secondary-color);
    opacity: 0.9;
}

#v3-add-photos-modal .v3-modal-icon {
    background: color-mix(in srgb, var(--v3-secondary-color) 28%, transparent);
}

#v3-add-photos-modal .v3-modal-icon svg {
    color: var(--v3-secondary-color);
}

.v3-button-secondary {
    background: var(--v3-secondary-color);
    color: var(--v3-secondary-font-color, var(--v3-font-color));
    border: 1px solid var(--v3-border-medium);
}

.v3-button-secondary:hover {
    background: var(--v3-secondary-color);
    opacity: 0.9;
}

.v3-button-icon {
    width: 1rem;
    height: 1rem;
    margin-right: var(--v3-spacing-xs);
    flex-shrink: 0;
}

/* Modal Header with Icon */
.v3-modal-header-left {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    flex: 1;
}

.v3-modal-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(102, 51, 255, 0.2);
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.v3-modal-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v3-primary-color);
    stroke-width: 2.5;
}

.v3-modal-header-text {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
    flex: 1;
}

/* Active Access Codes Section */
.v3-active-codes-section {
    background: var(--v3-info-blue);
    padding: var(--v3-spacing-md);
    border-radius: var(--v3-radius-md);
    margin-top: var(--v3-spacing-lg);
    margin-bottom: var(--v3-spacing-md);
}

.v3-active-codes-title {
    font-size: var(--v3-font-size-base);
    font-weight: 700;
    color: var(--v3-text-white);
    margin: 0 0 var(--v3-spacing-sm) 0;
}

.v3-active-codes-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--v3-spacing-sm);
}

.v3-access-code-tag {
    background: rgba(102, 51, 255, 0.9);
    color: var(--v3-text-white);
    padding: var(--v3-spacing-xs) var(--v3-spacing-md);
    border-radius: var(--v3-radius-full);
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    display: inline-block;
}

/* Proof-card access-code tabs (merge disabled, multiple codes) */
.v3-proof-card-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0.75rem var(--v3-spacing-md);
    background: var(--v3-bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 20;
    scrollbar-width: thin;
}

.v3-proof-card-tabs::-webkit-scrollbar {
    height: 4px;
}

.v3-proof-card-tabs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.v3-proof-card-tabs-label {
    flex: 0 0 auto;
    align-self: center;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    padding-right: 0.25rem;
    line-height: 1.25;
}

.v3-proof-card-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    min-height: 44px;
    min-width: 44px;
    padding: 0.625rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--v3-radius-md, 0.5rem);
    background: #fff;
    /* Do not use brand --v3-font-color here: photographers often set a light font for dark headers,
       which makes inactive tabs unreadable on a white background. */
    color: #1f2937;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.v3-proof-card-tab:hover {
    border-color: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    color: #111827;
    background: #f9fafb;
}

.v3-proof-card-tab-active,
.v3-proof-card-tab[aria-selected="true"] {
    background: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    border-color: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    color: var(--v3-on-primary-color, #fff);
}

.v3-proof-card-panel-hidden,
.v3-proof-card-panel[hidden] {
    display: none !important;
}

.v3-proof-card-panel:not(.v3-proof-card-panel-hidden):not([hidden]) {
    display: block;
}

/* Main content */
.v3-main-content {
    background: var(--v3-bg-light);
    padding: var(--v3-spacing-2xl) var(--v3-spacing-md);
    min-height: calc(100vh - 80px);
}

.v3-photos-section {
    max-width: 1280px;
    margin: 0 auto;
}

.v3-section-header {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    margin-bottom: var(--v3-spacing-2xl);
}

@media (min-width: 768px) {
    .v3-section-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.v3-section-title-group {
    display: flex;
    align-items: flex-start;
    gap: var(--v3-spacing-md);
}

.v3-section-icon {
    width: 3rem;
    height: 3rem;
    background: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.v3-section-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v3-on-primary-color, var(--v3-text-white, #FFFFFF));
}

.v3-section-text {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
}

/* Available Photos ↔ Available Products swap buttons — page-centered row */
.v3-section-header--catalog-nav {
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .v3-section-header--catalog-nav {
        flex-direction: column;
        justify-content: center;
    }
}

.v3-catalog-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
    width: 100%;
}

.v3-section-subtitle--catalog {
    width: 100%;
    text-align: center;
    margin: 0;
}

.v3-catalog-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    font-size: var(--v3-font-size-base, 1rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: var(--v3-radius-md, 0.5rem);
    background: #fff;
    /* Readable on white — do not use brand header font colours */
    color: #1f2937;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.v3-catalog-nav-item:hover {
    border-color: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    color: #111827;
    background: #f9fafb;
}

/* Active = inverted (filled primary) button */
.v3-catalog-nav-item--active {
    background: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    border-color: var(--v3-primary-color, var(--v3-primary-indigo, #6633FF));
    color: var(--v3-on-primary-color, #fff);
    cursor: default;
}

.v3-catalog-empty-note {
    margin: var(--v3-spacing-lg) 0;
    color: var(--v3-text-medium);
    text-align: center;
}

.v3-section-heading {
    font-size: var(--v3-font-size-3xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-section-subtitle {
    font-size: var(--v3-font-size-base);
    color: var(--v3-text-medium);
    margin: 0;
}

/* Photo grid — fixed height, width from aspect ratio (no letterbox fill).
   --v3-catalog-image-scale (Design setting, default 1) scales student photos only. */
.v3-photos-grid {
    --v3-available-photo-height-base: 11.5rem;
    --v3-available-photo-height: calc(var(--v3-available-photo-height-base) * var(--v3-catalog-image-scale, 1));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: var(--v3-spacing-lg);
    margin-bottom: var(--v3-spacing-2xl);
}

@media (min-width: 768px) {
    .v3-photos-grid {
        --v3-available-photo-height-base: 14rem;
    }
}

@media (min-width: 1024px) {
    .v3-photos-grid {
        --v3-available-photo-height-base: 16rem;
    }
}

.v3-photo-card {
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    overflow: hidden;
    box-shadow: var(--v3-shadow-sm);
    transition: var(--v3-transition);
}

.v3-photo-card:hover {
    box-shadow: var(--v3-shadow-md);
    transform: translateY(-2px);
}

.v3-photo-clickable {
    cursor: pointer;
}

.v3-photos-grid > .v3-photo-card {
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    background: #FFFFFF;
    /* Border on the card (not outline on the img) so rounded corners render correctly */
    border: 1px solid var(--v3-image-keyline);
}

.v3-photos-grid > .v3-photo-card .v3-photo-image {
    /* Shared row height; width follows aspect. object-fit avoids squash if max-width clamps. */
    height: var(--v3-available-photo-height);
    width: auto;
    max-width: 100%;
    display: block;
    vertical-align: bottom;
    pointer-events: none;
    object-fit: contain;
    /* Parent card supplies the keyline; outline ignores border-radius on the image */
    outline: none;
}

.v3-photo-filename {
    margin: 0;
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
    font-size: var(--v3-font-size-sm);
    font-weight: 500;
    color: var(--v3-text-medium);
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Image wrap — anchors the floating Choose Options CTA / wishlist over the photo */
.v3-photos-grid > .v3-photo-card .v3-photo-image-wrap {
    position: relative;
    display: block;
    line-height: 0;
}

/* Wishlist heart — top-right of each catalog photo */
.v3-wishlist-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: var(--v3-radius-full);
    background: rgba(255, 255, 255, 0.9);
    /* Empty heart outline must stay black for contrast on the white chip */
    color: #000000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    transition: var(--v3-transition);
}

.v3-wishlist-toggle:hover {
    background: #fff;
    transform: scale(1.06);
}

.v3-wishlist-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
}

.v3-wishlist-toggle.is-wishlisted {
    color: #e11d48;
}

/* Allow DaisyUI tooltip to escape the photo card (cards use overflow: hidden) */
.v3-photos-grid > .v3-photo-card:has(.v3-wishlist-toggle:hover),
.v3-photos-grid > .v3-photo-card:has(.v3-wishlist-toggle:focus-visible) {
    overflow: visible;
    z-index: 6;
}

.v3-wishlist-toggle.tooltip[data-tip]:before {
    white-space: nowrap;
    max-width: none;
    z-index: 7;
}

.v3-wishlist-toggle.tooltip[data-tip]:after {
    z-index: 7;
}

/* Wishlist tooltips: show only after 1s hover; hide immediately on mouse leave */
@media (prefers-reduced-motion: no-preference) {
    .v3-wishlist-toggle.tooltip[data-tip]:before,
    .v3-wishlist-toggle.tooltip:after,
    .v3-wishlist-header-button.tooltip[data-tip]:before,
    .v3-wishlist-header-button.tooltip:after {
        transition:
            opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0s,
            transform 0.2s cubic-bezier(0.4, 0, 0.2, 1) 0s !important;
    }

    .v3-wishlist-toggle.tooltip:hover[data-tip]:before,
    .v3-wishlist-toggle.tooltip:hover:after,
    .v3-wishlist-toggle.tooltip:has(:focus-visible)[data-tip]:before,
    .v3-wishlist-toggle.tooltip:has(:focus-visible):after,
    .v3-wishlist-header-button.tooltip:hover[data-tip]:before,
    .v3-wishlist-header-button.tooltip:hover:after,
    .v3-wishlist-header-button.tooltip:has(:focus-visible)[data-tip]:before,
    .v3-wishlist-header-button.tooltip:has(:focus-visible):after {
        transition-delay: 1s !important;
    }
}

/* After click: force tooltip hidden, then remove this class to restart the 1s hover delay */
.v3-wishlist-toggle.tooltip.v3-tooltip-paused[data-tip]:before,
.v3-wishlist-toggle.tooltip.v3-tooltip-paused:after,
.v3-wishlist-header-button.tooltip.v3-tooltip-paused[data-tip]:before,
.v3-wishlist-header-button.tooltip.v3-tooltip-paused:after {
    opacity: 0 !important;
    visibility: hidden !important;
    transition-delay: 0s !important;
}

.v3-wishlist-header-button--active {
    color: #e11d48;
}

.v3-wishlist-header-button--active svg {
    fill: currentColor;
}

/* Anchor for “Image added to wishlist” popup beside the header heart */
.v3-wishlist-header-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.v3-wishlist-toast {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    z-index: 60;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    background: #111827;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Small caret pointing up toward the wishlist icon */
.v3-wishlist-toast::before {
    content: "";
    position: absolute;
    top: -5px;
    right: 0.85rem;
    width: 10px;
    height: 10px;
    background: #111827;
    transform: rotate(45deg);
}

.v3-wishlist-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Choose Options CTA floats on the image — hidden until hover (desktop) */
.v3-choose-options-cta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    border-radius: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--v3-spacing-sm);
    text-decoration: none;
    /* Keep card height stable: overlay only, never in document flow */
    width: 100%;
    box-sizing: border-box;
}

/* Default: full label; short label for portrait (narrow) thumbs */
.v3-choose-options-cta-label-short {
    display: none;
}

.v3-choose-options-cta--portrait .v3-choose-options-cta-label-full {
    display: none;
}

.v3-choose-options-cta--portrait .v3-choose-options-cta-label-short {
    display: inline;
}

/* Fallback when Width/Height missing: rendered width < fixed photo height => portrait */
@container v3-photo (max-width: var(--v3-available-photo-height)) {
    .v3-choose-options-cta-label-full {
        display: none;
    }

    .v3-choose-options-cta-label-short {
        display: inline;
    }
}

.v3-photos-grid > .v3-photo-card:hover .v3-choose-options-cta,
.v3-photos-grid > .v3-photo-card:focus-within .v3-choose-options-cta {
    display: inline-flex;
}

.v3-photos-grid > .v3-photo-card .v3-choose-options-cta.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
    border: none;
}

.v3-photos-grid > .v3-photo-card .v3-choose-options-cta.v3-button-primary:hover {
    opacity: 0.92;
    color: var(--v3-on-primary-color, #FFFFFF);
}

/* Touch / coarse pointer: always show CTA (no reliable hover) */
@media (hover: none), (pointer: coarse) {
    .v3-photos-grid > .v3-photo-card .v3-choose-options-cta {
        display: inline-flex;
    }
}

/* Choose Options detail page — photo + product picker */
.v3-choose-options-page {
    padding-top: var(--v3-spacing-lg);
}

.v3-choose-options-event-header {
    max-width: 1100px;
    margin: 0 auto var(--v3-spacing-lg);
}

.v3-choose-options-event-title {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 700;
    /* Secondary font colour — primary is often light for dark headers */
    color: var(--v3-secondary-font-color, #111827);
    line-height: 1.25;
    word-break: break-word;
}

/* Desktop: image + carousel in left column, product panel on the right */
.v3-choose-options-body {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    grid-template-rows: auto auto;
    column-gap: var(--v3-spacing-2xl);
    row-gap: var(--v3-spacing-lg);
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.v3-choose-options-media-col {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    min-width: 0;
}

.v3-choose-options-panel {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    min-width: 0;
}

/* Full content width — under image and Add to basket panel, not limited to image column */
.v3-choose-options-carousel {
    grid-column: 1 / -1;
    grid-row: 2;
}

.v3-choose-options-media {
    position: relative;
    background: #f3f4f6;
    border: 1px solid var(--v3-image-keyline, #e5e7eb);
    border-radius: var(--v3-radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.v3-choose-options-hero-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(70vh, 640px);
    object-fit: contain;
    background: #fff;
}

/* Banner over product graphic — clarifies this is a sample, not the customer's photo */
.v3-choose-options-sample-banner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0.55rem 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
    pointer-events: none;
}

.v3-choose-options-sample-banner[hidden] {
    display: none !important;
}

/* Persistent photo identity — remains visible after a product is selected; click opens lightbox */
.v3-choose-options-selected-photo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--v3-border-light, #e5e7eb);
    border-radius: var(--v3-radius-md, 0.5rem);
    background: #f9fafb;
    min-width: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.v3-choose-options-selected-photo:hover {
    background: #f3f4f6;
    border-color: color-mix(in srgb, var(--v3-primary-color, #2563eb) 35%, #e5e7eb);
}

.v3-choose-options-selected-photo:focus-visible {
    outline: 2px solid var(--v3-primary-color, #2563eb);
    outline-offset: 2px;
}

.v3-choose-options-selected-photo-hint {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--v3-text-medium, #6b7280);
}

.v3-choose-options-selected-photo-thumb {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: var(--v3-radius-sm, 0.375rem);
    border: 1px solid var(--v3-image-keyline, #e5e7eb);
    flex-shrink: 0;
    background: #fff;
}

.v3-choose-options-selected-photo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.v3-choose-options-selected-photo-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--v3-text-medium, #6b7280);
}

.v3-choose-options-selected-photo-name {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-secondary-font-color, #111827);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v3-choose-options-eyebrow {
    margin: 0;
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--v3-text-medium);
}

/* Use secondary font colour — primary font is often light for dark headers and unreadable on white */
.v3-choose-options-title {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    color: var(--v3-secondary-font-color, #111827);
    line-height: 1.25;
    word-break: break-word;
}

.v3-choose-options-price {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--v3-primary-color);
}

.v3-choose-options-description {
    /* 80% larger than the small body size used previously */
    font-size: calc(var(--v3-font-size-sm) * 1.8);
    color: var(--v3-secondary-font-color, var(--v3-text-medium, #4b5563));
    line-height: 1.5;
}

.v3-choose-options-description[hidden] {
    display: none !important;
}

/* Horizontal carousel of other photos (links to Choose Options for each) */
.v3-choose-options-carousel {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
    min-width: 0;
}

.v3-choose-options-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v3-spacing-sm);
}

.v3-choose-options-carousel-title {
    margin: 0;
    font-size: var(--v3-font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--v3-secondary-font-color, #374151);
}

.v3-choose-options-carousel-nav {
    display: flex;
    gap: 0.35rem;
}

.v3-choose-options-carousel-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--v3-radius-md, 0.5rem);
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    color: var(--v3-secondary-font-color, #111827);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--v3-transition, background 0.15s ease);
}

.v3-choose-options-carousel-btn:hover {
    background: #f3f4f6;
}

.v3-choose-options-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.v3-choose-options-carousel-btn svg {
    width: 1.125rem;
    height: 1.125rem;
}

.v3-choose-options-carousel-track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Allow finger swipe horizontally without the page stealing the gesture */
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
}

.v3-choose-options-carousel-track::-webkit-scrollbar {
    height: 6px;
}

.v3-choose-options-carousel-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.22);
    border-radius: 3px;
}

.v3-choose-options-carousel-item {
    position: relative;
    flex: 0 0 auto;
    width: 12rem;
    height: 12rem;
    scroll-snap-align: start;
    display: block;
    background: #fff;
    border: 1px solid var(--v3-image-keyline, #e5e7eb);
    border-radius: var(--v3-radius-md, 0.5rem);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    /* Prefer horizontal swipe-scroll over link drag on touch devices */
    touch-action: pan-x;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.v3-choose-options-carousel-item:hover,
.v3-choose-options-carousel-item:focus-visible {
    box-shadow: var(--v3-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.12));
    transform: translateY(-2px);
}

.v3-choose-options-carousel-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f3f4f6;
    /* Prevent image drag from blocking swipe-to-scroll on phones */
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* Overlay CTA on hover — same pattern as Available Photos catalog */
.v3-choose-options-carousel-cta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.4rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-choose-options-carousel-item:hover .v3-choose-options-carousel-cta,
.v3-choose-options-carousel-item:focus-visible .v3-choose-options-carousel-cta,
.v3-choose-options-carousel-item:focus-within .v3-choose-options-carousel-cta {
    display: flex;
}

@media (hover: none), (pointer: coarse) {
    .v3-choose-options-carousel-cta {
        display: flex;
    }
}

@media (min-width: 768px) {
    .v3-choose-options-carousel-item {
        width: 14rem;
        height: 14rem;
    }
}

.v3-choose-options-field {
    width: 100%;
}

/* Product dropdown + quantity — keep light (iOS uses color-scheme for native controls) */
.v3-choose-options-select,
#v3-choose-options-select,
.v3-choose-options-qty,
#v3-choose-options-qty {
    color-scheme: light;
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db;
}

.v3-choose-options-select option,
#v3-choose-options-select option {
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* Quantity stepper (+ / −) — preferred on mobile over native number arrows */
.v3-choose-options-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.v3-choose-options-qty-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--v3-radius-md, 0.5rem);
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.v3-choose-options-qty-btn:hover {
    background: #f3f4f6;
}

.v3-choose-options-qty-btn:active {
    background: #e5e7eb;
}

.v3-choose-options-qty,
#v3-choose-options-qty {
    width: 3.5rem;
    height: 2.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--v3-radius-md, 0.5rem);
    border: 1px solid #d1d5db;
    padding: 0;
    -moz-appearance: textfield;
}

.v3-choose-options-qty::-webkit-inner-spin-button,
.v3-choose-options-qty::-webkit-outer-spin-button,
#v3-choose-options-qty::-webkit-inner-spin-button,
#v3-choose-options-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.v3-choose-options-qty:focus,
#v3-choose-options-qty:focus {
    background-color: #ffffff !important;
    color: #111827 !important;
    outline: 2px solid var(--v3-primary-color, #6633FF);
    outline-offset: -2px;
    border-color: var(--v3-primary-color, #6633FF);
}

.v3-choose-options-panel .v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-choose-options-panel .v3-button-primary:hover:not(:disabled) {
    opacity: 0.92;
}

.v3-choose-options-panel .v3-button-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    /* overflow-x: clip on ancestors blocks nested horizontal touch scroll on iOS */
    .v3-page-container:has(.v3-choose-options-carousel-track) {
        overflow-x: hidden;
    }

    /* Mobile stack: image → product form → other photos (just above page footer) */
    .v3-choose-options-body {
        display: flex;
        flex-direction: column;
        gap: var(--v3-spacing-lg);
    }

    .v3-choose-options-media-col {
        order: 1;
    }

    .v3-choose-options-panel {
        order: 2;
        grid-column: auto;
        grid-row: auto;
    }

    .v3-choose-options-carousel {
        order: 3;
        grid-column: auto;
        grid-row: auto;
        margin-top: var(--v3-spacing-sm);
        margin-bottom: var(--v3-spacing-md);
        /* Keep track as the scrollport; don't clip touch gestures */
        overflow: visible;
        min-width: 0;
        width: 100%;
    }

    .v3-choose-options-carousel-track {
        width: 100%;
        max-width: 100%;
    }

    .v3-choose-options-hero-image {
        max-height: min(50vh, 420px);
    }
}

.v3-photo-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.v3-demo-button-container {
    display: flex;
    justify-content: center;
    margin-top: var(--v3-spacing-2xl);
}

.v3-button-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* ============================================
   Photo Packages Page
   ============================================ */
.v3-photo-packages-page {
    background: var(--v3-bg-light);
    padding: var(--v3-spacing-2xl) var(--v3-spacing-md);
    min-height: 100vh;
}

.v3-packages-section {
    max-width: 1280px;
    margin: 0 auto;
}

.v3-products-section {
    max-width: 1280px;
    margin: 0 auto;
}

/* Space between Photo Packages and Individual Print Sizes */
.v3-packages-section + .v3-products-section {
    margin-top: 20px;
}

.v3-section-header-simple {
    text-align: center;
    margin-bottom: var(--v3-spacing-2xl);
}

.v3-section-description {
    font-size: var(--v3-font-size-base);
    color: var(--v3-text-medium);
    margin: var(--v3-spacing-md) 0 0 0;
}

.v3-packages-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--v3-spacing-xl);
}

@media (min-width: 768px) {
    .v3-packages-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .v3-packages-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.v3-products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--v3-spacing-xl);
}

@media (min-width: 768px) {
    .v3-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .v3-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.v3-package-card {
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    overflow: hidden;
    /* Border on the card (not outline on the img) so rounded corners render correctly */
    border: 1px solid var(--v3-image-keyline);
    box-shadow: var(--v3-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--v3-transition);
}

.v3-package-card:hover {
    box-shadow: var(--v3-shadow-lg);
    transform: translateY(-4px);
}

.v3-package-image-container {
    position: relative;
    width: 100%;
    /* Do not clip package art — show the full graphic */
    overflow: visible;
    background: var(--v3-bg-muted);
}

.v3-package-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    /* Parent card supplies the keyline; outline ignores border-radius */
    outline: none;
}

.v3-price-badge,
.v3-crop-badge {
    position: absolute;
    padding: var(--v3-spacing-xs) var(--v3-spacing-md);
    border-radius: var(--v3-radius-full);
    font-size: var(--v3-font-size-sm);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
}

.v3-price-badge {
    top: var(--v3-spacing-md);
    right: var(--v3-spacing-md);
    background: var(--v3-primary-color);
    color: var(--v3-font-color);
}

.v3-crop-badge {
    top: var(--v3-spacing-md);
    left: var(--v3-spacing-md);
    background: var(--v3-secondary-pink);
}

.v3-crop-badge-inline {
    position: static;
    margin-left: var(--v3-spacing-sm);
    font-size: var(--v3-font-size-xs);
    vertical-align: middle;
}

/* Package banner - star and text on one line, horizontal bar (e.g. ★ MOST POPULAR) */
.v3-package-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    min-height: 2.25rem;
    color: #1a1a1a;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.v3-package-banner-star {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: inherit;
}

.v3-crop-icon {
    width: 1rem;
    height: 1rem;
}

.v3-package-content {
    padding: var(--v3-spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    flex: 1;
    min-height: 0;
}

.v3-package-content > .v3-button {
    margin-top: auto;
}

/* Select Photos on package cards — brand primary (global .v3-button-primary is secondary/grey) */
.v3-package-content > .v3-button.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-package-content > .v3-button.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-package-title {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-package-description {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0;
    line-height: 1.5;
}

.v3-package-description p {
    margin: 0 0 var(--v3-spacing-sm) 0;
}

.v3-package-description p:last-child {
    margin-bottom: 0;
}

.v3-package-description ul,
.v3-package-description ol {
    margin: var(--v3-spacing-sm) 0;
    padding-left: var(--v3-spacing-lg);
}

.v3-package-description li {
    margin: var(--v3-spacing-xs) 0;
}

/* ============================================
   Product Cards
   ============================================ */
.v3-product-card {
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    overflow: hidden;
    /* Border on the card (not outline on the img) so rounded corners render correctly */
    border: 1px solid var(--v3-image-keyline);
    box-shadow: var(--v3-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: var(--v3-transition);
}

.v3-product-card:hover {
    box-shadow: var(--v3-shadow-lg);
    transform: translateY(-4px);
}

.v3-product-image-container {
    position: relative;
    width: 100%;
    /* Full product graphic — no fixed height / cover crop */
    overflow: visible;
    background: var(--v3-bg-muted);
}

.v3-product-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: center;
    /* Parent card supplies the keyline; outline ignores border-radius */
    outline: none;
}

.v3-product-content {
    padding: var(--v3-spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    flex: 1;
    min-height: 0;
}

.v3-product-content > .v3-button {
    margin-top: auto;
}

/* Select Photos on product cards — brand primary */
.v3-product-content > .v3-button.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-product-content > .v3-button.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-product-title {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-product-description {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0;
    line-height: 1.5;
}

.v3-product-description p {
    margin: 0 0 var(--v3-spacing-sm) 0;
}

.v3-product-description p:last-child {
    margin-bottom: 0;
}

.v3-product-description ul,
.v3-product-description ol {
    margin: var(--v3-spacing-sm) 0;
    padding-left: var(--v3-spacing-lg);
}

.v3-product-description li {
    margin: var(--v3-spacing-xs) 0;
}

.v3-package-includes {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

.v3-includes-title {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-includes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
}

.v3-includes-list li {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-dark);
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-sm);
}

.v3-checkmark-icon {
    width: 1rem;
    height: 1rem;
    color: var(--v3-success-green);
    flex-shrink: 0;
}

/* ============================================
   Select Photos Modal
   ============================================ */
.v3-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    z-index: 1000;
}

@media (min-width: 768px) {
    .v3-modal-overlay {
        padding: 1rem;
        align-items: stretch;
    }
}

.v3-modal-container {
    background: #FFFFFF;
    border-radius: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--v3-shadow-lg);
    overflow: hidden;
}

@media (min-width: 768px) {
    .v3-modal-container {
        border-radius: var(--v3-radius-xl);
        max-width: 1200px;
    }
}

.v3-modal-header {
    background: var(--v3-primary-color);
    padding: 0.75rem 1rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .v3-modal-header {
        padding: var(--v3-spacing-md) var(--v3-spacing-lg);
    }
}

.v3-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.v3-modal-title {
    font-size: var(--v3-font-size-lg);
    font-weight: 700;
    color: var(--v3-font-color);
    margin: 0;
}

@media (min-width: 768px) {
    .v3-modal-title {
        font-size: var(--v3-font-size-xl);
    }
}

.v3-modal-subtitle {
    font-size: var(--v3-font-size-xs);
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

@media (min-width: 768px) {
    .v3-modal-subtitle {
        font-size: var(--v3-font-size-sm);
    }
}

.v3-close-button {
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    color: var(--v3-text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v3-radius-md);
    transition: var(--v3-transition);
}

.v3-close-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.v3-close-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Full-width layout for Select Photos modal (no sidebar) */
.v3-modal-content-full {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    animation: none;
}

.v3-requirements-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.v3-requirements-title {
    font-size: var(--v3-font-size-sm);
    font-weight: 700;
    color: var(--v3-text-dark);
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
    margin: 0;
}

.v3-title-icon {
    width: 1rem;
    height: 1rem;
}

.v3-requirement-item {
    background: var(--v3-card-bg);
    padding: 0.5rem 0.625rem;
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.v3-requirement-active {
    background: rgba(99, 102, 241, 0.1);
}

.v3-radio-button {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-full);
    flex-shrink: 0;
}

.v3-radio-selected {
    border-color: var(--v3-primary-indigo);
    background: var(--v3-primary-indigo);
    position: relative;
}

.v3-radio-selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.375rem;
    height: 0.375rem;
    background: var(--v3-text-white);
    border-radius: var(--v3-radius-full);
}

.v3-requirement-content {
    flex: 1;
    min-width: 0;
}

.v3-requirement-name {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v3-requirement-description {
    font-size: 0.6875rem;
    color: var(--v3-text-medium);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v3-requirement-badges {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.v3-progress-badge {
    background: var(--v3-error-red);
    color: var(--v3-text-white);
    padding: 0.125rem 0.375rem;
    border-radius: var(--v3-radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.v3-progress-badge.v3-progress-complete {
    background: var(--v3-success-green);
}

.v3-progress-badge.v3-progress-incomplete {
    background: var(--v3-error-red);
}

.v3-progress-text {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-dark);
}

.v3-status-badge {
    background: var(--v3-primary-indigo);
    color: var(--v3-text-white);
    padding: 0.125rem 0.375rem;
    border-radius: var(--v3-radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.v3-status-pending {
    background: var(--v3-warning-yellow);
    color: var(--v3-text-dark);
}

.v3-status-complete {
    background: var(--v3-success-green);
    color: var(--v3-text-white);
}

.v3-call-to-action {
    background: var(--v3-info-blue);
    color: var(--v3-text-white);
    padding: 0.5rem 0.625rem;
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
}

.v3-call-to-action p {
    margin: 0;
    font-size: var(--v3-font-size-xs);
}

.v3-summary-section {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.v3-summary-title {
    font-size: var(--v3-font-size-sm);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v3-summary-label {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-dark);
}

.v3-summary-value {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
}

.v3-photos-display-area {
    padding: 0.75rem;
    overflow-y: scroll;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    scrollbar-width: thin;
}

.v3-photos-display-area::-webkit-scrollbar {
    width: 8px;
}

.v3-photos-display-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.v3-photos-display-area::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
}

.v3-photos-display-area::-webkit-scrollbar-thumb:hover {
    background: #888;
}

@media (min-width: 768px) {
    .v3-photos-display-area {
        padding: 1rem 1.25rem;
    }
}

/* Compact progress strip */
.v3-progress-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding-bottom: 0.625rem;
    margin-bottom: 0.625rem;
    border-bottom: 1px solid var(--v3-border-light);
    width: 100%;
}

.v3-progress-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--v3-bg-muted);
    border-radius: var(--v3-radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.v3-progress-chip:hover {
    background: var(--v3-border-light);
}

.v3-chip-name {
    color: var(--v3-text-dark);
    font-weight: 600;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .v3-progress-strip {
        gap: 0.5rem;
    }
    .v3-progress-chip {
        font-size: 0.75rem;
        padding: 0.3125rem 0.625rem;
    }
    .v3-chip-name {
        max-width: 14rem;
    }
}

.v3-tag-photo-section {
    margin-bottom: 1.25rem;
    width: 100%;
}

.v3-tag-photo-section:last-child {
    margin-bottom: 0;
}

/* Prominent product section header */
.v3-product-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--v3-bg-muted);
    border-left: 4px solid var(--v3-primary-color, #6633FF);
    border-radius: var(--v3-radius-sm);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.v3-product-section-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem 1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.v3-product-section-colour-options {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
    margin-left: 0.25rem;
    padding-left: 1rem;
    border-left: 1px solid var(--v3-border-light);
}

.v3-product-colour-label {
    font-size: var(--v3-font-size-xs);
    font-weight: 600;
    color: var(--v3-text-medium);
    white-space: nowrap;
}

.v3-product-section-colour-options .v3-print-slot-radios {
    column-gap: 0.75rem;
    row-gap: 0.35rem;
}

.v3-product-section-option-options {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.35rem 1rem;
    margin-left: 0.25rem;
    padding: 0.35rem 0 0.35rem 1rem;
    border-left: 1px solid var(--v3-border-light);
    min-width: 0;
}

.v3-product-section-option-options .v3-product-option-group {
    background: var(--v3-bg-muted);
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-md);
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
}

.v3-product-section-option-options .v3-print-slot-radios {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: var(--v3-spacing-md);
    row-gap: var(--v3-spacing-sm);
}

.v3-product-section-option-options .v3-print-radio {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .v3-product-section-option-options {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 0.35rem;
    }
}

@media (max-width: 640px) {
    .v3-product-section-colour-options {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        padding-top: 0.35rem;
    }
}

.v3-product-section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--v3-primary-color, #6633FF);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.v3-product-section-info {
    min-width: 0;
}

.v3-product-section-name {
    font-size: var(--v3-font-size-base);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .v3-product-section-name {
        font-size: var(--v3-font-size-lg);
        white-space: normal;
    }
}

.v3-product-section-desc {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-medium);
    margin: 0;
}

/* Keep legacy classes for backwards compat */
.v3-photos-header {
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.375rem 0.75rem;
}

.v3-photos-section-title {
    font-size: var(--v3-font-size-base);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-photos-instruction {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-medium);
    margin: 0;
}

.v3-tag-progress {
    display: inline-flex;
}

/* Package/composite selection — same tiling as Available Photos (fixed height, width from aspect). */
.v3-photos-grid-modal {
    --v3-available-photo-height-base: 11.5rem;
    --v3-available-photo-height: calc(var(--v3-available-photo-height-base) * var(--v3-catalog-image-scale, 1));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    align-content: flex-start;
    gap: var(--v3-spacing-lg);
    width: 100%;
    transition: filter 0.25s ease;
}

@media (min-width: 768px) {
    .v3-photos-grid-modal {
        --v3-available-photo-height-base: 14rem;
    }
}

@media (min-width: 1024px) {
    .v3-photos-grid-modal {
        --v3-available-photo-height-base: 16rem;
    }
}

/* Mobile: centre customer photos and enlarge for consistent alignment */
@media (max-width: 767px) {
    .v3-photos-grid {
        --v3-available-photo-height-base: 18rem;
        justify-content: center;
        align-items: center;
    }

    .v3-photos-grid > .v3-photo-card {
        max-width: min(90vw, 408px);
    }

    .v3-photos-grid-modal {
        --v3-available-photo-height-base: 18rem;
        gap: 0.875rem;
        align-items: center;
    }

    .v3-photos-grid-modal .v3-no-photos-message {
        flex: 0 0 100%;
        width: 100%;
    }

    .v3-photos-grid-modal > .v3-photo-card-modal {
        max-width: min(90vw, 408px);
    }
}

.v3-photo-card-modal {
    background: var(--v3-card-bg);
    border-radius: var(--v3-radius-sm);
    overflow: hidden;
    box-shadow: var(--v3-shadow-sm);
    cursor: pointer;
    transition: var(--v3-transition);
    position: relative;
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    /* Border on the card (not outline on the img) so rounded corners render correctly */
    border: 1px solid var(--v3-image-keyline);
}

.v3-photo-card-modal:hover {
    transform: translateY(-2px);
    box-shadow: var(--v3-shadow-md);
}

.v3-photo-card-modal.v3-photo-selected {
    border: 3px solid var(--v3-primary-color);
    box-shadow: 0 0 0 2px rgba(102, 51, 255, 0.2);
}

.v3-photos-grid-modal > .v3-photo-card-modal .v3-photo-image {
    height: var(--v3-available-photo-height);
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    /* Parent card supplies the keyline; outline ignores border-radius on the image */
    outline: none;
}

.v3-photo-selection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 51, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.v3-photo-checkmark {
    width: 3rem;
    height: 3rem;
    color: var(--v3-font-color);
    background: var(--v3-primary-color);
    border-radius: 50%;
    padding: var(--v3-spacing-xs);
    stroke-width: 3;
}

/* Quantity overlay badge (top-right circle showing count) */
.v3-photo-qty-overlay {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--v3-primary-color, #6633FF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .v3-photo-qty-overlay {
        top: 0.375rem;
        right: 0.375rem;
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8125rem;
    }
}

/* +/- controls at bottom of selected photo cards */
.v3-photo-qty-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    z-index: 3;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    padding: 1.25rem 0.375rem 0.375rem;
}

.v3-qty-btn {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    padding: 0;
}

@media (min-width: 768px) {
    .v3-qty-btn {
        width: 1.875rem;
        height: 1.875rem;
    }
}

.v3-qty-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

.v3-qty-minus {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}
.v3-qty-minus:hover {
    background: #fff;
    transform: scale(1.1);
}

.v3-qty-plus {
    background: var(--v3-primary-color, #6633FF);
    color: #fff;
}
.v3-qty-plus:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}
.v3-qty-plus svg {
    stroke: #fff;
}

.v3-modal-footer {
    background: var(--v3-bg-muted);
    padding: 0.625rem 0.75rem;
    border-radius: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    border-top: 1px solid var(--v3-border-light);
}

@media (min-width: 768px) {
    .v3-modal-footer {
        padding: 0.75rem 1rem;
    }
}

.v3-footer-status {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-dark);
    display: none;
}

@media (min-width: 768px) {
    .v3-footer-status {
        display: block;
        font-size: var(--v3-font-size-sm);
    }
}

.v3-status-incomplete {
    color: var(--v3-error-red);
}

.v3-footer-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* Add to Cart uses brand primary once selection is complete
   (global .v3-button-primary maps to secondary/grey for other surfaces). */
.v3-modal-footer #v3-add-package-to-cart-btn.v3-button-primary,
.v3-modal-footer #v3-add-composite-to-cart-btn.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
    border: none;
}

.v3-modal-footer #v3-add-package-to-cart-btn.v3-button-primary:hover,
.v3-modal-footer #v3-add-composite-to-cart-btn.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-button-secondary {
    background: var(--v3-secondary-color);
    color: var(--v3-secondary-font-color, var(--v3-font-color));
    border: 1px solid var(--v3-border-medium);
}

.v3-button-secondary:hover {
    background: var(--v3-secondary-color);
    opacity: 0.9;
}

/* ============================================
   V3 Footer
   ============================================ */
.v3-footer {
    width: 100%;
    background: var(--v3-secondary-color, #F3F4F6);
    color: var(--v3-secondary-font-color, #000000);
    border-top: 1px solid color-mix(in srgb, var(--v3-secondary-font-color, #000000) 18%, transparent);
    padding: var(--v3-spacing-lg) var(--v3-spacing-md);
    margin-top: auto;
}

.v3-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

/* Company details left · Privacy / Terms right */
.v3-footer-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--v3-spacing-xl);
    width: 100%;
}

.v3-footer-left {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.v3-footer-right {
    flex: 0 0 auto;
    text-align: right;
}

.v3-footer-links {
    display: flex;
    gap: var(--v3-spacing-md);
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}

.v3-footer-link {
    color: var(--v3-secondary-font-color, #000000);
    text-decoration: none;
    font-size: var(--v3-font-size-sm);
    transition: opacity var(--v3-transition);
}

.v3-footer-link:hover {
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.85;
    text-decoration: underline;
}

.v3-footer-link-disabled {
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.55;
    cursor: not-allowed;
    font-size: var(--v3-font-size-sm);
}

.v3-footer-copyright {
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.75;
    font-size: var(--v3-font-size-xs);
    text-align: center;
    width: 100%;
    padding-top: var(--v3-spacing-sm);
    border-top: 1px solid color-mix(in srgb, var(--v3-secondary-font-color, #000000) 18%, transparent);
}

/* Photographer public information — uses secondary brand font colour */
.v3-footer-photographer-info {
    width: 100%;
    color: var(--v3-secondary-font-color, #000000);
}
.v3-footer-photographer-label {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--v3-spacing-xs);
}
.v3-footer-photographer-name {
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    color: var(--v3-secondary-font-color, #000000);
    margin: 0 0 var(--v3-spacing-xs);
}
.v3-footer-photographer-name-extra {
    font-weight: 400;
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.85;
}
.v3-footer-photographer-address {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.9;
    margin: 0 0 var(--v3-spacing-xs);
}
.v3-footer-photographer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0;
    justify-content: flex-start;
    align-items: center;
    font-size: var(--v3-font-size-sm);
    color: var(--v3-secondary-font-color, #000000);
}
.v3-footer-photographer-contact a.v3-footer-link {
    color: var(--v3-secondary-font-color, #000000);
    text-decoration: none;
}
.v3-footer-photographer-contact a.v3-footer-link:hover {
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.85;
    text-decoration: underline;
}
.v3-footer-contact-sep {
    color: var(--v3-secondary-font-color, #000000);
    opacity: 0.55;
    margin: 0 var(--v3-spacing-sm);
}

@media (max-width: 767px) {
    .v3-footer-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--v3-spacing-md);
    }

    .v3-footer-left,
    .v3-footer-right,
    .v3-footer-copyright {
        text-align: center;
    }

    .v3-footer-links {
        justify-content: center;
    }

    .v3-footer-photographer-contact {
        justify-content: center;
    }
}

.v3-button-disabled {
    background: var(--v3-bg-muted);
    color: var(--v3-text-light);
    cursor: not-allowed;
}

/* ============================================
   Shopping Cart
   ============================================ */

/* Full-page Shopping Cart (e.g. /OnlineOrderingV3/ShoppingCart): center content, single column */
.v3-main-content:has(.v3-cart-section) {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-2xl);
}
.v3-main-content:has(.v3-cart-section) .v3-cart-section {
    min-width: 0;
}

.v3-cart-section .v3-cart-page-title {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--v3-spacing-md);
    font-size: var(--v3-font-size-3xl);
    font-weight: 700;
    margin: 0 0 var(--v3-spacing-2xl) 0;
    direction: ltr;
}
.v3-cart-section .v3-cart-page-title .v3-cart-title-icon {
    order: 0;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    color: var(--v3-primary-color, #6633FF);
}
.v3-cart-section .v3-cart-page-title > span {
    order: 1;
}

.v3-cart-summary-below {
    margin-top: var(--v3-spacing-lg);
}
.v3-cart-summary-below .v3-cart-summary-card {
    max-width: 100%;
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    padding: var(--v3-spacing-xl);
    border: 1px solid var(--v3-border-light);
    box-shadow: var(--v3-shadow-sm);
}
.v3-cart-summary-below .v3-summary-total .v3-summary-value {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-info-blue);
}
.v3-cart-summary-below .v3-summary-total .v3-summary-label {
    font-size: var(--v3-font-size-lg);
    font-weight: 700;
}
.v3-cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    margin-top: var(--v3-spacing-lg);
}

/* Proceed to Checkout — brand primary (same as Complete Order on checkout) */
.v3-cart-summary-actions > a.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-cart-summary-actions > a.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-cart-container {
    max-width: 600px;
    margin: var(--v3-spacing-2xl) auto;
    background: #FFFFFF;
    border-radius: var(--v3-radius-xl);
    box-shadow: var(--v3-shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.v3-cart-header {
    background: var(--v3-primary-color);
    padding: var(--v3-spacing-lg);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v3-cart-title-group {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
}

.v3-cart-header-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v3-font-color);
}

.v3-cart-title {
    font-size: var(--v3-font-size-2xl);
    font-weight: 700;
    color: var(--v3-font-color);
    margin: 0;
}

.v3-cart-content {
    padding: var(--v3-spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.v3-cart-item {
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    padding: var(--v3-spacing-lg);
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--v3-spacing-lg);
    box-shadow: var(--v3-shadow-sm);
    border: 1px solid var(--v3-border-light);
}

.v3-cart-item-left {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    /* Prefer wrapping the qty/total row before crushing the product name */
    flex: 1 1 14rem;
    min-width: 0;
}

.v3-cart-item-right {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-lg);
    flex: 0 1 auto;
}

.v3-cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-lg);
}

.v3-item-close {
    position: absolute;
    top: var(--v3-spacing-md);
    right: var(--v3-spacing-md);
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    color: var(--v3-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v3-radius-md);
    transition: var(--v3-transition);
}

.v3-item-close:hover {
    background: var(--v3-bg-muted);
}

.v3-item-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.v3-item-product-info,
.v3-cart-item-left .v3-item-details {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
    flex: 1;
    min-width: 0;
}
.v3-item-product-info {
    gap: var(--v3-spacing-md);
}

.v3-item-image-wrap {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--v3-radius-md);
}

.v3-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--v3-radius-md);
}

.v3-item-details {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
    flex: 1;
}

.v3-item-name {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
    line-height: 1.3;
    /* Break on spaces first; only split mid-word if a single token is wider than the line */
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    min-height: 1.5em;
}

.v3-item-price {
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    color: var(--v3-info-blue);
    margin: 0;
}

.v3-quantity-selector {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
}

.v3-quantity-button {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--v3-bg-muted);
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-md);
    color: var(--v3-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--v3-transition);
}

.v3-quantity-button:hover {
    background: var(--v3-border-light);
}

.v3-quantity-button svg {
    width: 1rem;
    height: 1rem;
}

.v3-quantity-input {
    width: 3rem;
    height: 2.5rem;
    text-align: center;
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-md);
    background: var(--v3-card-bg);
    font-size: var(--v3-font-size-base);
    font-weight: 600;
}

.v3-cart-item .v3-selected-photos-section {
    width: 100%;
    flex-basis: 100%;
    margin-top: var(--v3-spacing-xs);
    padding-top: var(--v3-spacing-md);
    border-top: 1px solid var(--v3-border-light);
}

/* Narrow / mobile: stack name above qty+total so titles are not squeezed beside controls */
@media (max-width: 768px) {
    .v3-cart-section .v3-cart-item {
        flex-direction: column;
        align-items: stretch;
        gap: var(--v3-spacing-md);
        padding-right: calc(var(--v3-spacing-lg) + 1.5rem);
    }

    .v3-cart-section .v3-cart-item-left {
        flex: 1 1 auto;
        width: 100%;
        align-items: flex-start;
    }

    .v3-cart-section .v3-cart-item-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: var(--v3-spacing-md);
    }

    .v3-cart-section .v3-item-name {
        font-size: var(--v3-font-size-lg);
    }
}

.v3-selected-photos-section {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

.v3-selected-photos-label {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-photo-thumbnails {
    display: flex;
    gap: var(--v3-spacing-sm);
}

.v3-photo-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--v3-radius-md);
}

.v3-cart-footer {
    padding: var(--v3-spacing-lg);
    border-top: 1px solid var(--v3-border-light);
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v3-total-label {
    font-size: var(--v3-font-size-lg);
    font-weight: 700;
    color: var(--v3-text-dark);
}

.v3-total-amount {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-info-blue);
}

.v3-cart-actions {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

.v3-button-outline {
    background: var(--v3-card-bg);
    color: var(--v3-text-dark);
    border: 1px solid var(--v3-border-medium);
}

.v3-button-outline:hover {
    background: var(--v3-bg-muted);
}

/* ============================================
   Checkout Page
   ============================================ */
.v3-checkout-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--v3-primary-color);
    padding: var(--v3-spacing-md) var(--v3-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    box-shadow: var(--v3-shadow-md);
}

.v3-back-button {
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    color: var(--v3-font-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v3-radius-md);
    transition: var(--v3-transition);
}

.v3-back-button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.v3-back-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.v3-checkout-title-group {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
}

.v3-checkout-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--v3-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v3-checkout-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v3-font-color);
}

.v3-checkout-text {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
}

.v3-checkout-title {
    font-size: var(--v3-font-size-2xl);
    font-weight: 700;
    color: var(--v3-font-color);
    margin: 0;
}

.v3-checkout-subtitle {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-font-color);
    opacity: 0.9;
    margin: 0;
}

.v3-checkout-content {
    background: #FFFFFF;
    padding: var(--v3-spacing-lg) var(--v3-spacing-md);
    min-height: calc(100vh - 80px);
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
    box-sizing: border-box;
}

.v3-checkout-grid {
    max-width: 1280px;
    margin: 0 auto;
}

/* Mobile: shipping → order summary → payment. Desktop: summary sticky in right column. */
.v3-checkout-main-columns {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-checkout-shipping-block,
.v3-checkout-payment-block {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

@media (min-width: 1024px) {
    .v3-checkout-main-columns {
        display: grid;
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
        align-items: start;
        gap: var(--v3-spacing-md);
    }

    .v3-checkout-shipping-block {
        grid-column: 1;
        grid-row: 1;
    }

    .v3-checkout-payment-block {
        grid-column: 1;
        grid-row: 2;
    }

    .v3-checkout-main-columns .v3-order-summary-section {
        grid-column: 2;
        grid-row: 1 / -1;
    }
}

.v3-forms-section {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-form-card {
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    padding: var(--v3-spacing-lg);
    box-shadow: var(--v3-shadow-sm);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.v3-form-card-header {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    margin-bottom: var(--v3-spacing-md);
}

.v3-form-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--v3-primary-indigo);
}

.v3-form-card-title {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-checkout-form {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

/* Tighter spacing: no extra margin on groups, gap alone controls vertical space */
.v3-checkout-form .v3-form-group,
.v3-checkout-form .v3-form-row {
    margin-bottom: 0;
}

.v3-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--v3-spacing-md);
}

@media (min-width: 640px) {
    .v3-form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.v3-form-group-half {
    flex: 1;
}

.v3-label {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
}

.v3-label-icon {
    width: 1rem;
    height: 1rem;
    color: var(--v3-text-medium);
}

select.v3-input {
    padding: var(--v3-spacing-md);
    padding-left: var(--v3-spacing-md);
    background: #FFFFFF !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231F2937' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--v3-spacing-md) center;
    padding-right: 2.5rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color: var(--v3-text-dark) !important;
}

select.v3-input:focus {
    background: #FFFFFF !important;
    color: var(--v3-text-dark) !important;
}

select.v3-input option {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: var(--v3-text-dark);
}

.v3-student-info-section {
    text-align: center;
    margin: var(--v3-spacing-md) 0;
}

.v3-student-info-label {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-light);
    margin: 0;
}

.v3-order-summary-section {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .v3-checkout-main-columns .v3-order-summary-section {
        position: sticky;
        /* Account for sticky checkout header height (padding 24px top + ~70px content + 24px bottom ≈ 118px) + spacing */
        /* Using ~8rem (128px) to ensure it's always below the header */
        top: 8rem;
        align-self: start;
        max-height: calc(100vh - 8rem - var(--v3-spacing-md));
        overflow-y: auto;
    }
}

.v3-order-summary-card {
    background: #FFFFFF;
    border-radius: var(--v3-radius-lg);
    padding: var(--v3-spacing-lg);
    box-shadow: var(--v3-shadow-sm);
    border-left: 4px solid var(--v3-primary-indigo);
}

.v3-summary-header {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-md);
    margin-bottom: var(--v3-spacing-md);
}

.v3-order-item {
    display: flex;
    gap: var(--v3-spacing-md);
    margin-bottom: var(--v3-spacing-md);
}

.v3-order-item-image-wrap {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--v3-radius-md);
}

.v3-order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--v3-radius-md);
}

.v3-order-item-details {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--v3-spacing-md);
    min-width: 0;
}
.v3-order-item-desc {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
    min-width: 0;
}

.v3-order-item-name {
    font-size: var(--v3-font-size-base);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-order-item-meta {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0;
}

.v3-order-item-price {
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    color: var(--v3-info-blue);
    text-decoration: underline;
    margin: 0;
    flex-shrink: 0;
}

.v3-cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v3-cost-label {
    font-size: var(--v3-font-size-base);
    color: var(--v3-text-dark);
}

.v3-cost-value {
    font-size: var(--v3-font-size-base);
    color: var(--v3-text-dark);
}

.v3-order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v3-total-label-large {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
}

.v3-total-amount-large {
    font-size: var(--v3-font-size-2xl);
    font-weight: 700;
    color: var(--v3-info-blue);
}

.v3-checkout-actions {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
    margin-top: var(--v3-spacing-md);
}

/* Complete Order — brand primary (global .v3-button-primary is secondary/grey) */
.v3-checkout-actions #submitBtn.v3-button-primary,
.v3-checkout-form #submitBtn.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-checkout-actions #submitBtn.v3-button-primary:hover,
.v3-checkout-form #submitBtn.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

/* Confirm your crops modal — brand primary / secondary buttons */
#v3-checkout-confirm-crops-modal .v3-confirm-crops-happy-btn {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
    border: none;
}

#v3-checkout-confirm-crops-modal .v3-confirm-crops-happy-btn:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

#v3-checkout-confirm-crops-modal .v3-confirm-crops-cancel-btn {
    background: var(--v3-secondary-color);
    color: var(--v3-secondary-font-color, var(--v3-font-color, #111827));
    border: 1px solid rgba(0, 0, 0, 0.12);
}

#v3-checkout-confirm-crops-modal .v3-confirm-crops-cancel-btn:hover {
    background: var(--v3-secondary-color);
    opacity: 0.9;
}

.v3-help-button {
    position: fixed;
    bottom: var(--v3-spacing-lg);
    right: var(--v3-spacing-lg);
    width: 3rem;
    height: 3rem;
    background: var(--v3-bg-muted);
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-full);
    color: var(--v3-text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--v3-shadow-md);
    transition: var(--v3-transition);
}

.v3-help-button:hover {
    background: var(--v3-border-light);
}

.v3-help-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ============================================
   Photo Viewer Modal
   ============================================ */
.v3-photo-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Fill most of the viewport then reduce 40% (×0.6); leave room for the preview note */
    --v3-photo-viewer-max-w: min(calc(96vw * 0.6), 100%);
    --v3-photo-viewer-max-h: min(calc((100dvh - 8.5rem) * 0.6), calc((100vh - 8.5rem) * 0.6));
}

.v3-photo-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.v3-photo-viewer-container {
    /* Ensure flow paints behind absolutely positioned controls */
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--v3-spacing-md);
    /* Let backdrop clicks pass through to .v3-photo-viewer-overlay (close on click-off) */
    pointer-events: none;
}

.v3-photo-viewer-close {
    pointer-events: auto;
    position: absolute;
    top: max(var(--v3-spacing-lg), env(safe-area-inset-top, 0px));
    right: max(var(--v3-spacing-lg), env(safe-area-inset-right, 0px));
    min-width: 3rem;
    min-height: 3rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--v3-radius-full);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10025;
    transition: var(--v3-transition);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.v3-photo-viewer-close:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: #ffffff;
}

.v3-photo-viewer-close-x {
    font-size: 1.85rem;
    font-weight: 300;
    line-height: 1;
    margin-top: -0.1em;
}

.v3-photo-viewer-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.v3-photo-viewer-nav {
    pointer-events: auto;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--v3-radius-full);
    color: var(--v3-text-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10025;
    transition: var(--v3-transition);
}

.v3-photo-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.v3-photo-viewer-prev {
    left: var(--v3-spacing-lg);
}

.v3-photo-viewer-next {
    right: var(--v3-spacing-lg);
}

.v3-photo-viewer-nav svg {
    width: 1.5rem;
    height: 1.5rem;
}

.v3-photo-viewer-image-container {
    /* Viewport slot the preview is fitted into (JS may upscale small watermarked previews) */
    width: var(--v3-photo-viewer-max-w);
    height: var(--v3-photo-viewer-max-h);
    max-width: var(--v3-photo-viewer-max-w);
    max-height: var(--v3-photo-viewer-max-h);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 0;
    pointer-events: none;
}

.v3-photo-viewer-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: var(--v3-radius-md);
    box-shadow: var(--v3-shadow-lg);
    image-rendering: high-quality;
    pointer-events: auto;
    -webkit-user-drag: none;
    user-select: none;
}

.v3-photo-viewer-canvas {
    display: block;
    background: #111;
}

.v3-photo-viewer-image-container--magnifier {
    cursor: none;
    pointer-events: auto;
}

.v3-photo-viewer-loupe {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
    background-repeat: no-repeat;
    background-color: #111;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

@media (max-width: 768px) {
    .v3-photo-viewer-loupe {
        width: 110px;
        height: 110px;
    }
}

.v3-photo-viewer-info {
    pointer-events: auto;
    position: absolute;
    bottom: var(--v3-spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10025;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--v3-spacing-sm);
    max-width: min(90vw, 28rem);
    text-align: center;
}

.v3-photo-viewer-preview-note {
    margin: 0;
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.92);
    border-radius: var(--v3-radius-md);
    font-size: var(--v3-font-size-sm);
    font-weight: 400;
    line-height: 1.4;
}

.v3-photo-viewer-counter {
    background: rgba(0, 0, 0, 0.7);
    color: var(--v3-text-white);
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
    border-radius: var(--v3-radius-full);
    font-size: var(--v3-font-size-base);
    font-weight: 600;
}

@media (max-width: 768px) {
    .v3-photo-viewer-nav {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .v3-photo-viewer-prev {
        left: var(--v3-spacing-sm);
    }
    
    .v3-photo-viewer-next {
        right: var(--v3-spacing-sm);
    }
    
    .v3-photo-viewer-close {
        top: var(--v3-spacing-sm);
        right: var(--v3-spacing-sm);
        width: 2.5rem;
        height: 2.5rem;
    }
}

/* ============================================
   Product Photo Selection Modal
   ============================================ */
.v3-photo-selection-container {
    position: relative;
    width: min(1100px, 94vw);
    max-width: 1100px;
    max-height: 90vh;
    height: auto;
    background: var(--v3-card-bg);
    border-radius: var(--v3-radius-lg);
    padding: var(--v3-spacing-xl);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    margin: 0 auto;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
}

.v3-photo-selection-content {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-photo-selection-header {
    flex-shrink: 0;
}

/* Photos on top, Print finish / product options underneath (individual products) */
.v3-photo-selection-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--v3-spacing-lg);
}

.v3-photo-selection-options {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

.v3-photo-selection-options .v3-product-print-colour {
    margin-top: 0;
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
}

.v3-photo-selection-options .v3-product-print-colour-title {
    margin-bottom: var(--v3-spacing-sm);
}

/* Keep option labels on one line; wrap groups horizontally where they fit */
.v3-photo-selection-options .v3-print-slot-radios {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--v3-spacing-md);
    row-gap: var(--v3-spacing-sm);
}

.v3-photo-selection-options .v3-print-radio {
    white-space: nowrap;
}

.v3-photo-selection-options .v3-product-option-group {
    margin-top: var(--v3-spacing-sm);
}

.v3-photo-selection-options .v3-product-option-group:first-child {
    margin-top: 0;
}

.v3-photo-selection-photos {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}

.v3-photo-selection-options--hidden {
    display: none !important;
}

.v3-photo-selection-body--photos-only .v3-photo-selection-photos {
    flex: 0 0 auto;
    width: 100%;
}

.v3-photo-selection-title {
    font-size: var(--v3-font-size-xl);
    font-weight: 700;
    color: var(--v3-text-dark);
    margin: 0;
}

.v3-photo-selection-description {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0;
}

/* Individual product selection — same tiling as Available Photos (fixed height, width from aspect). */
.v3-photo-selection-grid {
    --v3-available-photo-height-base: 11.5rem;
    --v3-available-photo-height: calc(var(--v3-available-photo-height-base) * var(--v3-catalog-image-scale, 1));
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    align-content: flex-start;
    gap: var(--v3-spacing-lg);
    width: 100%;
}

@media (min-width: 768px) {
    .v3-photo-selection-grid {
        --v3-available-photo-height-base: 14rem;
    }
}

@media (min-width: 1024px) {
    .v3-photo-selection-grid {
        --v3-available-photo-height-base: 16rem;
    }
}

.v3-photo-selection-card {
    background: var(--v3-card-bg);
    border-radius: var(--v3-radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--v3-transition);
    box-shadow: var(--v3-shadow-sm);
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    /* Border on the card (not outline on the img) so rounded corners render correctly */
    border: 1px solid var(--v3-image-keyline);
}

.v3-photo-selection-card:hover {
    box-shadow: var(--v3-shadow-lg);
    transform: translateY(-2px);
}

.v3-photo-selection-grid > .v3-photo-selection-card .v3-photo-selection-image {
    height: var(--v3-available-photo-height);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transition: filter 0.25s ease;
    /* Parent card supplies the keyline; outline ignores border-radius on the image */
    outline: none;
}

/* Live print-finish preview (CSS filters, client-side only).
   Filter on the grid/wrapper so it always composites (avoids img-specificity issues). */
#v3-photo-selection-grid.v3-print-preview-grid--bw {
    filter: grayscale(1) !important;
}

#v3-photo-selection-grid.v3-print-preview-grid--sepia {
    filter: sepia(0.82) saturate(0.88) contrast(1.04) !important;
}

#v3-photo-selection-grid.v3-print-preview-grid--colour {
    filter: none !important;
}

.v3-photos-grid-modal.v3-print-preview-grid--bw {
    filter: grayscale(1) !important;
}

.v3-photos-grid-modal.v3-print-preview-grid--sepia {
    filter: sepia(0.82) saturate(0.88) contrast(1.04) !important;
}

.v3-photos-grid-modal.v3-print-preview-grid--colour {
    filter: none !important;
}

#v3-crop-image.v3-print-preview-img--bw {
    filter: grayscale(1) !important;
}

#v3-crop-image.v3-print-preview-img--sepia {
    filter: sepia(0.82) saturate(0.88) contrast(1.04) !important;
}

#v3-crop-image.v3-print-preview-img--colour {
    filter: none !important;
}

.v3-print-slot-preview-wrap.v3-print-preview-wrap--bw {
    filter: grayscale(1) !important;
}

.v3-print-slot-preview-wrap.v3-print-preview-wrap--sepia {
    filter: sepia(0.82) saturate(0.88) contrast(1.04) !important;
}

.v3-print-slot-preview-wrap.v3-print-preview-wrap--colour {
    filter: none !important;
}

/* Crop modal: B&W/sepia on the photo only — crop box overlay stays blue */
.v3-crop-container.v3-print-preview-wrap--bw .cropper-canvas,
.v3-crop-container.v3-print-preview-wrap--bw .cropper-canvas img,
.v3-crop-container.v3-print-preview-wrap--bw .cropper-view-box,
.v3-crop-container.v3-print-preview-wrap--bw .cropper-view-box img,
.v3-crop-container.v3-print-preview-wrap--bw .cropper-face,
.v3-crop-preview-box.v3-print-preview-wrap--bw img,
.v3-crop-preview-box.v3-print-preview-wrap--bw canvas {
    filter: grayscale(1) !important;
}

.v3-crop-container.v3-print-preview-wrap--sepia .cropper-canvas,
.v3-crop-container.v3-print-preview-wrap--sepia .cropper-canvas img,
.v3-crop-container.v3-print-preview-wrap--sepia .cropper-view-box,
.v3-crop-container.v3-print-preview-wrap--sepia .cropper-view-box img,
.v3-crop-container.v3-print-preview-wrap--sepia .cropper-face,
.v3-crop-preview-box.v3-print-preview-wrap--sepia img,
.v3-crop-preview-box.v3-print-preview-wrap--sepia canvas {
    filter: sepia(0.82) saturate(0.88) contrast(1.04) !important;
}

.v3-crop-container.v3-print-preview-wrap--colour .cropper-canvas,
.v3-crop-container.v3-print-preview-wrap--colour .cropper-canvas img,
.v3-crop-container.v3-print-preview-wrap--colour .cropper-view-box,
.v3-crop-container.v3-print-preview-wrap--colour .cropper-view-box img,
.v3-crop-container.v3-print-preview-wrap--colour .cropper-face,
.v3-crop-preview-box.v3-print-preview-wrap--colour img,
.v3-crop-preview-box.v3-print-preview-wrap--colour canvas {
    filter: none !important;
}

/* Cart / checkout thumbnails */
.v3-cart-item-thumbnail.v3-print-preview-wrap--bw,
.v3-cart-photo-thumb-wrap.v3-print-preview-wrap--bw,
.v3-item-image-wrap.v3-print-preview-wrap--bw,
.v3-photo-thumbnail-wrap.v3-print-preview-wrap--bw,
.v3-order-item-image-wrap.v3-print-preview-wrap--bw {
    filter: grayscale(1) !important;
}

.v3-cart-item-thumbnail.v3-print-preview-wrap--sepia,
.v3-cart-photo-thumb-wrap.v3-print-preview-wrap--sepia,
.v3-item-image-wrap.v3-print-preview-wrap--sepia,
.v3-photo-thumbnail-wrap.v3-print-preview-wrap--sepia,
.v3-order-item-image-wrap.v3-print-preview-wrap--sepia {
    filter: sepia(0.82) saturate(0.88) contrast(1.04) !important;
}

.v3-cart-item-thumbnail,
.v3-cart-photo-thumb-wrap,
.v3-item-image-wrap,
.v3-photo-thumbnail-wrap,
.v3-order-item-image-wrap {
    overflow: hidden;
    transition: filter 0.25s ease;
}

.v3-cart-item-thumbnail img,
.v3-cart-photo-thumb-wrap img,
.v3-item-image-wrap img,
.v3-photo-thumbnail-wrap img,
.v3-order-item-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v3-cart-preview-wrap.v3-cart-preview-has-crop {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide uncropped placeholder until client-side crop preview is applied */
.v3-cart-preview-wrap[data-v3-cart-preview]:not([data-v3-cart-preview-done]) > .v3-cart-preview-placeholder {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

.v3-cart-preview-wrap.v3-cart-preview-loading {
    background: var(--v3-bg-muted);
}

.v3-cart-preview-wrap .v3-cart-preview-canvas {
    display: block;
    flex-shrink: 0;
}

.v3-print-slot-preview-wrap {
    flex-shrink: 0;
    width: 4.75rem;
    height: 4.75rem;
    border-radius: var(--v3-radius-md);
    overflow: hidden;
    border: 1px solid var(--v3-image-keyline);
    background: var(--v3-bg-muted);
    align-self: flex-start;
}

.v3-print-slot-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.25s ease;
}

.v3-print-slot--with-preview {
    align-items: flex-start;
    column-gap: var(--v3-spacing-md);
}

.v3-print-slot-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

@media (max-width: 768px) {
    .v3-photo-selection-container {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        height: auto;
        border-radius: 0;
        padding: var(--v3-spacing-md);
    }

    .v3-photo-selection-body {
        flex-direction: column;
        gap: var(--v3-spacing-md);
    }

    .v3-photo-selection-photos {
        order: 0;
        width: 100%;
    }

    .v3-photo-selection-options {
        flex: 0 0 auto;
        width: 100%;
    }

    .v3-photo-selection-options .v3-print-slot-radios {
        column-gap: var(--v3-spacing-md);
    }

    .v3-photo-selection-grid {
        --v3-available-photo-height-base: 18rem;
        gap: 0.875rem;
        align-items: center;
    }

    .v3-photo-selection-grid > .v3-photo-selection-card {
        max-width: min(90vw, 408px);
    }
}

/* ============================================
   Crop Modal (products requiring cropping)
   ============================================ */
.v3-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: var(--v3-spacing-md);
}

.v3-crop-modal.v3-crop-modal--open {
    display: flex !important;
}

.v3-crop-modal .v3-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.v3-crop-modal-content {
    position: relative;
    background: var(--v3-card-bg);
    border-radius: var(--v3-radius-lg);
    box-shadow: var(--v3-shadow-lg);
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
    isolation: isolate;
}

.v3-crop-modal .v3-modal-header {
    flex-shrink: 0;
    padding: var(--v3-spacing-lg);
    border-bottom: 1px solid var(--v3-border-light);
    background: var(--v3-primary-color);
    border-radius: 0;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-crop-modal .v3-modal-title {
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-crop-modal .v3-modal-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.v3-crop-modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
    padding: var(--v3-spacing-lg);
    overflow: hidden;
    min-height: 0;
}

/* Warn parents not to crop flush to edges — frames/mounts can hide the edge of the print */
.v3-crop-frame-warning {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid color-mix(in srgb, var(--v3-primary-color, #2563eb) 35%, #f59e0b);
    background: color-mix(in srgb, #fef3c7 88%, white);
    color: #78350f;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.v3-crop-frame-warning strong {
    font-weight: 700;
}

.v3-crop-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Extra height now that orientation/reset sit in the footer row */
    max-height: min(60vh, 520px);
    min-height: 220px;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
    flex-shrink: 1;
    z-index: 0;
}

/* Smooth crop open: cover unfinished Cropper until ready (keep layout visible for sizing) */
.v3-crop-container.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    background: #000;
    pointer-events: none;
}

.v3-crop-container.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: 2.25rem;
    height: 2.25rem;
    margin: -1.125rem 0 0 -1.125rem;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: v3-crop-spin 0.7s linear infinite;
    pointer-events: none;
}

@keyframes v3-crop-spin {
    to { transform: rotate(360deg); }
}

.v3-crop-modal #v3-crop-confirm-btn:disabled,
.v3-crop-modal #v3-crop-reset-btn:disabled,
.v3-crop-modal .v3-crop-orientation-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.v3-crop-container img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
}

.v3-crop-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--v3-spacing-sm);
    flex-shrink: 0;
}

.v3-crop-orientation-toggle {
    display: flex;
    gap: var(--v3-spacing-xs);
}

.v3-crop-orientation-btn {
    padding: var(--v3-spacing-sm) var(--v3-spacing-md);
    font-size: var(--v3-font-size-sm);
    border: 1px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-md);
    background: var(--v3-card-bg);
    color: var(--v3-text-dark);
    cursor: pointer;
    transition: var(--v3-transition);
}

.v3-crop-orientation-btn:hover {
    background: var(--v3-bg-muted);
}

.v3-crop-orientation-btn.v3-crop-orientation-active {
    background: var(--v3-primary-color);
    border-color: var(--v3-primary-color);
    /* Light brand primaries need dark text — never force white */
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-crop-modal .v3-modal-actions {
    flex-shrink: 0;
    padding: var(--v3-spacing-lg);
    border-top: 1px solid var(--v3-border-light);
    position: relative;
    z-index: 10;
    background: var(--v3-card-bg);
    pointer-events: auto;
}

/* Crop modal footer: orientation/reset left, cancel/confirm right */
#v3-crop-modal .v3-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--v3-spacing-md);
}

#v3-crop-modal .v3-crop-actions-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--v3-spacing-md);
    margin-left: auto;
}

/* Confirm crop uses brand primary (global .v3-button-primary uses secondary/grey) */
.v3-crop-modal #v3-crop-confirm-btn.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-crop-modal #v3-crop-confirm-btn.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-crop-modal #v3-print-colour-confirm-btn.v3-button-primary {
    background: var(--v3-primary-color);
    color: var(--v3-on-primary-color, #FFFFFF);
}

.v3-crop-modal #v3-print-colour-confirm-btn.v3-button-primary:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: var(--v3-on-primary-color, #FFFFFF);
}

@media (max-width: 768px) {
    .v3-crop-modal {
        padding: 0;
        align-items: stretch;
    }
    
    .v3-crop-modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .v3-crop-modal .v3-modal-header {
        padding: var(--v3-spacing-md) var(--v3-spacing-lg);
    }
    
    .v3-crop-modal-body {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        padding: var(--v3-spacing-sm) var(--v3-spacing-md);
    }
    
    .v3-crop-container {
        flex: 1 1 auto;
        max-width: none;
        max-height: min(58vh, 480px);
        min-height: 180px;
    }
    
    .v3-crop-container img {
        max-width: 100%;
        width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    
    .v3-crop-modal .v3-modal-actions {
        padding: var(--v3-spacing-md);
    }

    #v3-crop-modal .v3-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    #v3-crop-modal .v3-crop-controls {
        width: 100%;
    }

    #v3-crop-modal .v3-crop-actions-end {
        width: 100%;
        margin-left: 0;
    }

    #v3-crop-modal .v3-crop-actions-end .v3-button {
        flex: 1 1 auto;
    }
}

/* Print finish prompt (before crop in package selection) */
.v3-print-colour-modal-content {
    width: min(420px, 95vw);
}

.v3-print-colour-options {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-sm);
}

.v3-print-colour-option {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-sm);
    padding: var(--v3-spacing-md);
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-md);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.v3-print-colour-option:hover {
    border-color: var(--v3-primary);
    background: var(--v3-bg-subtle, rgba(59, 130, 246, 0.04));
}

.v3-print-colour-option:has(input:checked) {
    border-color: var(--v3-primary);
    background: var(--v3-bg-subtle, rgba(59, 130, 246, 0.08));
}

.v3-print-colour-option span {
    font-weight: 500;
    color: var(--v3-text-dark);
}

/* ============================================
   Shopping Cart Overlay
   ============================================ */
.v3-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    pointer-events: none;
}

.v3-cart-overlay.v3-cart-overlay-open {
    pointer-events: all;
}

.v3-cart-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.v3-cart-overlay-open .v3-cart-overlay-backdrop {
    opacity: 1;
}

.v3-cart-overlay-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background: var(--v3-card-bg);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1;
}

.v3-cart-overlay-open .v3-cart-overlay-panel {
    transform: translateX(0);
}

.v3-cart-overlay-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 12rem;
    padding: var(--v3-spacing-xl);
}

/* Cart Overlay Header */
.v3-cart-overlay-header {
    background: var(--v3-primary-color);
    color: var(--v3-font-color);
    padding: var(--v3-spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.v3-cart-overlay-title {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-sm);
}

.v3-cart-overlay-icon {
    width: 1.5rem;
    height: 1.5rem;
    stroke: currentColor;
}

.v3-cart-overlay-heading {
    font-size: var(--v3-font-size-xl);
    font-weight: 600;
    margin: 0;
}

.v3-cart-overlay-close {
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    color: var(--v3-font-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v3-radius-md);
    transition: background 0.2s ease;
}

.v3-cart-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.v3-cart-overlay-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Cart Overlay Content */
.v3-cart-overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--v3-spacing-md);
}

.v3-cart-overlay-items {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-lg);
}

.v3-cart-overlay-item {
    position: relative;
    padding: var(--v3-spacing-md);
    border: 1px solid var(--v3-border-light);
    border-radius: var(--v3-radius-md);
    display: flex;
    gap: var(--v3-spacing-md);
}

.v3-cart-item-remove {
    position: absolute;
    top: var(--v3-spacing-sm);
    right: var(--v3-spacing-sm);
    width: 1.5rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    color: var(--v3-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--v3-radius-sm);
    transition: all 0.2s ease;
}

.v3-cart-item-remove:hover {
    background: var(--v3-error-red);
    color: var(--v3-text-white);
}

.v3-cart-item-remove svg {
    width: 0.875rem;
    height: 0.875rem;
}

.v3-cart-item-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--v3-radius-md);
    overflow: hidden;
    background: var(--v3-bg-muted);
}

.v3-cart-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.v3-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-xs);
    min-width: 0;
}

.v3-cart-item-name {
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    color: var(--v3-text-dark);
    margin: 0 0 var(--v3-spacing-xs) 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    /* Ensure name is always visible */
    display: block;
    min-height: 1.5em;
}

.v3-cart-item-price {
    font-size: var(--v3-font-size-sm);
    color: var(--v3-text-medium);
    margin: 0;
    order: 2; /* Appears after name */
    font-weight: 500;
}

.v3-cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
    margin-top: var(--v3-spacing-xs);
    order: 3; /* Appears after name and price */
}

.v3-quantity-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--v3-bg-light);
    border: 2px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-md);
    color: var(--v3-text-dark);
    font-size: var(--v3-font-size-lg);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.v3-quantity-btn:hover {
    background: var(--v3-primary-color);
    color: var(--v3-text-white);
    border-color: var(--v3-primary-color);
    transform: scale(1.05);
}

.v3-quantity-btn:active {
    transform: scale(0.95);
}

.v3-quantity-input {
    width: 4rem;
    height: 2.5rem;
    text-align: center;
    border: 2px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-md);
    font-size: var(--v3-font-size-base);
    font-weight: 700;
    padding: 0;
    background: var(--v3-card-bg);
    color: var(--v3-text-dark) !important;
    -moz-appearance: textfield;
}

/* Make cart overlay quantity input more visible */
.v3-cart-overlay .v3-quantity-input {
    color: #000000 !important;
    font-weight: 800;
    border: 2px solid #9CA3AF;
    background: #FFFFFF !important;
}

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

.v3-quantity-input:focus {
    outline: 2px solid var(--v3-primary-color);
    outline-offset: -2px;
    border-color: var(--v3-primary-color);
    background: var(--v3-bg-light);
}

.v3-cart-overlay .v3-quantity-input:focus {
    background: #FFFFFF !important;
    color: #000000 !important;
}

.v3-cart-selected-photos {
    margin-top: var(--v3-spacing-xs);
}

.v3-selected-photos-label {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-light);
    margin: 0 0 var(--v3-spacing-xs) 0;
}

.v3-cart-photo-thumbnails {
    display: flex;
    gap: var(--v3-spacing-xs);
    flex-wrap: wrap;
}

.v3-cart-photo-thumb-wrap {
    width: 2rem;
    height: 2rem;
    border-radius: var(--v3-radius-full);
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--v3-image-keyline);
}

.v3-cart-photo-thumb {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    border: none;
    display: block;
}

.v3-cart-photo-thumb-more {
    background: var(--v3-bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--v3-font-size-xs);
    font-weight: 600;
    color: var(--v3-text-medium);
    border: 2px solid var(--v3-image-keyline);
}

.v3-cart-overlay-empty {
    text-align: center;
    padding: var(--v3-spacing-2xl);
    color: var(--v3-text-light);
}

/* Cart Overlay Footer */
.v3-cart-overlay-footer {
    padding: var(--v3-spacing-lg);
    border-top: 1px solid var(--v3-border-light);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-cart-overlay-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v3-cart-total-label {
    font-size: var(--v3-font-size-lg);
    font-weight: 600;
    color: var(--v3-text-dark);
}

.v3-cart-total-amount {
    font-size: var(--v3-font-size-2xl);
    font-weight: 700;
    color: #000000;
}

.v3-cart-checkout-btn {
    background: var(--v3-primary-color);
    color: #FFFFFF;
    border: none;
    border-radius: var(--v3-radius-md);
    padding: var(--v3-spacing-md) var(--v3-spacing-lg);
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.v3-cart-checkout-btn:hover {
    background: var(--v3-primary-color);
    opacity: 0.9;
    color: #FFFFFF;
}

.v3-cart-continue-btn {
    background: var(--v3-card-bg);
    color: var(--v3-text-dark);
    border: 1px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-md);
    padding: var(--v3-spacing-md) var(--v3-spacing-lg);
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--v3-spacing-xs);
    transition: all 0.2s ease;
}

.v3-cart-continue-btn:hover {
    background: var(--v3-bg-light);
    border-color: var(--v3-primary-color);
}

.v3-btn-icon {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 768px) {
    .v3-cart-overlay-panel {
        max-width: 100%;
    }
}

/* ============================================
   Voucher Input Group
   ============================================ */
.v3-voucher-input-group {
    display: flex;
    gap: var(--v3-spacing-sm);
    align-items: stretch;
}

.v3-voucher-input-group .v3-input {
    flex: 1;
}

.v3-input-uppercase {
    text-transform: uppercase;
}

.v3-success-text {
    color: var(--v3-success-green);
    font-size: var(--v3-font-size-sm);
    margin-top: var(--v3-spacing-xs);
    display: block;
}

.v3-error-text {
    color: var(--v3-error-red);
    font-size: var(--v3-font-size-xs);
    margin-top: var(--v3-spacing-xs);
    display: block;
}

/* ============================================
   Payment Methods
   ============================================ */
.v3-payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--v3-spacing-md);
}

.v3-payment-method-card {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-md);
    padding: var(--v3-spacing-md);
    background: var(--v3-card-bg);
    transition: all 0.2s ease;
}

.v3-payment-method-card:hover {
    border-color: var(--v3-primary-color);
    box-shadow: var(--v3-shadow-md);
}

.v3-payment-method-card .v3-payment-radio {
    position: absolute;
    top: var(--v3-spacing-sm);
    right: var(--v3-spacing-sm);
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid var(--v3-border-medium);
    border-radius: 50%;
    background: var(--v3-card-bg);
    transition: all 0.2s ease;
    position: relative;
}

.v3-payment-method-card .v3-payment-radio:checked + .v3-payment-card-content {
    opacity: 1;
}

.v3-payment-method-card .v3-payment-radio:checked {
    border-color: var(--v3-primary-color);
    background: var(--v3-primary-color);
}

.v3-payment-method-card .v3-payment-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--v3-text-white);
}

.v3-payment-method-card:has(.v3-payment-radio:checked) {
    border-color: var(--v3-primary-color);
    background: rgba(102, 51, 255, 0.05);
}

.v3-payment-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--v3-spacing-sm);
    padding-top: var(--v3-spacing-md);
}

.v3-payment-logo-img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.v3-card-logos {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-sm);
    justify-content: center;
    height: 2.5rem;
}

.v3-card-logo-img {
    height: 1.75rem;
    width: auto;
    object-fit: contain;
    max-width: 4rem;
}

.v3-payment-label {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
    text-align: center;
}

/* Stripe Logo */
.v3-stripe-logo {
    height: 2.5rem;
    width: auto;
}

/* Opayo Logo */
.v3-opayo-logo {
    display: flex;
    align-items: center;
    gap: var(--v3-spacing-xs);
}

.v3-opayo-o {
    font-size: 2rem;
    font-weight: 700;
    color: var(--v3-primary-color);
    line-height: 1;
}

.v3-opayo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.v3-opayo-payo {
    font-size: var(--v3-font-size-lg);
    font-weight: 700;
    color: var(--v3-primary-color);
}

.v3-opayo-by {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-light);
}

/* ============================================
   Shipping Options
   ============================================ */
.v3-shipping-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--v3-spacing-md);
}

.v3-shipping-option-card {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--v3-border-medium);
    border-radius: var(--v3-radius-md);
    padding: var(--v3-spacing-md);
    background: var(--v3-card-bg);
    transition: all 0.2s ease;
}

.v3-shipping-option-card:hover {
    border-color: var(--v3-primary-color);
    box-shadow: var(--v3-shadow-md);
}

.v3-shipping-option-card .shipping-option-radio {
    position: absolute;
    top: var(--v3-spacing-sm);
    right: var(--v3-spacing-sm);
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid var(--v3-border-medium);
    border-radius: 50%;
    background: var(--v3-card-bg);
    transition: all 0.2s ease;
    position: relative;
}

.v3-shipping-option-card .shipping-option-radio:checked {
    border-color: var(--v3-primary-color);
    background: var(--v3-primary-color);
}

.v3-shipping-option-card .shipping-option-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--v3-text-white);
}

.v3-shipping-option-card:has(.shipping-option-radio:checked) {
    border-color: var(--v3-primary-color);
    background: rgba(102, 51, 255, 0.05);
}

/* Single option (only Ship to Home when free postage date is null or past) */
.v3-shipping-option-single {
    cursor: default;
    border-color: var(--v3-primary-color);
    background: rgba(102, 51, 255, 0.05);
}
.v3-shipping-option-single:hover {
    border-color: var(--v3-primary-color);
    box-shadow: none;
}

.v3-shipping-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--v3-spacing-sm);
    padding-top: var(--v3-spacing-md);
}

.v3-shipping-icon {
    width: 3rem;
    height: 3rem;
    color: var(--v3-primary-color);
}

.v3-shipping-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--v3-spacing-xs);
}

.v3-shipping-title {
    font-size: var(--v3-font-size-base);
    font-weight: 600;
    color: var(--v3-text-dark);
    text-align: center;
}

.v3-shipping-subtitle {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-medium);
    text-align: center;
}

/* Radio button styling */
.v3-radio {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--v3-border-medium);
    border-radius: 50%;
    background: var(--v3-card-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.v3-radio:checked {
    border-color: var(--v3-primary-color);
    background: var(--v3-primary-color);
}

.v3-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--v3-text-white);
}

/* Package / product print finish (colour options) */
.v3-package-print-finish-panel {
    margin-top: var(--v3-spacing-md);
    padding: var(--v3-spacing-md);
    background: var(--v3-bg-muted);
    border-radius: var(--v3-radius-md);
    border: 1px solid var(--v3-border-light);
}

.v3-print-finish-heading {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    color: var(--v3-text-dark);
    margin: 0 0 var(--v3-spacing-md) 0;
}

.v3-print-finish-applies-note {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-medium);
    margin: calc(-1 * var(--v3-spacing-sm)) 0 var(--v3-spacing-md) 0;
    line-height: 1.45;
}

.v3-print-slot-preview-wrap--empty {
    min-width: 4.5rem;
    min-height: 4.5rem;
    border-radius: var(--v3-radius-sm);
    background: var(--v3-bg-light);
    border: 1px dashed var(--v3-border-light);
    flex-shrink: 0;
    align-self: flex-start;
}

.v3-print-finish-slots {
    display: flex;
    flex-direction: column;
    gap: var(--v3-spacing-md);
}

.v3-print-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--v3-spacing-xl);
    row-gap: var(--v3-spacing-sm);
    font-size: var(--v3-font-size-sm);
}

.v3-print-slot--with-preview .v3-print-slot-label {
    flex: 0 1 auto;
    padding-right: 0;
}

.v3-print-slot-label {
    flex: 1 1 140px;
    color: var(--v3-text-medium);
    word-break: break-word;
    padding-right: var(--v3-spacing-sm);
}

.v3-print-slot-radios {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--v3-spacing-xl);
    row-gap: var(--v3-spacing-md);
}

.v3-print-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    color: var(--v3-text-dark);
}

.v3-print-radio input {
    accent-color: var(--v3-primary-color);
    flex-shrink: 0;
    margin: 0;
}

.v3-product-print-colour {
    margin-top: var(--v3-spacing-md);
    padding: var(--v3-spacing-md);
    background: var(--v3-bg-muted);
    border-radius: var(--v3-radius-md);
    border: 1px solid var(--v3-border-light);
}

.v3-product-print-colour-title {
    font-size: var(--v3-font-size-sm);
    font-weight: 600;
    margin: 0 0 var(--v3-spacing-md) 0;
    color: var(--v3-text-dark);
}

.v3-product-print-colour .v3-print-slot-radios {
    margin-top: var(--v3-spacing-xs);
}

.v3-cart-print-meta,
.v3-order-print-meta {
    font-size: var(--v3-font-size-xs);
    color: var(--v3-text-medium);
    margin-top: 0.25rem;
}
