/*
Theme Name: PhotoFocus Pro Mobile
Template: photofocus-pro
Description: Lightweight mobile-optimized theme for JonSwan Productions
Author: Jonathan Swanson
Version: 1.0
*/

/* Mobile-First Base Styles */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

/* Smooth scrolling on iOS */
body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: none;
    width: 100%;
    min-height: 100dvh;
    min-height: 100vh; /* fallback for older browsers */
}

/* Allow scrolling within content area only */
.site-content,
.mobile-nav.active {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Fix for content area */
#page {
    min-height: 100dvh;
    min-height: 100vh; /* fallback */
}








/* Hide desktop-only elements */
.desktop-only {
    display: none !important;
}

/* Container */
.site-content {
    padding: 10px;
}

/* Touch-friendly spacing */
a, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Images responsive by default */
img {
    max-width: 100%;
    height: auto;
}

/* Site Header with Full-Width Logo and Menu Bar */
.site-header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}


/* Compact header - just the menu bar */
.site-header-compact {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header-compact .mobile-menu-bar {
    border-top: none;
}









/* Logo Section */
.site-logo-link {
    display: block;
    padding: 15px;
    text-align: center;
}

.site-logo {
    max-width: 90%;
    height: auto;
    max-height: 70px;
}

/* Menu Bar Below Logo */
.mobile-menu-bar {
    width: 100%;
    background: linear-gradient(135deg, #3d2b7a 0%, #2e1f5e 100%);
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.mobile-menu-bar:active {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

.menu-icon {
    font-size: 20px;
}

.menu-text {
    letter-spacing: 2px;
}








/* Mobile Navigation */
/* Update these sections in your style.css */




/* Mobile Navigation - Default (will be overridden by body classes) */
.mobile-nav {
    position: fixed;
    top: 135px;  /* Default for homepage */
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(0,0,0,0.95);
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 999;
    padding: 0;
}

.mobile-nav.active {
    height: calc(100vh - 135px); /* fallback */
    height: calc(100dvh - 135px);
    padding: 70px 20px 40px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Close button - hidden by default */
.mobile-nav::before {
    content: '✕ CLOSE';
    display: none;
    position: fixed;
    top: 135px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #3d2b7a 0%, #2e1f5e 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    z-index: 1000;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 16px;
}

/* Homepage - menu below logo */
.home .mobile-nav {
    top: 135px;
}

.home .mobile-nav.active {
    height: calc(100vh - 135px); /* fallback */
    height: calc(100dvh - 135px);
    padding: 70px 20px 40px 20px;
}

.home .mobile-nav.active::before {
    display: block;
    top: 135px;
}

/* Non-homepage - menu at top */
body:not(.home) .mobile-nav {
    top: 0 !important;
}

body:not(.home) .mobile-nav.active {
    height: 100vh !important; /* fallback */
    height: 100dvh !important;
    padding: 60px 20px 40px 20px !important;
}

body:not(.home) .mobile-nav.active::before {
    display: block !important;
    top: 0 !important;
}

/* Hide menu bar when menu is open (both homepage and compact pages) */
.mobile-menu-bar {
    transition: opacity 0.3s ease;
}

body:has(.mobile-nav.active) .mobile-menu-bar {
    opacity: 0;
    pointer-events: none;
}

/* Menu Items */
.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu-list a,
.mobile-nav-menu a,
.mobile-nav ul li a {
    display: block;
    color: white !important;
    text-decoration: none;
    padding: 11px 20px;
    font-size: 17px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-menu,
.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li,
.mobile-nav ul li {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Scroll indicator when menu has more items below */
.mobile-nav.active::after {
    content: '▼ scroll ▼';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    letter-spacing: 2px;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    pointer-events: none;
    z-index: 1001;
}

.mobile-menu-list a:hover,
.mobile-menu-list a:active {
    background: rgba(102, 126, 234, 0.3);
    padding-left: 30px;
}

/* Submenus */
.mobile-nav .sub-menu {
    display: none;
    padding-left: 20px;
    background: rgba(255,255,255,0.05);
}

.mobile-nav .sub-menu.open {
    display: block;
}

.submenu-toggle {
    float: right;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.3s;
}

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























/* Post Cards - Mobile Optimized */
.post {
    background: white;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-thumbnail.featured-large {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.post-thumbnail.featured-large img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.post-content {
    padding: 15px;
}

.entry-title {
    font-size: 1.3em;
    margin: 0 0 10px 0;
}

.entry-title a {
    color: #333;
    text-decoration: none;
}

.entry-meta {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.entry-summary {
    color: #555;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    padding: 30px 15px;
    text-align: center;
    margin-top: 40px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* PMPro Checkout - Password Eye Toggle Inside Input */
.pmpro_form_field-password {
    position: relative;
}

.pmpro_form_field-password .pmpro_form_input-password {
    padding-right: 48px;
}

.pmpro_form_field-password .pmpro_form_field-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-20%);
}

.pmpro_form_field-password .pmpro_btn-password-toggle {
    background: none !important;
    border: none !important;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    box-shadow: none !important;
}

.pmpro_form_field-password .pmpro_btn-password-toggle:hover,
.pmpro_form_field-password .pmpro_btn-password-toggle:focus {
    opacity: 1;
    background: none !important;
}

.pmpro_form_field-password .pmpro_icon-eye svg {
    width: 40px;
    height: 40px;
}

.pmpro_form_field-password .pmpro_form_field-password-toggle-state {
    display: none;
}

/* PMPro Checkout - Group Code Apply Button */
.pmpro_checkout-field-group_code .pmpro_form_fields-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.pmpro_checkout-field-group_code .pmpro_form_fields-inline input[type="text"] {
    width: 100%;
}

.pmpro_checkout-field-group_code .pmpro_form_fields-inline input[type="button"] {
    width: auto;
    min-width: 140px;
    white-space: nowrap;
}

/* ============================================
   PMPro Checkout - Green Theme Overrides
   ============================================ */

/* Override PMPro CSS Variables */
.pmpro,
.pmpro-checkout {
    --pmpro--color--accent: #10b981;
    --pmpro--color--accent--variation: #059669;
    --pmpro--base--border-radius: 12px;
}

/* Cards */
.pmpro .pmpro_card {
    border: none;
    border-top: 4px solid #10b981;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin: 20px 0;
    overflow: visible;
}

.pmpro .pmpro_card_content {
    padding: 24px 20px;
}

/* Card Title & Section Headings */
.pmpro .pmpro_card_title,
.pmpro .pmpro_form_heading {
    color: #1f2937;
    font-size: 1.4em;
    font-weight: 700;
    padding: 20px 20px 0;
    margin: 0;
}

.pmpro .pmpro_form_heading {
    padding: 0;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #10b981;
}

/* Fieldsets - reset default browser padding */
.pmpro .pmpro_form_fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

/* Form Labels */
.pmpro .pmpro_form_label {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 6px;
}

/* Form Inputs */
.pmpro .pmpro_form_input {
    border: 2px solid #d1d5db;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 16px;
    color: #1f2937;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pmpro .pmpro_form_input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    outline: none;
}

/* Stack two-column layouts on mobile */
.pmpro .pmpro_cols-2 {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Form Fields spacing */
.pmpro .pmpro_form_field {
    margin-bottom: 18px;
}

/* Buttons - Green Gradient */
.pmpro .pmpro_btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 28px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    cursor: pointer;
    text-decoration: none;
}

.pmpro .pmpro_btn:hover,
.pmpro .pmpro_btn:focus {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
    color: white;
}

/* Submit Button - larger and centered */
.pmpro .pmpro_form_submit {
    justify-content: center;
    margin-top: 24px;
    padding: 0 20px;
}

.pmpro .pmpro_btn-submit-checkout {
    width: 100%;
    max-width: 320px;
    padding: 16px 32px;
    font-size: 1.1em;
    border: 2px solid white;
}

/* PayPal submit button */
.pmpro .pmpro_btn-submit-checkout-paypal {
    width: 100%;
    max-width: 320px;
    background: #ffc439;
    border: none;
    color: #111;
}

.pmpro .pmpro_btn-submit-checkout-paypal:hover {
    background: #f0b430;
    color: #111;
}

/* Level Description - styled list */
.pmpro .pmpro_level_description_text {
    color: #4b5563;
    line-height: 1.7;
    font-size: 1em;
}

.pmpro .pmpro_level_description_text ul {
    list-style: none;
    padding-left: 0;
    margin: 16px 0;
}

.pmpro .pmpro_level_description_text li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    line-height: 1.6;
    color: #4b5563;
}

.pmpro .pmpro_level_description_text li::before {
    content: '\2714';
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    font-weight: 700;
}

/* Level Name */
.pmpro .pmpro_level_name_text {
    font-size: 1.05em;
    color: #1f2937;
    line-height: 1.6;
}

/* Level Cost */
.pmpro .pmpro_level_cost_text {
    font-size: 1.05em;
    color: #1f2937;
    line-height: 1.6;
}

.pmpro .pmpro_level_cost_text strong {
    color: #059669;
}

/* Card Actions (login link) */
.pmpro .pmpro_card_actions {
    background: #f9fafb;
    padding: 16px 20px;
    text-align: center;
    font-size: 0.95em;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
}

.pmpro .pmpro_card_actions a {
    color: #10b981;
    font-weight: 600;
    text-decoration: none;
}

.pmpro .pmpro_card_actions a:hover {
    color: #059669;
    text-decoration: underline;
}

/* Payment Method Radio Buttons */
.pmpro .pmpro_form_field-radio-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.3s ease;
}

.pmpro .pmpro_form_field-radio-item:has(input:checked) {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.pmpro .pmpro_form_input-radio {
    accent-color: #10b981;
}

/* Checkbox */
.pmpro .pmpro_form_input-checkbox {
    accent-color: #10b981;
}

/* Password Strength Indicator */
.pmpro .pmpro_form-strong-password-indicator {
    border-radius: 6px;
    overflow: hidden;
    margin-top: 8px;
}

/* Hint Text */
.pmpro .pmpro_form_hint {
    color: #9ca3af;
    font-size: 0.85em;
    line-height: 1.5;
    margin-top: 6px;
}

/* Messages */
.pmpro .pmpro_message {
    border-radius: 10px;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.95em;
}

/* Donation field */
.pmpro .pmpro_form_field-donation .pmpro_form_fields-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Fix anchor/button min-height from mobile theme base */
.pmpro label,
.pmpro .pmpro_form_label,
.pmpro .pmpro_form_label-inline,
.pmpro legend,
.pmpro .pmpro_card_actions,
.pmpro .pmpro_card_actions a,
.pmpro p,
.pmpro span,
.pmpro div {
    min-height: unset;
    min-width: unset;
    display: revert;
}

.pmpro .pmpro_form_field-radio-item label {
    display: inline;
}

.pmpro .pmpro_btn,
.pmpro a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* PMPro level select buttons on homepage CTA */
.membership-cta .pmpro .pmpro_btn,
.membership-cta .pmpro a.pmpro_btn,
.membership-cta .pmpro .pmpro_advanced_levels_button a,
.membership-cta .pmpro_advanced_levels_button a {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: 2px solid white !important;
    border-radius: 25px;
    padding: 12px 28px;
    font-weight: 600;
    text-decoration: none;
}

.membership-cta .pmpro a,
.membership-cta .pmpro_advanced_levels_button a {
    color: white !important;
}

/* Shrink product titles on shop/store/category listings (mobile) */
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.wp-block-woocommerce-all-products .wc-block-grid__product-title,
.wc-block-grid__product-title,
.wp-block-post-title {
  font-size: 1em !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
  margin-top: 6px !important;
  margin-bottom: 4px !important;
}

/* Force store grid product images to crop (not stretch) when source aspect ratio
   doesn't match the rendered square dimensions. */
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product img.wp-post-image,
.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  object-fit: cover !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
}

/* "3-PHOTO SERIES" badge overlay on store loop cards only (mobile) */
.woocommerce ul.products li.product.product_tag-photo-series {
  position: relative;
}
.woocommerce ul.products li.product.product_tag-photo-series::before {
  content: "3-PHOTO SERIES";
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 4px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* 4-photo series badge override (uses photo-series-4 tag) */
.woocommerce ul.products li.product.product_tag-photo-series-4::before {
  content: "4-PHOTO SERIES";
}

/* Product gallery (mobile) — force visible, distribute thumbs evenly */
.woocommerce-product-gallery {
  opacity: 1 !important;
  max-width: 100%;
}
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs {
  display: flex !important;
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 10px;
  list-style: none;
  padding: 0;
  max-width: 100%;
}
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
}
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.6;
}
.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
  opacity: 1;
}
/* ---------------------------------------------------------------
   Search inside the mobile slide-down menu
   The mobile header has no search control of its own, so the field
   lives at the top of the nav panel. 16px font-size on the input is
   deliberate: anything smaller makes iOS zoom the page on focus.
   --------------------------------------------------------------- */
.mobile-nav-search {
    display: flex;
    gap: 8px;
    margin: 10px 0 18px 0;
}

.mobile-nav-search__field {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 24px;
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-nav-search__field::placeholder {
    color: rgba(255,255,255,0.60);
}

.mobile-nav-search__field:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(255,255,255,0.16);
}

.mobile-nav-search__submit {
    flex: 0 0 auto;
    height: 46px;
    padding: 0 22px;
    border: none;
    border-radius: 24px;
    background: #059669;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.mobile-nav-search__submit:active {
    background: #047857;
}

/* ---------------------------------------------------------------
   FIX: the mobile menu could not be closed.
   The visible "✕ CLOSE" bar was a ::before pseudo-element, which
   can never receive a click handler, and the MENU button is given
   pointer-events:none while the nav is open. The real .mobile-nav-close
   button (which does carry the correct onclick) was hidden inline.
   So: retire the pseudo-element and promote the real button into
   the bar it was pretending to be.
   --------------------------------------------------------------- */
.home .mobile-nav.active::before,
body:not(.home) .mobile-nav.active::before {
    display: none !important;
}

.mobile-nav-close {
    display: none;
}

.mobile-nav.active .mobile-nav-close {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    background: linear-gradient(135deg, #3d2b7a 0%, #2e1f5e 100%);
    color: #fff;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    cursor: pointer;
    z-index: 1001;
    -webkit-appearance: none;
    appearance: none;
}

/* Homepage keeps the header logo visible, so the bar sits below it. */
.home .mobile-nav.active .mobile-nav-close {
    top: 135px;
}

body:not(.home) .mobile-nav.active .mobile-nav-close {
    top: 0;
}

.mobile-nav-close:active {
    background: linear-gradient(135deg, #33236a 0%, #251a4e 100%);
}

/* Safety net: if anything ever hides the close bar again, the MENU
   button stays usable as a toggle rather than going dead. */
body:has(.mobile-nav.active) .mobile-menu-bar {
    pointer-events: auto;
}
