/**
 * Albasy Marketplace - Frontend Styles
 * @version 1.0.0
 */

/* ═══ CSS Variables ═══ */
:root {
    --ape-navy: #1a2744;
    --ape-navy-light: #243352;
    --ape-navy-dark: #111b2e;
    --ape-gold: #c7944a;
    --ape-gold-light: #d4a863;
    --ape-gold-dark: #b07e35;
    --ape-silver: #a0b0c0;
    --ape-bg: #f4f6f9;
    --ape-border: #e2e8f0;
    --ape-text: #1a2744;
    --ape-text-light: #5a6a7a;
    --ape-text-muted: #8a9aaa;
    --ape-radius-sm: 8px;
    --ape-radius-md: 12px;
    --ape-radius-lg: 16px;
    --ape-radius-xl: 20px;
    --ape-radius-full: 50px;
    --ape-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ape-topbar-h: 64px;
    --ape-bottombar-h: 64px;
}

/* ═══ Body Padding ═══ */
body {
    padding-top: var(--ape-topbar-h) !important;
    background: var(--ape-bg);
}
body.admin-bar {
    padding-top: calc(var(--ape-topbar-h) + 32px) !important;
}
@media (max-width: 767px) {
    body {
        padding-bottom: var(--ape-bottombar-h) !important;
    }
    body.admin-bar {
        padding-top: calc(var(--ape-topbar-h) + 46px) !important;
    }
}

/* ═══ Animations ═══ */
@keyframes apeFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes apeSlideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes apeSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes apeScaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes apeBadgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
@keyframes apeHeartPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}
@keyframes apeSpin {
    to { transform: rotate(360deg); }
}
@keyframes apeToastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes apeToastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes apeShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes apeRemove {
    0% { transform: translateX(0); opacity: 1; max-height: 200px; }
    50% { transform: translateX(-30px); opacity: 0; }
    100% { transform: translateX(-30px); opacity: 0; max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══ Focus Visible ═══ */
*:focus-visible {
    outline: 2px solid var(--ape-gold);
    outline-offset: 2px;
}

/* ═══ TOPBAR ═══ */
.ape-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ape-topbar-h);
    background: var(--ape-navy);
    z-index: 999999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
body.admin-bar .ape-topbar {
    top: 32px;
}
@media (max-width: 782px) {
    body.admin-bar .ape-topbar {
        top: 46px;
    }
}
.ape-topbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

/* Logo */
.ape-topbar-logo {
    flex-shrink: 0;
    min-width: 40px;
    max-width: 180px;
}
.ape-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}
.ape-logo-img {
    height: 38px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}
.ape-logo-svg {
    height: 36px;
    width: 144px;
    display: block;
    flex-shrink: 0;
}
@media (max-width: 767px) {
    .ape-topbar-logo {
        min-width: 36px;
        max-width: 120px;
    }
    .ape-logo-img {
        height: 32px;
        max-width: 120px;
    }
    .ape-logo-svg {
        height: 30px;
        width: 120px;
    }
}

/* Search */
.ape-topbar-search {
    flex: 1;
    min-width: 0;
    max-width: 600px;
    margin: 0 auto;
}
.ape-search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
    height: 40px;
}
.ape-search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 42px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 0 var(--ape-radius-full) var(--ape-radius-full) 0;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: var(--ape-transition);
}
.ape-search-input::placeholder {
    color: var(--ape-silver);
}
.ape-search-input:focus {
    border-color: var(--ape-gold);
    background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(199,148,74,0.2);
}
.ape-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ape-silver);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}
.ape-search-spinner {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ape-gold);
    font-size: 14px;
    z-index: 2;
}
.ape-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ape-silver);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    z-index: 2;
}
.ape-search-clear:hover {
    color: #fff;
}

