/*
Theme Name: Ai Pet Memories Child
Template: astra
Version: 1.0.11
*/

/* ==========================================================================
   VARIABLES
   ========================================================================== */
:root {
    --color-primary: #334155;
    --color-primary-hover: #1e293b;
    --color-text-main: #1f2937;
    --color-text-subtle: #6b7280;
    --color-bg-main: #F8F9FA;
    --color-bg-card: #FFFFFF;
    --color-border: #e5e7eb;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   RESET
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main) !important;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-main);
    background: var(--color-bg-main) !important;
    margin: 0 !important;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* ==========================================================================
   HEADER
   ========================================================================== */
.apm-site-header {
    background: var(--color-bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.apm-header-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 120px;
}

.apm-site-logo img {
    height: 120px;
    width: auto;
    max-width: 280px;
    transition: transform 0.3s ease;
}

.apm-site-logo:hover img {
    transform: scale(1.02);
}

.apm-main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.apm-main-nav a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 15px;
}

.apm-main-nav a:not(.apm-cta-btn):hover {
    color: var(--color-primary);
}

.apm-cta-btn {
    background: var(--color-primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
}

.apm-cta-btn:hover {
    background: var(--color-primary-hover);
    transform: scale(1.05);
}

/* Mobile Menu Toggle */
.apm-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.apm-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.apm-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.apm-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.apm-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.apm-mobile-nav {
    display: none;
    position: absolute;
    top: 120px;
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.apm-mobile-nav.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.apm-mobile-nav a {
    color: var(--color-text-main);
    font-weight: 500;
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.apm-mobile-nav a:last-child {
    border-bottom: none;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.apm-main-content {
    min-height: 60vh;
    padding: 3rem 0;
}

.apm-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.apm-site-footer {
    background: var(--color-text-main);
    color: white;
    padding: 2.25rem 0 1rem;
    margin-top: 2.75rem;
}

.apm-footer-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 2rem;
}

.apm-footer-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) 1fr 1fr minmax(230px, 1.15fr);
    gap: 2.25rem;
    margin-bottom: 1.4rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.apm-footer-brand {
    max-width: 340px;
}

.apm-footer-col h4 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.apm-footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 0.9rem;
    filter: none;
}

.apm-footer-desc {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.55;
    margin-bottom: 1rem;
    font-size: 14px;
}

.apm-social-links {
    display: flex;
    gap: 0.6rem;
}

.apm-social-links a {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: all 0.2s ease;
}

.apm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.apm-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.apm-icon-social {
    width: 16px;
    height: 16px;
}

.apm-icon-inline {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.apm-social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.apm-footer-col ul {
    list-style: none;
}

.apm-footer-col ul li {
    margin-bottom: 0.55rem;
}

.apm-footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.apm-footer-col ul li a:hover {
    color: white;
}

.apm-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.apm-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.84);
    font-size: 14px;
}

.apm-badge i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    min-width: 20px;
}

.apm-contact-info p {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 14px;
}

.apm-contact-info i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    min-width: 16px;
}

.apm-contact-info {
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.apm-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 0.1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12.5px;
}

.apm-footer-bottom p {
    margin: 0;
}

.apm-payment-icons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-end;
}

.apm-payment-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    color: rgba(255, 255, 255, 0.84);
}

.apm-payment-logo i {
    display: block;
    font-size: 31px;
    line-height: 1;
}

.apm-payment-logo[aria-label="American Express"] i {
    font-size: 27px;
}

/* ==========================================================================
   HOW IT WORKS SECTION - CENTER JUSTIFIED
   ========================================================================== */
.apm-how-it-works {
    text-align: center;
}

.apm-how-it-works h2 {
    text-align: center;
}

.apm-how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.apm-how-it-works-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.apm-how-it-works-card h3 {
    text-align: center;
}

.apm-how-it-works-card p {
    text-align: center;
}

/* ==========================================================================
   HEART ICONS IN FOOTER
   ========================================================================== */
.apm-heart-icon {
    width: 20px;
    height: 20px;
    color: white;
    display: inline-block;
    flex-shrink: 0;
}

.apm-badge .apm-heart-icon {
    min-width: 20px;
}

.apm-badge .apm-heart-icon svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   FOOTER CONTACT & SOCIAL STYLING
   ========================================================================== */
.apm-contact-info p a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.apm-contact-info p a:hover {
    color: white;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .apm-main-nav {
        display: none;
    }
    
    .apm-menu-toggle {
        display: flex;
    }
    
    .apm-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 2rem;
    }
}

