/* Biobase Tahiti Premium Eco Design System */
:root {
    --bb-green-light: #e6f2e6;
    --bb-green: #3ea055;
    --bb-green-dark: #2a6f3b;
    --bb-earth: #8b5a2b;
    --bb-text: #2c3e2d;
    --bb-bg: #fafaf8;
    --bb-white: #ffffff;
    --padding-std: 20px;
    --border-radius: 12px;
    --shadow-subtle: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

.biobase-hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--bb-green-light) 0%, var(--bb-bg) 100%);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.biobase-hero h2 {
    color: var(--bb-green-dark);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.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.3s ease;
    display: flex;
    flex-direction: column;
}

.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: #f1f5f9;
}

.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: 0.5rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.9rem;
}

.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;
}

.biobase-btn-primary:hover {
    background: var(--bb-green-dark);
}
/* Shop Layout */
.biobase-shop-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    font-family: 'Inter', 'Roboto', sans-serif;
    color: var(--bb-text);
    background-color: transparent;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

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

.biobase-shop-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.biobase-cart-sticky {
    position: sticky;
    top: 100px; /* offset when scrolling */
    background: var(--bb-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--bb-green-light);
}

.biobase-cart-sticky h3 {
    margin-top: 0;
    color: var(--bb-green-dark);
    font-size: 1.5rem;
    border-bottom: 2px solid var(--bb-green-light);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Stripe Discrete Elements Styling */
.bb-stripe-field-container {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
}

.bb-stripe-field-container:focus-within {
    border-color: var(--bb-green);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.bb-stripe-element {
    min-height: 20px;
}

#bb-card-errors {
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 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: 38px;
    height: 38px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.variant-thumb:hover {
    border-color: var(--bb-green-light);
}

.variant-thumb.active {
    border-color: var(--bb-green);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 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 rgba(62, 160, 85, 0.3);
    border-radius: 4px;
}

.is-admin-mode [data-bb-editable]:focus {
    outline: none;
    background: rgba(62, 160, 85, 0.05);
    border-color: var(--bb-green);
}

.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);
}