/* Search Results Dropdown */
.ape-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--ape-radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    max-height: 480px;
    overflow-y: auto;
    animation: apeSlideDown 0.2s ease;
    z-index: 1000000;
}
.ape-search-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--ape-border);
}
.ape-search-section:last-of-type {
    border-bottom: none;
}
.ape-search-section-title {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ape-text-muted);
}
.ape-search-section-title i {
    margin-right: 6px;
}
.ape-search-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--ape-text);
    transition: var(--ape-transition);
    gap: 12px;
}
.ape-search-item:hover,
.ape-search-item.ape-search-active {
    background: var(--ape-bg);
}
.ape-search-item-img {
    width: 44px;
    height: 44px;
    border-radius: var(--ape-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.ape-search-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--ape-radius-full);
    object-fit: cover;
    flex-shrink: 0;
}
.ape-search-item-info {
    flex: 1;
    min-width: 0;
}
.ape-search-item-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ape-search-item-store,
.ape-search-item-meta {
    display: block;
    font-size: 12px;
    color: var(--ape-text-muted);
    margin-top: 2px;
}
.ape-search-item-store i {
    margin-right: 4px;
    font-size: 10px;
}
.ape-search-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--ape-gold-dark);
    flex-shrink: 0;
}
.ape-search-all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: var(--ape-gold-dark);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    border-top: 1px solid var(--ape-border);
    transition: var(--ape-transition);
}
.ape-search-all:hover {
    background: var(--ape-bg);
}
.ape-search-all i {
    margin-left: 6px;
}
.ape-search-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--ape-text-muted);
}
.ape-search-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}
.ape-search-empty p {
    margin: 0;
    font-size: 14px;
}
mark.ape-highlight {
    background: rgba(199,148,74,0.2);
    color: var(--ape-navy);
    padding: 0 2px;
    border-radius: 2px;
}

/* Topbar Actions */
.ape-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ape-topbar-action {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--ape-radius-full);
    color: #fff;
    text-decoration: none;
    transition: var(--ape-transition);
    cursor: pointer;
    border: none;
    background: none;
    font-size: 18px;
}
.ape-topbar-action:hover {
    background: rgba(255,255,255,0.1);
    color: var(--ape-gold);
}

/* Badge */
.ape-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--ape-gold);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--ape-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.ape-badge.ape-badge-pop {
    animation: apeBadgePop 0.3s ease;
}

/* User Avatar */
.ape-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--ape-radius-full);
    object-fit: cover;
    border: 2px solid var(--ape-gold);
}
.ape-user-trigger {
    position: relative;
}

/* User Dropdown */
.ape-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: #fff;
    border-radius: var(--ape-radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    padding: 8px 0;
    animation: apeSlideDown 0.2s ease;
    z-index: 100;
}
.ape-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--ape-text);
    text-decoration: none;
    font-size: 14px;
    transition: var(--ape-transition);
}
.ape-user-dropdown a:hover {
    background: var(--ape-bg);
}
.ape-user-dropdown a i {
    width: 18px;
    text-align: center;
    color: var(--ape-text-muted);
}
.ape-user-dropdown a.ape-logout {
    color: #ef4444;
    border-top: 1px solid var(--ape-border);
    margin-top: 4px;
    padding-top: 12px;
}
.ape-user-dropdown a.ape-logout i {
    color: #ef4444;
}

/* Mini Cart */
.ape-cart-trigger {
    position: relative;
}
.ape-minicart-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: #fff;
    border-radius: var(--ape-radius-md);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    animation: apeSlideDown 0.2s ease;
    z-index: 100;
    max-height: 480px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ape-minicart-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ape-border);
    color: var(--ape-navy);
    font-size: 15px;
}
.ape-minicart-body {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
}
.ape-minicart-items {
    padding: 8px 0;
}
.ape-minicart-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 10px;
    transition: var(--ape-transition);
}
.ape-minicart-item:hover {
    background: var(--ape-bg);
}
.ape-minicart-item-img {
    flex-shrink: 0;
}
.ape-minicart-item-img img {
    width: 50px;
    height: 50px;
    border-radius: var(--ape-radius-sm);
    object-fit: cover;
}
.ape-minicart-item-info {
    flex: 1;
    min-width: 0;
}
.ape-minicart-item-name {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ape-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ape-minicart-item-meta {
    display: block;
    font-size: 12px;
    color: var(--ape-text-muted);
    margin-top: 2px;
}
.ape-minicart-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--ape-text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: var(--ape-transition);
}
.ape-minicart-remove:hover {
    color: #ef4444;
}
.ape-minicart-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--ape-text-muted);
}
.ape-minicart-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}
.ape-minicart-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--ape-border);
    background: var(--ape-bg);
}
.ape-minicart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--ape-text);
}
.ape-minicart-actions {
    display: flex;
    gap: 8px;
}
.ape-minicart-actions .ape-btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
}

