/* ==========================================================
   HIDE THEME DEFAULT TITLES & SPACING
========================================================== */
/* 1. Hide the "Welcome to the store!" and "My account" headers */
body.woocommerce-account .page-header,
body.woocommerce-account .entry-header {
    display: none !important;
}

/* 2. Remove the empty white space they leave behind so your custom layout touches the top */
body.woocommerce-account .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important; /* Forces the background to stretch edge-to-edge */
}

body.woocommerce-account .entry-content {
    margin-top: 0 !important;
}

body.woocommerce-account .marbo-auth-wrapper {
    margin-top: -20px; /* Pulls the layout up seamlessly against your navbar */
}

/* ==========================================================
   LUXURY ACCOUNT LOGIN & REGISTRATION PAGE STYLES
========================================================== */
.marbo-auth-wrapper { background: #fbfbfb; padding-bottom: 60px; font-family: 'Poppins', sans-serif; }
.woocommerce-account .woocommerce > h2 { display: none !important; } 

/* Hero & Dynamic Backgrounds */
.marbo-auth-hero { position: relative; display: flex; align-items: center; min-height: 85vh; padding: 60px 0; overflow: hidden; }
.marbo-auth-bg { 
    position: absolute; top: 0; right: 0; width: 70%; height: 100%; 
    background-image: var(--account-bg-desktop);
    background-size: cover; background-position: center; z-index: 0; 
}
.marbo-auth-bg::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, #fbfbfb 0%, rgba(251,251,251,0.95) 40%, rgba(251,251,251,0) 100%); }

/* Grid Layout */
.marbo-auth-container { position: relative; z-index: 1; max-width: 1300px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 0 40px; }

/* Left Column - Intro */
.marbo-auth-intro { margin-bottom: 40px; }
.marbo-auth-intro h1 { font-size: 48px; margin: 0 0 10px; font-weight: 400; color: #111; letter-spacing: -1px; transition: opacity 0.3s ease; }
.marbo-auth-intro p { color: #555; font-size: 16px; max-width: 85%; margin: 0; line-height: 1.5; transition: opacity 0.3s ease; }

/* White Auth Card Container */
.marbo-auth-card { background: #fff; padding: 45px; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.06); width: 100%; max-width: 480px; }
.marbo-auth-card > h2 { display: none !important; } /* Hide WooCommerce default headers inside the card */

/* Toggling Logic: Login vs Registration */
.marbo-auth-card .u-column2 { display: none; }
.marbo-auth-card .u-column1 { display: block; width: 100% !important; float: none !important; padding: 0 !important; }

.marbo-auth-card.show-register .u-column1 { display: none; }
.marbo-auth-card.show-register .u-column2 { display: block; width: 100% !important; float: none !important; padding: 0 !important; }

/* WooCommerce Form Overrides */
.marbo-auth-card form.login,
.marbo-auth-card form.register { border: none !important; padding: 0 !important; margin: 0 !important; }
.marbo-auth-card .form-row { margin-bottom: 20px; padding: 0; }
.marbo-auth-card label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; color: #111; }
.marbo-auth-card input[type="text"], 
.marbo-auth-card input[type="password"], 
.marbo-auth-card input[type="email"] { width: 100%; height: 50px; border: 1px solid #eaeaea; border-radius: 10px; padding: 0 15px; font-size: 14px; box-sizing: border-box; background: #fff; transition: border-color 0.3s; }
.marbo-auth-card input:focus { border-color: #111; outline: none; }
.marbo-auth-card .woocommerce-privacy-policy-text { font-size: 12px; color: #777; margin-bottom: 20px; line-height: 1.5; }

/* Inline Remember Me & Forgot Password */
.marbo-login-remember-forgot { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; margin-top: 10px; }
.marbo-login-remember-forgot label { display: flex; align-items: center; font-size: 13px; font-weight: 400; cursor: pointer; color: #111; margin: 0; }
.marbo-login-remember-forgot label input { margin-right: 8px; accent-color: #111; width: 16px; height: 16px; }
.marbo-login-remember-forgot .woocommerce-LostPassword { margin: 0; }
.marbo-login-remember-forgot .woocommerce-LostPassword a { font-size: 13px; color: #111; text-decoration: underline; font-weight: 500; }

/* Submit Buttons */
.marbo-auth-card button[type="submit"] { width: 100%; height: 52px; background: #000; color: #fff; border-radius: 30px; border: none; font-size: 16px; font-weight: 500; cursor: pointer; transition: background 0.3s ease; margin-top: 10px; }
.marbo-auth-card button[type="submit"]:hover { background: #333; }

/* Auth Toggle Text (Switching forms) */
.marbo-auth-toggle { text-align: center; margin-top: 25px; font-size: 14px; color: #666; }
.marbo-auth-toggle a { color: #a67c52; font-weight: 600; text-decoration: none; transition: color 0.3s; }
.marbo-auth-toggle a:hover { color: #111; }

/* Right Column - Marketing Content */
.marbo-auth-right { display: flex; align-items: center; padding-left: 20px; }
.marbo-marketing-text h2 { font-size: 42px; font-family: 'Times New Roman', Times, serif; font-weight: 400; color: #111; line-height: 1.15; margin-bottom: 15px; }
.marbo-marketing-text hr { width: 50px; border: 1px solid #a67c52; margin: 0 0 25px 0; }
.marbo-marketing-text p { font-size: 16px; color: #333; max-width: 320px; margin-bottom: 20px; line-height: 1.6; }
.marbo-stars { color: #cda776; font-size: 22px; letter-spacing: 2px; margin-bottom: 5px; }
.marbo-trust { font-size: 14px; font-weight: 500; color: #111; }

/* Bottom Trust Badges */
.marbo-auth-features { max-width: 1300px; margin: -40px auto 0; background: #fff; border-radius: 16px; display: flex; justify-content: space-between; padding: 35px 50px; box-shadow: 0 10px 40px rgba(0,0,0,0.04); position: relative; z-index: 2; gap: 20px; flex-wrap: wrap; }
.marbo-feature-box { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 220px; }
.marbo-feature-box .icon svg { width: 32px; height: 32px; opacity: 0.8; }
.marbo-feature-box .text strong { display: block; font-size: 15px; color: #111; margin-bottom: 4px; }
.marbo-feature-box .text span { display: block; font-size: 13px; color: #666; }

/* ==========================================================
   MOBILE RESPONSIVENESS & PADDING OPTIMIZATION
========================================================== */
@media screen and (max-width: 991px) {
    /* Layout Adjustments */
    .marbo-auth-container { grid-template-columns: 1fr; padding: 0 20px; gap: 0; }
    .marbo-auth-right { display: none; } /* Hide marketing text to save vertical space */
    
    /* Background adjustments for readability */
    .marbo-auth-bg { 
        width: 100%; 
        opacity: 0.2; /* Subtly overlays behind text */
        background-image: var(--account-bg-mobile); 
    }
    .marbo-auth-bg::after { background: linear-gradient(to bottom, #fbfbfb 0%, rgba(251,251,251,0.85) 50%, rgba(251,251,251,1) 100%); }

    /* Spacing & Typography */
    .marbo-auth-hero { min-height: auto; padding: 40px 0 20px; }
    .marbo-auth-intro { margin-bottom: 25px; text-align: center; }
    .marbo-auth-intro h1 { font-size: 32px; }
    .marbo-auth-intro p { font-size: 14px; max-width: 100%; margin: 0 auto; }
    
    /* Card Polish */
    .marbo-auth-card { padding: 30px 25px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); max-width: 100%; }
    
    /* Trust Badges Stacking */
    .marbo-auth-features { margin: 15px 15px 0; padding: 25px 20px; gap: 20px; flex-direction: column; }
    .marbo-feature-box { min-width: 100%; }
}



/* ==========================================================
   LOGGED-IN WOOCOMMERCE DASHBOARD LAYOUT
========================================================== */
/* Reset container for logged in view */
body.woocommerce-account.logged-in .marbo-auth-wrapper { display: none; } /* Hide login background if logged in */
body.woocommerce-account.logged-in .woocommerce { 
    display: flex; 
    align-items: flex-start; 
    gap: 40px; 
    max-width: 1300px; 
    margin: 60px auto; 
    padding: 0 20px; 
}

/* --- SIDEBAR NAVIGATION --- */
.woocommerce-MyAccount-navigation { width: 260px; flex-shrink: 0; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0 0 30px 0; }
.woocommerce-MyAccount-navigation ul li { margin-bottom: 5px; }
.woocommerce-MyAccount-navigation ul li a { 
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px; 
    color: #555; 
    text-decoration: none; 
    font-size: 15px; 
    font-weight: 500; 
    border-radius: 8px; 
    transition: all 0.2s ease; 
}
.woocommerce-MyAccount-navigation ul li a:hover { background: #f9f9f9; color: #111; }
.woocommerce-MyAccount-navigation ul li.is-active a { background: #f4f4f4; color: #111; font-weight: 600; }

/* Custom Profile Widget (Top of Nav) */
.marbo-sidebar-profile { display: flex; align-items: center; gap: 15px; padding: 20px; background: #fafafa; border-radius: 12px; margin-bottom: 25px; border: 1px solid #eaeaea; }
.profile-avatar img { border-radius: 50%; width: 45px; height: 45px; object-fit: cover; }
.profile-info strong { display: block; font-size: 15px; color: #111; }
.profile-info span { font-size: 12px; color: #666; word-break: break-all; }

/* Custom Help Widget (Bottom of Nav) */
.marbo-sidebar-help { background: #fafafa; padding: 20px; border-radius: 12px; border: 1px solid #eaeaea; }
.help-header { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.help-icon { background: #f0e6d2; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.help-header strong { display: block; font-size: 14px; color: #111; margin-bottom: 4px; }
.help-header span { font-size: 12px; color: #666; line-height: 1.4; display: block; }
.help-btn { display: block; text-align: center; background: #fff; border: 1px solid #ddd; padding: 10px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #111; text-decoration: none; transition: background 0.2s; }
.help-btn:hover { background: #f1f1f1; }

/* --- MAIN DASHBOARD CONTENT --- */
.woocommerce-MyAccount-content { flex-grow: 1; min-width: 0; }

/* Welcome Banner */
.marbo-dash-welcome { 
    background: #fbfbfb url('YOUR_BANNER_IMAGE_URL.jpg') no-repeat right center; /* Add background URL if desired */
    background-size: contain;
    padding: 40px; 
    border-radius: 16px; 
    margin-bottom: 30px; 
    border: 1px solid #eaeaea;
}
.dash-welcome-text { max-width: 60%; }
.dash-welcome-text h2 { font-size: 28px; margin: 0 0 10px; color: #111; }
.dash-welcome-text p { font-size: 14px; color: #555; line-height: 1.6; margin: 0; }

/* Top Stats Cards */
.marbo-dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; border: 1px solid #eaeaea; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.stat-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; color: #111; }
.stat-icon.icon-bag { background: #f9f2eb; }
.stat-icon.icon-truck { background: #f4f6f8; }
.stat-icon.icon-heart { background: #fdf3f3; }
.stat-icon.icon-map { background: #f5f3f0; }
.stat-data span { display: block; font-size: 13px; color: #666; margin-bottom: 5px; }
.stat-data strong { display: block; font-size: 24px; color: #111; line-height: 1; margin-bottom: 15px; }
.stat-link { font-size: 12px; color: #888; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.stat-link:hover { color: #111; }

/* Split Bottom Widgets */
.marbo-dash-split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.dash-widget { background: #fff; border: 1px solid #eaeaea; border-radius: 16px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); }
.widget-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 25px; }
.widget-header h3 { font-size: 18px; color: #111; margin: 0; }
.widget-header a { font-size: 13px; color: #555; text-decoration: none; font-weight: 500; }
.widget-header a:hover { color: #111; }

/* Empty State Handling */
.marbo-empty-state { text-align: center; padding: 30px 10px; }
.marbo-empty-state .empty-icon { font-size: 40px; margin-bottom: 15px; }
.marbo-empty-state p { font-size: 14px; color: #666; margin-bottom: 20px; }
.marbo-empty-state .empty-btn { display: inline-block; background: #111; color: #fff; padding: 10px 24px; border-radius: 30px; font-size: 13px; font-weight: 500; text-decoration: none; }

/* Recent Orders List */
.recent-order-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid #f0f0f0; text-decoration: none; transition: background 0.2s; }
.recent-order-row:last-child { border-bottom: none; padding-bottom: 0; }
.recent-order-row:hover { background: #fafafa; border-radius: 8px; padding-left: 10px; padding-right: 10px; margin: 0 -10px; }
.order-img { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: #f5f5f5; flex-shrink: 0; }
.order-img img { width: 100%; height: 100%; object-fit: cover; }
.order-meta { flex-grow: 1; padding: 0 15px; }
.order-meta strong { display: block; font-size: 14px; color: #111; margin-bottom: 4px; }
.order-meta span { display: block; font-size: 12px; color: #888; }
.order-status { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }
.order-status.status-processing { background: #fff5e5; color: #cc8500; }
.order-status.status-completed { background: #e6f6ec; color: #1b8a44; }
.order-status.status-cancelled { background: #fbebeb; color: #d32f2f; }
.order-total { text-align: right; margin-left: 15px; display: flex; align-items: center; gap: 10px; }
.order-total strong { font-size: 14px; color: #111; }
.order-total .arrow { color: #ccc; font-size: 16px; }

/* Account Details Summary */
.account-summary-list .summary-row { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px dashed #eaeaea; }
.account-summary-list .summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.summary-row .label { display: flex; align-items: center; gap: 10px; width: 140px; font-size: 14px; color: #555; flex-shrink: 0; }
.summary-row .label svg { color: #888; }
.summary-row .value { font-size: 14px; color: #111; font-weight: 500; word-break: break-all; }
.password-row .val-group { display: flex; justify-content: space-between; width: 100%; align-items: center; }
.password-row a { font-size: 13px; color: #555; text-decoration: none; font-weight: 500; }

/* --- MOBILE RESPONSIVENESS (STACKING) --- */
@media screen and (max-width: 991px) {
    body.woocommerce-account.logged-in .woocommerce { flex-direction: column; margin: 30px auto; gap: 30px; }
    
    /* Reorder to match mobile mockup: Profile -> Welcome -> Stats -> Sidebar Links */
    .woocommerce-MyAccount-navigation { width: 100%; display: flex; flex-direction: column; }
    .marbo-sidebar-profile { order: -2; margin-bottom: 20px; }
    .woocommerce-MyAccount-content { order: -1; width: 100%; margin-bottom: 20px; }
    
    /* Content Adjustments */
    .marbo-dash-welcome { padding: 30px 20px; background-size: cover; }
    .dash-welcome-text { max-width: 100%; text-align: center; }
    
    .marbo-dash-stats { grid-template-columns: 1fr 1fr; gap: 15px; }
    .marbo-dash-split { grid-template-columns: 1fr; gap: 20px; }
    
    .dash-widget { padding: 20px; }
    .account-summary-list .summary-row { flex-direction: column; align-items: flex-start; gap: 5px; }
    .summary-row .label { width: 100%; }
    .password-row .val-group { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ==========================================================
   WISHLIST BUTTON STYLES
========================================================== */
.marbo-wishlist-toggle {
    background: #fff;
    border: 1px solid #eaeaea;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.marbo-wishlist-toggle:hover {
    border-color: #111;
    transform: translateY(-2px);
}

.marbo-wishlist-toggle.in-wishlist {
    border-color: #111;
}

.marbo-wishlist-toggle svg {
    transition: fill 0.3s ease;
}

/* Little "pop" animation when clicked */
.marbo-wishlist-toggle:active svg {
    transform: scale(0.8);
}