> ## Documentation Index
> Fetch the complete documentation index at: https://bundles-docs.getappfox.com/product-bundles/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom CSS settings

> Write custom CSS in Appfox Settings to style Shopify bundle widgets past the built-in colors, using selectors for the container, title, prices, and buttons.

The Custom CSS settings allow you to add custom CSS code to style your bundle widgets beyond the built-in color and label options. This gives you complete control over the appearance and behavior of bundle elements. The same CSS is applied on **Bundles (product page)**, **Cart page offers**, and **Cart drawer offers**.

## Accessing custom CSS settings

1. Open the Product Bundles app
2. Click **Settings** in the left navigation
3. Select the **Custom CSS** tab

## CSS editor

![Custom CSS field and Save custom CSS](https://mintcdn.com/appfox-bundles/JvgX2FNik22wHOl8/product-bundles/docs/images/30-settings-custom-css.png?fit=max\&auto=format\&n=JvgX2FNik22wHOl8\&q=85\&s=017a004219738f09b5bf10f328f820fc)

The Custom CSS page has a code editor for writing CSS. It highlights syntax, shows line numbers, suggests CSS properties as you type, and previews changes before you apply them.

## Available CSS selectors

Target specific bundle elements using these classes. Widget classes start with `tb-` and the cart upsell uses `cart-upsell-` classes. Bundle types draw some elements with different classes, so each element lists every class that applies.

### Widget container

```css theme={null}
.tb-container {
  /* Styles for the main widget container */
}
```

### Bundle title

```css theme={null}
.tb-bundle-title,
.tb-volume-bundle-title,
.tb-fixed-bundle-title {
  /* Styles for the bundle heading */
}
```

### Product list

```css theme={null}
.tb-products-grid {
  /* Styles for the product list container */
}

.tb-product-card,
.tb-product-fixed {
  /* Styles for individual product items */
}

.tb-product-image,
.tb-mam-product-image {
  /* Styles for product images */
}

.tb-product-title,
.tb-product-name {
  /* Styles for product names */
}
```

### Pricing

```css theme={null}
.tb-price-section {
  /* Styles for the pricing section */
}

.tb-volume-original-price,
.tb-fixed-original-price,
.tb-product-original-price {
  /* Styles for regular price (before discount) */
}

.tb-volume-discount-price,
.tb-fixed-final-price {
  /* Styles for bundle price (after discount) */
}

.tb-savings-text,
.tb-savings-summary {
  /* Styles for savings amount */
}
```

### Button

```css theme={null}
.tb-add-to-cart,
.tb-add-button {
  /* Styles for the add to cart button */
}

.tb-add-to-cart:hover,
.tb-add-button:hover {
  /* Styles for button hover state */
}

.tb-add-to-cart:active,
.tb-add-button:active {
  /* Styles for button clicked state */
}
```

### Cart banner

```css theme={null}
.cart-upsell-container {
  /* Styles for cart page banner */
}

.cart-upsell-bundle-card {
  /* Styles for banner content */
}
```

## Example customizations

### Rounded modern style

```css theme={null}
.tb-container {
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tb-add-to-cart,
.tb-add-button {
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
```

### Minimal clean design

```css theme={null}
.tb-container {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #ffffff;
}

.tb-bundle-title,
.tb-volume-bundle-title,
.tb-fixed-bundle-title {
  font-weight: 400;
  font-size: 20px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 12px;
}

.tb-add-to-cart,
.tb-add-button {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 0;
  text-transform: none;
}
```

### Vibrant bold style

```css theme={null}
.tb-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 24px;
}

.tb-bundle-title,
.tb-volume-bundle-title,
.tb-fixed-bundle-title {
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.tb-savings-text,
.tb-savings-summary {
  background: #ffd700;
  color: #333;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
}

.tb-add-to-cart,
.tb-add-button {
  background: white;
  color: #667eea;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
```

### Animation and interactions

```css theme={null}
.tb-container {
  transition: transform 0.3s ease;
}

.tb-container:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tb-product-card,
.tb-product-fixed {
  transition: all 0.2s;
}

.tb-product-card:hover,
.tb-product-fixed:hover {
  background: #f9f9f9;
}

.tb-add-to-cart,
.tb-add-button {
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.tb-add-to-cart:hover,
.tb-add-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
```

### Mobile-optimized

```css theme={null}
/* Desktop styles */
.tb-container {
  padding: 24px;
}

.tb-bundle-title,
.tb-volume-bundle-title,
.tb-fixed-bundle-title {
  font-size: 24px;
}

/* Mobile styles */
@media (max-width: 768px) {
  .tb-container {
    padding: 16px;
    margin: 0 -12px; /* Extend to screen edges */
  }
  
  .tb-bundle-title,
  .tb-volume-bundle-title,
  .tb-fixed-bundle-title {
    font-size: 20px;
  }
  
  .tb-product-card,
  .tb-product-fixed {
    flex-direction: column;
    text-align: center;
  }
  
  .tb-product-image,
  .tb-mam-product-image {
    margin-bottom: 8px;
  }
  
  .tb-add-to-cart,
  .tb-add-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .tb-bundle-title,
  .tb-volume-bundle-title,
  .tb-fixed-bundle-title {
    font-size: 18px;
  }
  
  .tb-product-title,
  .tb-product-name {
    font-size: 14px;
  }
}
```

## Best practices

> [accordion] Start simple
>
> Begin with small changes and test before adding complex styles. Build up gradually.

> [accordion] Use specific selectors
>
> Target bundle elements specifically (e.g., `.tb-add-to-cart`) rather than generic selectors that might affect your entire site.

> [accordion] Test cross-browser
>
> Check your custom CSS in Chrome, Safari, Firefox, and Edge. Some CSS properties behave differently across browsers.

> [accordion] Mobile first
>
> Always include mobile-specific styles. More than 50% of shoppers use mobile devices.

> [accordion] Performance matters
>
> Avoid complex animations or excessive CSS that could slow page load times.

> [accordion] Comment your code
>
> Add comments to explain what each section does for easier future maintenance.

## CSS tips and tricks

### Use CSS variables for consistency

```css theme={null}
:root {
  --bundle-primary: #8937EB;
  --bundle-radius: 12px;
  --bundle-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tb-container {
  border-radius: var(--bundle-radius);
  box-shadow: var(--bundle-shadow);
}

.tb-add-to-cart,
.tb-add-button {
  background: var(--bundle-primary);
  border-radius: calc(var(--bundle-radius) / 2);
}
```

### Improve accessibility

```css theme={null}
/* High contrast for better readability */
.tb-container {
  color: #333;
}

/* Clear focus states for keyboard navigation */
.tb-add-to-cart:focus,
.tb-add-button:focus {
  outline: 3px solid #8937EB;
  outline-offset: 2px;
}

/* Larger touch targets on mobile */
@media (max-width: 768px) {
  .tb-add-to-cart,
  .tb-add-button {
    min-height: 44px;
    padding: 14px;
  }
}
```

### Smooth transitions

```css theme={null}
.tb-container * {
  transition: all 0.2s ease;
}

.tb-add-to-cart,
.tb-add-button {
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
```

## Saving and applying CSS

**1. Write your CSS**

Add your custom CSS in the editor

**2. Preview (optional)**

Use the preview feature to see changes before saving

**3. Save**

Click **Save** to apply your custom CSS

**4. Test**

Visit your store and check the widgets on product and cart pages

Changes apply immediately to all bundle widgets across your store.

## Troubleshooting

**CSS not applying**:

* Check for syntax errors (missing semicolons, brackets, etc.)
* Verify class names are correct
* Clear browser cache and check in incognito mode
* Check browser console for CSS errors

**Styles being overridden**:

* Your theme CSS might have higher specificity
* Try more specific selectors or use `!important` sparingly
* Inspect elements with browser developer tools to see which styles apply

**Mobile layout broken**:

* Add `@media` queries for responsive design
* Test on actual mobile devices
* Check for fixed widths that don't scale

**Performance issues**:

* Remove complex animations
* Optimize heavy styles
* Use simple CSS properties

## Getting help with CSS

If you need help with custom CSS:

* **Browser DevTools**: Use Chrome/Firefox DevTools to inspect elements and test styles live
* **CSS documentation**: Reference MDN Web Docs for CSS properties
* **Support**: Contact [support@getappfox.com](mailto:support@getappfox.com) for assistance

> [!TIP]
>
> Before adding custom CSS, explore the built-in color and label customization options. They're easier to maintain and work well for most needs. Use custom CSS only when you need styling beyond those options.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.