/* ═══ BOTTOMBAR ═══ */
.ape-bottombar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--ape-bottombar-h);
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    display: none;
    z-index: 999999;
}
@media (max-width: 767px) {
    .ape-bottombar {
        display: flex;
    }
    .ape-topbar-actions {
        display: none;
    }
}
.ape-bottombar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ape-text-muted);
    font-size: 10px;
    gap: 3px;
    position: relative;
    transition: var(--ape-transition);
}
.ape-bottombar-item i {
    font-size: 20px;
}
.ape-bottombar-item.active {
    color: var(--ape-gold);
}
.ape-bottombar-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    background: var(--ape-gold);
    border-radius: 0 0 3px 3px;
}
.ape-bottombar-item .ape-badge {
    top: 6px;
    right: calc(50% - 18px);
    font-size: 9px;
    min-width: 16px;
    height: 16px;
}

/* ═══ Overlay ═══ */
.ape-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999998;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.ape-overlay.active {
    display: block;
    opacity: 1;
}

/* ═══ Toast Notifications ═══ */
.ape-toast-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}
@media (max-width: 767px) {
    .ape-toast-container {
        bottom: calc(var(--ape-bottombar-h) + 16px);
        right: 16px;
        left: 16px;
    }
}
.ape-toast {
    padding: 12px 20px;
    border-radius: var(--ape-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    animation: apeToastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ape-toast.removing {
    animation: apeToastOut 0.3s ease forwards;
}
.ape-toast.success {
    background: #22c55e;
}
.ape-toast.error {
    background: #ef4444;
}
.ape-toast.info {
    background: var(--ape-navy);
}

/* ═══ Buttons ═══ */
.ape-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--ape-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--ape-transition);
    line-height: 1.4;
}
.ape-btn-primary {
    background: linear-gradient(135deg, var(--ape-gold), var(--ape-gold-dark));
    color: #fff;
    box-shadow: 0 4px 12px rgba(199,148,74,0.3);
}
.ape-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(199,148,74,0.4);
}
.ape-btn-outline {
    background: transparent;
    color: var(--ape-navy);
    border: 2px solid var(--ape-border);
}
.ape-btn-outline:hover {
    border-color: var(--ape-gold);
    color: var(--ape-gold);
}
.ape-btn-danger {
    background: #ef4444;
    color: #fff;
}
.ape-btn-danger:hover {
    background: #dc2626;
}
.ape-btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}
.ape-btn-block {
    width: 100%;
    text-align: center;
}

/* Product Action Buttons */
.ape-product-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.ape-btn-circle {
    width: 38px;
    height: 38px;
    border-radius: var(--ape-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ape-border);
    background: #fff;
    cursor: pointer;
    transition: var(--ape-transition);
    font-size: 14px;
    color: var(--ape-text);
}
.ape-btn-circle:hover {
    border-color: var(--ape-gold);
    color: var(--ape-gold);
}
.ape-btn-circle.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.ape-btn-cart.ape-loading {
    pointer-events: none;
}
.ape-btn-cart.ape-loading i::before {
    content: "\f110";
    animation: apeSpin 1s linear infinite;
}
.ape-btn-cart.ape-added {
    background: var(--ape-gold);
    border-color: var(--ape-gold);
    color: #fff;
}
.ape-btn-fav.active {
    color: #ef4444;
    border-color: #ef4444;
}
.ape-btn-fav.active i {
    animation: apeHeartPop 0.4s ease;
}

/* ═══ Pages ═══ */
.ape-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
}
.ape-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ape-navy);
    margin-bottom: 24px;
}
.ape-page-title i {
    margin-right: 8px;
    color: var(--ape-gold);
}

/* Empty State */
.ape-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ape-text-muted);
}
.ape-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--ape-silver);
}
.ape-empty-state h2 {
    font-size: 20px;
    color: var(--ape-text);
    margin: 0 0 8px;
}
.ape-empty-state p {
    margin: 0 0 20px;
    font-size: 14px;
}