@media (max-width: 768px) {
    .apm-header-wrap {
        min-height: 64px;
        padding: 0.75rem 1rem;
    }
    
    .apm-site-logo img {
        height: 42px !important;
        max-width: 150px !important;
    }
    
    .apm-mobile-nav {
        top: 64px;
    }
    
    .apm-footer-wrap,
    .apm-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .apm-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }
    
    .apm-footer-bottom {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .apm-payment-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .apm-site-logo img {
        height: 36px !important;
        max-width: 132px !important;
    }
    
    .apm-header-wrap {
        min-height: 56px;
    }
    
    .apm-mobile-nav {
        top: 56px;
    }
}

/* Full-bleed glass header */
.apm-site-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    padding: 0 !important;
    background: transparent;
    box-shadow: none;
}

body.admin-bar .apm-site-header {
    top: 32px;
}

.apm-header-wrap {
    width: 100%;
    max-width: none;
    min-height: 72px !important;
    margin: 0;
    padding: 0 30px !important;
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(20px) saturate(170%);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
}

.apm-site-logo {
    display: flex;
    align-items: center;
    min-height: auto;
    flex: 0 0 auto;
    min-width: 0;
}

.apm-site-logo a {
    display: inline-flex;
    align-items: center;
}

.apm-site-logo img {
    height: 50px !important;
    width: auto;
    max-width: 100% !important;
    transform: none;
}

.apm-main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    line-height: 1;
    flex: 0 0 auto;
    margin-left: 26px;
    margin-right: auto;
}

.apm-main-nav a {
    color: rgba(27, 41, 65, 0.88);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.apm-main-nav a:hover {
    color: #102845;
}

.apm-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    margin-left: 18px;
}

