@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Biobase Tahiti Premium Eco Design System */
:root {
    --bb-green-light: #eef3ef;
    --bb-green: #2b5c3e;
    --bb-green-dark: #1a3a27;
    --bb-earth: #8b6b4a;
    --bb-text: #1f2937;
    --bb-bg: #fdfdfc;
    --bb-white: #ffffff;
    --padding-std: 24px;
    --border-radius: 16px;
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.biobase-shop {
    font-family: 'Outfit', sans-serif;
    color: var(--bb-text);
    background-color: transparent;
    padding: 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.biobase-hero {
    text-align: center;
    padding: 4rem 2rem;
    background: #f6f5f2;
    border-radius: 24px;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.biobase-hero h2 {
    color: var(--bb-green-dark);
    font-size: 2.8rem;
    margin: 0;
    font-weight: 800;
    line-height: 1.2;
}

.biobase-hero p {
    font-size: 1.1rem;
    color: #475569;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.biobase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.biobase-card {
    background: var(--bb-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-subtle);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f6f5f2;
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
    animation: bbFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bbFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.biobase-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.biobase-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: calc(var(--border-radius) - 6px);
    margin-bottom: 1rem;
    background-color: #f6f5f2;
}

.biobase-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.biobase-card-desc {
    font-size: 0.9rem;
    color: #64748b;
    flex-grow: 1;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.biobase-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.biobase-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bb-green-dark);
}

.biobase-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
}

.biobase-btn-outline {
    background: transparent;
    border: 2px solid var(--bb-green);
    color: var(--bb-green);
}

.biobase-btn-outline:hover {
    background: var(--bb-green);
    color: white;
}

.biobase-btn-primary {
    background: var(--bb-green);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.biobase-btn-primary:hover:not(:disabled) {
    background: var(--bb-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.biobase-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.bb-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bb-spin 0.8s ease-in-out infinite;
    flex-shrink: 0;
}

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

.biobase-btn-loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}
/* Shop Layout */
.biobase-shop-wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    font-family: 'Outfit', sans-serif;
    color: var(--bb-text);
    background-color: transparent;
    padding: 1rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.biobase-shop-main {
    flex: 1;
}

.biobase-shop-sidebar {
    width: 350px;
    flex-shrink: 0;
}
/* SUCCESS SCREEN */
.bb-success-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    animation: bbFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 40px auto;
    max-width: 600px;
}

@keyframes bbFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bb-checkmark-wrapper {
    width: 80px;
    height: 80px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.bb-checkmark {
    color: #10b981;
    font-size: 40px;
    animation: bbScaleCheck 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes bbScaleCheck {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.bb-success-title {
    color: #1a202c;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.bb-success-msg {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 400px;
}

.bb-success-btn {
    background: var(--bb-green-dark);
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.bb-success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(62, 160, 85, 0.3);
}

@media (max-width: 768px) {
    .bb-success-screen { padding: 40px 20px; margin: 20px; }
}

.biobase-cart-sticky {
    position: sticky;
    top: 100px;
    background: var(--bb-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
    border: 1px solid #f6f5f2;
}

.biobase-cart-sticky h3 {
    margin-top: 0;
    color: var(--bb-green-dark);
    font-size: 1.6rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Stripe Clean Minimalist Styling */
.bb-stripe-input {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    transition: all 0.2s ease;
    min-height: 48px;
}

.bb-stripe-input:focus-within {
    border-color: var(--bb-green);
    box-shadow: 0 0 0 3px rgba(62, 160, 85, 0.1);
}

/* Secure Payment Widget Classic Style */
.bb-payment-area {
    margin-top: 30px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #d1d5db;
}

.bb-stripe-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
}

.bb-stripe-input:focus-within {
    background: #ffffff;
    border-color: var(--bb-green);
    box-shadow: 0 0 0 4px rgba(62, 160, 85, 0.1);
}

.bb-form-input.error {
    border-color: #ef4444 !important;
    background-color: #fff1f2 !important;
}

#bb-card-errors {
    color: #ef4444;
    font-size: 0.82rem;
    margin-top: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive */
@media (max-width: 900px) {
    .biobase-shop-wrapper {
        flex-direction: column;
    }
    .biobase-shop-sidebar {
        width: 100%;
        order: -1; /* optionally put cart at top on mobile, or just let it flow */
    }
    .biobase-cart-sticky {
        position: static;
        margin-bottom: 20px;
    }
}

.biobase-qty-add {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.biobase-qty-input {
    width: 60px;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-family: inherit;
}

/* Cart Item */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-btn {
    background: var(--bb-green-light);
    border: none;
    color: var(--bb-green-dark);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-item-btn:hover {
    background: var(--bb-green);
    color: white;
}

.cart-item-price {
    font-weight: 700;
    color: var(--bb-green-dark);
    margin-left: 10px;
}

.empty-cart-msg {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* Form Inputs */
.bb-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.bb-form-input:focus {
    outline: none;
    border-color: var(--bb-green);
    box-shadow: 0 0 0 2px var(--bb-green-light);
}

.bb-form-input.error {
    border-color: #ef4444 !important;
    background-color: #fff1f2;
}

/* Product Variants UI - Amazon Style */
.p-variants-selection {
    margin: 15px 0;
}

.variant-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.variant-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.variant-thumb.active {
    border-color: var(--bb-green);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(43, 92, 62, 0.2);
}

/* Admin Specific */
.admin-view {
    border: 1px dashed var(--bb-green);
    position: relative;
}

.bb-delete-product {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bb-delete-product:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.biobase-card-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    background: #f1f5f9;
    margin-bottom: 12px;
}

.biobase-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.biobase-card:hover .biobase-card-img {
    transform: scale(1.05);
}

#bb-save-product-btn:active {
    transform: scale(0.98);
}

.selected-v-label {
    background: var(--bb-green-light);
    color: var(--bb-green-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.cart-variant-label {
    font-size: 0.75rem;
    color: var(--bb-green);
    font-weight: 600;
    display: block;
    margin-top: 4px;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 3px solid var(--bb-green);
}

.bb-payment-logos svg {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    transition: transform 0.2s;
}

.bb-payment-logos svg:hover {
    transform: translateY(-2px);
}

/* Inline Editing & CMS Features */
[data-bb-editable] {
    position: relative;
    transition: all 0.2s;
}

.is-admin-mode [data-bb-editable] {
    cursor: text;
    min-height: 1em;
    padding: 2px 4px;
    border: 1px dashed transparent;
    border-radius: 4px;
}

.is-admin-mode [data-bb-editable]:hover,
.is-admin-mode [data-bb-editable]:focus {
    outline: none;
    background: rgba(43, 92, 62, 0.03);
    border-color: rgba(43, 92, 62, 0.3);
}

.bb-inline-save-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.bb-inline-save-btn {
    position: absolute;
    right: -40px;
    top: 0;
    background: var(--bb-green);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 100;
    font-size: 14px;
}

.bb-inline-save-btn.visible {
    display: flex;
}

.bb-product-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 20;
}

.bb-edit-product {
    background: var(--bb-green);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.bb-delete-product {
    position: static; /* override previous absolute */
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.bb-edit-product:hover { background: var(--bb-green-dark); }
.bb-delete-product:hover { background: #b91c1c; }

.bb-media-upload:hover {
    background: var(--bb-green-light);
    border-color: var(--bb-green);
}

/* Pro Max Language Switcher */
.biobase-lang-switcher {
    display: inline-flex !important;
    background: #f6f5f2 !important;
    padding: 6px !important;
    border-radius: 12px !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03) !important;
    border: 1px solid #efeee9 !important;
    gap: 4px !important;
}

/* Biobase Banana Loader Animations */
.bio-stroke {
    fill: none;
    stroke: var(--bb-green);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@keyframes sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3deg); }
}
@keyframes swayLeaf {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(6deg); }
}

#tree-group {
    transform-origin: 100px 180px;
    animation: sway 4s ease-in-out infinite;
}

.leaf-left {
    transform-origin: 80px 70px;
    animation: swayLeaf 3.5s ease-in-out infinite reverse;
}
.leaf-right {
    transform-origin: 120px 70px;
    animation: swayLeaf 4.5s ease-in-out infinite;
}

@keyframes monkeySwing {
    0% { transform: translate(-100px, 150px) rotate(-45deg); opacity: 0; }
    15% { transform: translate(-30px, 80px) rotate(0deg); opacity: 1; }
    30% { transform: translate(40px, 90px) rotate(15deg); opacity: 1; }
    45% { transform: translate(150px, 150px) rotate(45deg); opacity: 0; }
    100% { transform: translate(150px, 150px) rotate(45deg); opacity: 0; }
}

#monkey {
    transform-origin: 5px 25px;
    transform-box: fill-box;
    animation: monkeySwing 3s infinite linear;
}

.banana {
    transition: opacity 0.2s;
}

.bb-lang-btn {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    padding: 8px 20px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    font-family: 'Outfit', sans-serif !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 !important;
}

.bb-lang-btn:hover:not(.active) {
    color: #0f172a !important;
}

.bb-lang-btn.active {
    color: #0f172a !important;
    background: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06) !important;
}

/* Hide NitroPack Footer Badge Globally */
#nitropack-badge,
.nitro-badge,
a[href*="nitropack.io"],
div[id^="nitro-badge"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* FORCE HIDE LOADER TO BYPASS NITROPACK DELAY JS FREEZE */
#bb-fullscreen-loader {
    animation: forceHideLoader 0.5s ease 1s forwards !important;
}

@keyframes forceHideLoader {
    to { 
        opacity: 0 !important; 
        visibility: hidden !important; 
        pointer-events: none !important;
    }
}

/* Skeleton Loader Animation for Products Grid */
.skeleton-card {
    pointer-events: none;
    animation: none !important;
}
.skeleton-img {
    width: 100%;
    height: 200px;
    background: #e2e8f0;
    border-radius: calc(var(--border-radius) - 6px);
    margin-bottom: 1rem;
    animation: bbPulse 1.5s infinite ease-in-out;
}
.skeleton-text {
    height: 16px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: bbPulse 1.5s infinite ease-in-out;
}
.skeleton-text.title { width: 70%; height: 24px; margin-bottom: 15px; }
.skeleton-text.desc { width: 100%; height: 14px; margin-bottom: 8px; }
.skeleton-text.price { width: 40%; height: 20px; margin-top: 15px; }
.skeleton-btn {
    width: 100%;
    height: 45px;
    background: #e2e8f0;
    border-radius: 8px;
    margin-top: 20px;
    animation: bbPulse 1.5s infinite ease-in-out;
}
@keyframes bbPulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