/* ═══ Cart Page ═══ */
.ape-cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
@media (max-width: 900px) {
    .ape-cart-grid {
        grid-template-columns: 1fr;
    }
}
.ape-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--ape-border);
    border-radius: var(--ape-radius-md);
    overflow: hidden;
}
.ape-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    animation: apeSlideUp 0.3s ease both;
}
.ape-cart-item.ape-removing {
    animation: apeRemove 0.4s ease forwards;
}
.ape-cart-item-img img {
    width: 100px;
    height: 100px;
    border-radius: var(--ape-radius-sm);
    object-fit: cover;
}
.ape-cart-item-details {
    flex: 1;
    min-width: 0;
}
.ape-cart-item-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ape-text);
    text-decoration: none;
    margin-bottom: 4px;
}
.ape-cart-item-name:hover {
    color: var(--ape-gold);
}
.ape-cart-item-store {
    display: block;
    font-size: 12px;
    color: var(--ape-text-muted);
    margin-bottom: 4px;
}
.ape-cart-item-store i {
    margin-right: 4px;
}
.ape-cart-item-price {
    font-size: 14px;
    color: var(--ape-text-light);
}
.ape-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.ape-qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ape-border);
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--ape-text);
    transition: var(--ape-transition);
}
.ape-qty-btn:first-child {
    border-radius: var(--ape-radius-sm) 0 0 var(--ape-radius-sm);
}
.ape-qty-btn:last-child {
    border-radius: 0 var(--ape-radius-sm) var(--ape-radius-sm) 0;
}
.ape-qty-btn:hover {
    border-color: var(--ape-gold);
    color: var(--ape-gold);
}
.ape-qty-value {
    width: 40px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid var(--ape-border);
    border-bottom: 2px solid var(--ape-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--ape-text);
}
.ape-cart-item-subtotal {
    font-size: 15px;
    font-weight: 700;
    color: var(--ape-gold-dark);
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}
.ape-cart-item-remove {
    background: none;
    border: none;
    color: var(--ape-text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: var(--ape-transition);
    flex-shrink: 0;
}
.ape-cart-item-remove:hover {
    color: #ef4444;
}
@media (max-width: 600px) {
    .ape-cart-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    .ape-cart-item-img img {
        width: 70px;
        height: 70px;
    }
    .ape-cart-item-subtotal {
        min-width: auto;
    }
}

/* Cart Summary */
.ape-cart-summary {
    position: sticky;
    top: calc(var(--ape-topbar-h) + 20px);
}
body.admin-bar .ape-cart-summary {
    top: calc(var(--ape-topbar-h) + 52px);
}
.ape-cart-summary-inner {
    background: #fff;
    border-radius: var(--ape-radius-md);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.ape-cart-summary-inner h3 {
    font-size: 18px;
    margin: 0 0 20px;
    color: var(--ape-navy);
}
.ape-cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--ape-text-light);
    border-bottom: 1px solid var(--ape-border);
}
.ape-cart-summary-row.ape-discount {
    color: #22c55e;
}
.ape-cart-summary-row.ape-deposit {
    color: var(--ape-gold-dark);
    font-weight: 600;
}
.ape-cart-summary-row.ape-total {
    border-bottom: none;
    font-size: 17px;
    color: var(--ape-navy);
    padding-top: 14px;
}
.ape-cart-summary-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ═══ Favorites Page ═══ */
.ape-favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.ape-fav-card {
    background: #fff;
    border-radius: var(--ape-radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: var(--ape-transition);
    animation: apeScaleIn 0.3s ease both;
}
.ape-fav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.ape-fav-card.ape-removing {
    animation: apeRemove 0.4s ease forwards;
}
.ape-fav-card-img-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}
.ape-fav-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ape-fav-card:hover .ape-fav-card-img {
    transform: scale(1.05);
}
.ape-fav-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--ape-radius-full);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}
.ape-badge-stock {
    background: #ef4444;
}
.ape-badge-sale {
    background: var(--ape-gold);
}
.ape-btn-fav-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: var(--ape-radius-full);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ef4444;
    transition: var(--ape-transition);
}
.ape-btn-fav-remove:hover {
    background: #fff;
    transform: scale(1.1);
}
.ape-fav-card-body {
    padding: 14px;
}
.ape-fav-card-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ape-text);
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}
.ape-fav-card-name:hover {
    color: var(--ape-gold);
}
.ape-fav-card-store {
    display: block;
    font-size: 12px;
    color: var(--ape-text-muted);
    text-decoration: none;
    margin-bottom: 8px;
}
.ape-fav-card-store:hover {
    color: var(--ape-gold);
}
.ape-fav-card-store i {
    margin-right: 4px;
}
.ape-fav-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--ape-gold-dark);
    margin-bottom: 10px;
}
.ape-fav-card-price del {
    font-size: 13px;
    color: var(--ape-text-muted);
    font-weight: 400;
}
.ape-fav-card-price ins {
    text-decoration: none;
}