.apm-cta-btn {
    padding: 0.78rem 1.34rem !important;
    min-height: 50px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(22, 37, 61, 0.12);
    background: linear-gradient(135deg, #173051 0%, #304a72 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 12px 28px rgba(23, 48, 81, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.apm-cta-btn:hover {
    background: linear-gradient(135deg, #112845 0%, #29405f 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(17, 40, 69, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.apm-currency-switcher {
    position: relative;
    flex: 0 0 auto;
}

.apm-currency-toggle {
    min-width: 76px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(23, 48, 81, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #173051;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.apm-currency-toggle:hover,
.apm-currency-toggle:focus {
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(82, 127, 178, 0.16), 0 10px 22px rgba(15, 23, 42, 0.1);
}

.apm-currency-current-symbol {
    color: #5d7697;
    font-weight: 900;
    letter-spacing: 0;
}

.apm-currency-chevron {
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(23, 48, 81, 0.62);
    border-bottom: 2px solid rgba(23, 48, 81, 0.62);
    transform: translateY(-1px) rotate(45deg);
    margin-left: 2px;
}

.apm-currency-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10020;
    min-width: 190px;
    padding: 6px;
    border: 1px solid rgba(23, 48, 81, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
}

.apm-currency-menu[hidden] {
    display: none;
}

.apm-currency-option {
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #173051;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    text-align: left;
}

.apm-currency-option-main {
    min-width: 34px;
    font-weight: 850;
}

.apm-currency-option-detail {
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}

.apm-currency-option:hover,
.apm-currency-option:focus,
.apm-currency-option.is-selected {
    background: #edf6ff;
    outline: none;
}

.apm-currency-option-symbol {
    margin-left: auto;
    color: #5d7697;
    font-weight: 800;
}

.apm-mobile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem;
}

.apm-mobile-actions .apm-cta-btn {
    flex: 1 1 auto;
    border-bottom: 0;
}

.apm-mobile-actions .apm-currency-menu {
    right: 0;
}

.apm-menu-toggle {
    display: none;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.68);
}

.apm-menu-toggle span {
    height: 2px;
    width: 18px;
    background: #102845;
}

.apm-mobile-nav {
    top: 72px;
    left: 12px;
    right: 12px;
    padding: 1rem 1rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

@media screen and (max-width: 782px) {
    body.admin-bar .apm-site-header {
        top: 46px;
    }
}

@media (max-width: 1180px) {
    .apm-header-wrap {
        padding: 0 22px !important;
        gap: 16px;
    }

    .apm-site-logo img {
        height: 48px !important;
    }

    .apm-main-nav {
        gap: 18px;
        margin-left: 18px;
    }

    .apm-main-nav a {
        font-size: 13px;
    }

    .apm-cta-btn {
        padding: 0.72rem 1.12rem !important;
        font-size: 13px;
        min-height: 48px;
    }
}

@media (max-width: 1024px) {
    .apm-main-nav,
    .apm-header-actions {
        display: none;
    }

    .apm-menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .apm-header-wrap {
        min-height: 68px !important;
        padding: 0 18px !important;
    }

    .apm-site-logo {
        flex: 0 1 auto;
    }

    .apm-site-logo img {
        height: 44px !important;
    }

    .apm-mobile-nav {
        top: 72px;
    }
}

@media (max-width: 768px) {
    .apm-header-wrap {
        min-height: 64px !important;
        padding: 0 14px !important;
    }

    .apm-site-logo img {
        height: 40px !important;
    }

    .apm-mobile-nav {
        top: 68px;
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .apm-header-wrap {
        min-height: 58px !important;
        padding: 0 12px !important;
    }

    .apm-site-logo img {
        height: 36px !important;
    }

    .apm-mobile-nav {
        top: 62px;
        left: 8px;
        right: 8px;
    }
}

.apm-main-content {
    padding-top: 0.45rem !important;
}
/* Fix content centering */
.apm-container {
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Ensure sections span full width and center their content */
section {
    width: 100%;
}

section > div:first-child {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Fix grid centering */
div[style*="display: grid"] {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Fix flex centering */
div[style*="display: flex; justify-content: center"] {
    margin-left: auto !important;
    margin-right: auto !important;
}
/* Fix container width and centering */
.apm-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

/* Ensure all direct section children are full width */
.apm-container > section {
    width: 100% !important;
}

/* Override any Astra floats */
.apm-container,
.apm-main-content {
    clear: both !important;
    float: none !important;
}

/* Fix flex centering for all flex containers */
div[style*="display: flex; justify-content: center"] {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.apm-footer-compact {
    display: none;
}

/* ==========================================================================
   MOBILE HEADER AND FOOTER REFINEMENTS
   ========================================================================== */
@media screen and (max-width: 782px) {
    html {
        margin-top: 0 !important;
    }

    body.admin-bar {
        margin-top: 0 !important;
    }

    body.admin-bar .apm-site-header {
        top: 0 !important;
    }
}

@media (max-width: 768px) {
    .apm-site-header,
    body.admin-bar .apm-site-header {
        top: 0 !important;
    }

    .apm-site-footer {
        padding: 1rem 0 0.75rem;
        margin-top: 1.35rem;
    }

    .apm-footer-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .apm-footer-grid {
        display: block;
        margin-bottom: 0.7rem;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .apm-footer-col:not(.apm-footer-brand) {
        display: none;
    }

    .apm-footer-brand {
        max-width: none;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.3rem 0.8rem;
        align-items: center;
    }

    .apm-footer-logo {
        height: 34px;
        margin-bottom: 0;
        grid-row: span 2;
    }

    .apm-footer-desc {
        margin-bottom: 0;
        font-size: 12px;
        line-height: 1.45;
    }

    .apm-social-links {
        display: none;
    }

    .apm-footer-compact {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.45rem 0.8rem;
        padding: 0.78rem 0;
        margin-top: 0.7rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .apm-footer-compact a {
        color: rgba(255, 255, 255, 0.76);
        font-size: 12px;
        line-height: 1.3;
    }

    .apm-footer-compact a:hover {
        color: #ffffff;
    }

    .apm-footer-bottom {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.7rem;
        padding-top: 0.75rem;
        text-align: left;
    }

    .apm-footer-bottom p {
        font-size: 11.5px;
    }

    .apm-payment-icons {
        justify-content: flex-end;
        gap: 0.55rem;
    }

    .apm-payment-logo i {
        font-size: 24px;
    }

    .apm-payment-logo[aria-label="American Express"] i {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .apm-site-header,
    body.admin-bar .apm-site-header {
        top: 0 !important;
    }

    .apm-footer-wrap {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .apm-footer-desc {
        font-size: 11.5px;
    }

    .apm-footer-compact {
        gap: 0.35rem 0.65rem;
        padding: 0.68rem 0;
    }

    .apm-footer-compact a,
    .apm-footer-bottom p {
        font-size: 11px;
    }

    .apm-payment-icons {
        width: 100%;
        justify-content: flex-start;
    }

    .apm-payment-logo i {
        font-size: 22px;
    }

    .apm-payment-logo[aria-label="American Express"] i {
        font-size: 19px;
    }
}