/* ═══ Account Page ═══ */

/* Guest */
.ape-account-guest {
    text-align: center;
    padding: 80px 20px;
    max-width: 400px;
    margin: 0 auto;
}
.ape-account-guest-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--ape-radius-full);
    background: linear-gradient(135deg, var(--ape-navy), var(--ape-navy-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--ape-gold);
    font-size: 36px;
    box-shadow: 0 8px 24px rgba(26,39,68,0.2);
}
.ape-account-guest h1 {
    font-size: 28px;
    color: var(--ape-navy);
    margin: 0 0 12px;
}
.ape-account-guest p {
    color: var(--ape-text-light);
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.6;
}
.ape-account-guest-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Dashboard */
.ape-account-dashboard {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header */
.ape-account-header {
    position: relative;
    border-radius: var(--ape-radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.ape-account-header-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--ape-navy), var(--ape-gold-dark));
    z-index: 0;
}
.ape-account-header-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.ape-account-header-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    flex-wrap: wrap;
}
.ape-account-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}
.ape-account-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--ape-radius-full);
    object-fit: cover;
    border: 4px solid var(--ape-gold);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.ape-account-seller-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-radius: var(--ape-radius-full);
    background: var(--ape-gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 3px solid var(--ape-navy);
}
.ape-account-info {
    flex: 1;
    min-width: 200px;
    color: #fff;
}
.ape-account-name {
    font-size: 24px;
    margin: 0 0 8px;
    color: #fff;
}
.ape-account-info p {
    margin: 0 0 4px;
    font-size: 13px;
    opacity: 0.85;
}
.ape-account-info p i {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    opacity: 0.7;
}
.ape-account-stats {
    display: flex;
    gap: 24px;
    flex-shrink: 0;
}
.ape-account-stat {
    text-align: center;
    color: #fff;
}
.ape-account-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
}
.ape-account-stat-label {
    display: block;
    font-size: 11px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@media (max-width: 600px) {
    .ape-account-header-content {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    .ape-account-stats {
        width: 100%;
        justify-content: center;
    }
}

/* Sections */
.ape-account-section {
    margin-bottom: 24px;
}
.ape-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ape-navy);
    margin: 0 0 16px;
}

/* Quick Access Grid */
.ape-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.ape-quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: var(--ape-radius-md);
    text-decoration: none;
    transition: var(--ape-transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ape-quick-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.ape-quick-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--ape-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.ape-quick-info {
    flex: 1;
    min-width: 0;
}
.ape-quick-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px;
    color: var(--ape-text);
}
.ape-quick-info p {
    font-size: 12px;
    color: var(--ape-text-muted);
    margin: 0;
}
.ape-quick-arrow {
    color: var(--ape-text-muted);
    flex-shrink: 0;
}

/* Quick Card Colors */
.ape-quick-blue .ape-quick-icon { background: #eff6ff; color: #3b82f6; }
.ape-quick-pink .ape-quick-icon { background: #fdf2f8; color: #ec4899; }
.ape-quick-green .ape-quick-icon { background: #f0fdf4; color: #22c55e; }
.ape-quick-yellow .ape-quick-icon { background: #fefce8; color: #eab308; }
.ape-quick-purple .ape-quick-icon { background: #f5f3ff; color: #8b5cf6; }
.ape-quick-vendor {
    border: 2px solid var(--ape-gold);
}
.ape-quick-vendor .ape-quick-icon {
    background: linear-gradient(135deg, var(--ape-navy), var(--ape-navy-light));
    color: var(--ape-gold);
}
.ape-quick-teal .ape-quick-icon { background: #f0fdfa; color: #14b8a6; }
.ape-quick-orange .ape-quick-icon { background: #FFFDE7; color: var(--alb-primary-dark, #F9A825); }

/* Orders List */
.ape-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--ape-border);
    border-radius: var(--ape-radius-md);
    overflow: hidden;
}
.ape-order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    text-decoration: none;
    transition: var(--ape-transition);
}
.ape-order-item:hover {
    background: var(--ape-bg);
}
.ape-order-img {
    width: 48px;
    height: 48px;
    border-radius: var(--ape-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.ape-order-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}
.ape-order-id {
    font-weight: 600;
    color: var(--ape-text);
    font-size: 14px;
}
.ape-order-badge {
    padding: 3px 10px;
    border-radius: var(--ape-radius-full);
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}
.ape-order-meta {
    flex: 1;
    text-align: right;
    min-width: 0;
}
.ape-order-meta span {
    display: block;
    font-size: 12px;
    color: var(--ape-text-muted);
}
.ape-order-meta strong {
    font-size: 14px;
    color: var(--ape-text);
}
.ape-order-arrow {
    color: var(--ape-text-muted);
    flex-shrink: 0;
    font-size: 12px;
}
@media (max-width: 600px) {
    .ape-order-item {
        flex-wrap: wrap;
    }
    .ape-order-meta {
        text-align: left;
        width: 100%;
    }
}

/* Addresses */
.ape-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.ape-address-card {
    background: #fff;
    border-radius: var(--ape-radius-md);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ape-address-header {
    padding: 12px 16px;
    background: var(--ape-navy);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.ape-address-header i {
    margin-right: 8px;
}
.ape-address-body {
    padding: 16px;
    font-size: 14px;
    color: var(--ape-text-light);
    line-height: 1.6;
}
.ape-address-body p {
    margin: 0 0 4px;
}
.ape-address-body i {
    margin-right: 4px;
    color: var(--ape-text-muted);
}
.ape-text-muted {
    color: var(--ape-text-muted);
    font-style: italic;
}
.ape-address-edit {
    display: block;
    padding: 10px 16px;
    text-align: center;
    color: var(--ape-gold-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid var(--ape-border);
    transition: var(--ape-transition);
}
.ape-address-edit:hover {
    background: var(--ape-bg);
}

/* Account Footer */
.ape-account-footer {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 24px 0;
    flex-wrap: wrap;
}

/* ═══ Staggered Animations ═══ */
.ape-cart-item:nth-child(1) { animation-delay: 0s; }
.ape-cart-item:nth-child(2) { animation-delay: 0.05s; }
.ape-cart-item:nth-child(3) { animation-delay: 0.10s; }
.ape-cart-item:nth-child(4) { animation-delay: 0.15s; }
.ape-cart-item:nth-child(5) { animation-delay: 0.20s; }
.ape-fav-card:nth-child(1) { animation-delay: 0s; }
.ape-fav-card:nth-child(2) { animation-delay: 0.05s; }
.ape-fav-card:nth-child(3) { animation-delay: 0.10s; }
.ape-fav-card:nth-child(4) { animation-delay: 0.15s; }
.ape-fav-card:nth-child(5) { animation-delay: 0.20s; }
.ape-fav-card:nth-child(6) { animation-delay: 0.25s; }
.ape-fav-card:nth-child(7) { animation-delay: 0.30s; }
.ape-fav-card:nth-child(8) { animation-delay: 0.35s; }

/* ═══ Search Tabs (Amazon-style inline) ═══ */
.ape-search-tabs {
    display: flex;
    flex-shrink: 0;
    height: 40px;
    align-items: stretch;
    gap: 0;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.15);
    border-right: none;
    border-radius: var(--ape-radius-full) 0 0 var(--ape-radius-full);
    overflow: hidden;
}
.ape-search-tab {
    padding: 0 12px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: var(--ape-silver);
    cursor: pointer;
    transition: var(--ape-transition);
    border-radius: 0;
    margin-right: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: flex;
    align-items: center;
}
.ape-search-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.ape-search-tab.active {
    color: var(--ape-navy);
    background: var(--ape-gold);
}
.ape-search-input-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    min-width: 0;
}
@media (max-width: 767px) {
    .ape-search-tabs {
        display: none;
    }
    .ape-search-input {
        border-radius: var(--ape-radius-full);
    }
}

/* ═══ Guaranteed Safe Checkout ═══ */
.acd-safe-checkout {
    background: linear-gradient(135deg, #f8fafc, #f0f4f8);
    border: 2px solid #e2e8f0;
    border-radius: var(--ape-radius-md);
    padding: 16px;
    margin: 16px 0;
}
.acd-safe-checkout-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ape-navy);
    margin-bottom: 12px;
}
.acd-safe-checkout-title i {
    color: #22c55e;
    margin-right: 6px;
}
.acd-safe-checkout-methods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.acd-checkout-method {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--ape-radius-sm);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}
.acd-method-wave {
    background: linear-gradient(135deg, #1DC3E2, #15a5c4);
}
.acd-method-orange {
    background: linear-gradient(135deg, #FF6600, #e55b00);
}
.acd-method-paypal {
    background: linear-gradient(135deg, #003087, #001f5c);
}

/* ═══ Stock Info ═══ */
.acd-stock-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}
.acd-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
}
.acd-in-stock {
    color: #22c55e;
}
.acd-out-stock {
    color: #ef4444;
}
.acd-stock-low {
    font-size: 12px;
    color: #f59e0b;
    font-weight: 500;
}

/* ═══ Product Actions Secondary ═══ */
.acd-actions-secondary {
    display: flex;
    gap: 10px;
}
.acd-actions-secondary .acd-btn {
    flex: 1;
}

/* ═══ Checkout WhatsApp info ═══ */
.ahm-checkout-whatsapp-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #dcfce7;
    color: #166534;
    border-radius: var(--ape-radius-sm);
    font-size: 13px;
    font-weight: 500;
}
.ahm-checkout-whatsapp-info i {
    font-size: 20px;
    color: #25D366;
    flex-shrink: 0;
}

/* ── SEARCH REFONTE v5 ── */
.ape-search-page-wrapper { max-width: 900px; margin: 0 auto; padding: 1.5rem 1rem; }
.ape-search-bar { display:flex; gap:0; border-radius:999px; overflow:hidden; box-shadow:0 4px 20px rgba(0,0,0,0.08); border:2px solid #E0E0E0; transition:border-color .2s; }
.ape-search-bar:focus-within { border-color:#FFD600; box-shadow:0 4px 24px rgba(255,214,0,.2); }
.ape-search-cat-select { border:none; background:#F5F5F5; padding:.75rem 1rem; font-size:.875rem; font-family:'DM Sans',sans-serif; min-width:120px; border-right:1px solid #E0E0E0; cursor:pointer; }
.ape-search-input-field { flex:1; border:none; padding:.75rem 1rem; font-size:1rem; font-family:'DM Sans',sans-serif; outline:none; background:#fff; }
.ape-search-submit { background:#FFD600; border:none; padding:.75rem 1.5rem; border-radius:0 999px 999px 0; cursor:pointer; transition:background .2s; }
.ape-search-submit:hover { background:#E6C200; }
.ape-search-submit i { color:#1A1A2E; }
.ape-search-suggestions { position:absolute; top:100%; left:0; right:0; background:#fff; border:1px solid #E0E0E0; border-radius:16px; box-shadow:0 8px 32px rgba(0,0,0,0.1); z-index:9999; max-height:400px; overflow-y:auto; }
.ape-suggestion-item { display:flex; align-items:center; gap:.75rem; padding:.75rem 1rem; cursor:pointer; transition:background .15s; border-bottom:1px solid #F5F5F5; }
.ape-suggestion-item:hover { background:#FFF9E0; }
.ape-suggestion-img { width:40px; height:40px; object-fit:cover; border-radius:8px; }
.ape-suggestion-title { font-weight:600; font-size:.875rem; color:#1A1A2E; }
.ape-suggestion-price { font-size:.75rem; color:#FFD600; font-weight:700; }
.ape-search-shimmer { height:60px; background:linear-gradient(90deg,#F5F5F5 25%,#E0E0E0 50%,#F5F5F5 75%); background-size:200% 100%; animation:alb-shimmer 1.5s infinite; border-radius:8px; margin:.5rem 0; }
@keyframes alb-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
