Squarespace product page CSS goes in Website → Pages → Custom Code → Custom CSS, and most tweaks target a handful of classes such as .product-detail, .product-title, .product-price, .product-gallery and .sqs-add-to-cart-button. Below are 20 copy-paste tweaks for typography, the image gallery, the add to cart button, variants, labels, related products and a sticky mobile button, all written for Squarespace 7.1.
I’m Sukesh Das, a Squarespace Circle Platinum Partner. I have built more than 1,200 websites since 2018, and a lot of them sell something. While researching this guide I reviewed over 7,000 solved questions on the Squarespace Forum, and product page styling was one of the topics that came up again and again. This post collects the tweaks store owners actually ask for, with code I wrote around the selectors that are in use today.
Squarespace product page CSS tweaks at a glance
| Problem | Fix | Where it goes |
|---|---|---|
| Product title too big or wrong font | Tweak 1 | Custom CSS |
| Price needs to stand out, sale price styling | Tweak 2 | Custom CSS |
| Description text hard to read | Tweak 3 | Custom CSS |
| Product photos are cropped | Tweak 4 | Custom CSS |
| Thumbnails squashed into one row | Tweak 5 | Custom CSS |
| Rounded images, hide gallery arrows | Tweak 6 | Custom CSS |
| Add to cart button should be full width | Tweak 7 | Custom CSS |
| Add to cart colors, hover and icon | Tweak 8 | Custom CSS |
| Quantity box looks plain | Tweak 9 | Custom CSS |
| Variant dropdown styling | Tweak 10 | Custom CSS |
| Variant buttons instead of a dropdown look | Tweak 11 | Custom CSS |
| Add-ons should sit above the description | Tweak 12 | Code Injection |
| Hide breadcrumb and next/previous links | Tweak 13 | Custom CSS |
| Sale and sold out label design | Tweak 14 | Custom CSS |
| Change the “Sold Out” wording | Tweak 15 | Custom CSS |
| Low stock message styling | Tweak 16 | Custom CSS |
| Related products title, columns, prices | Tweak 17 | Custom CSS |
| Sticky add to cart on phones | Tweak 18 | Custom CSS |
| CSS for one product only | Tweak 19 | Custom CSS |
| Spacing around the product layout | Tweak 20 | Custom CSS |
Before you start
- Custom CSS works on every plan. Open
Website → Pages → Custom Code → Custom CSS, or search “Custom CSS” in the Squarespace panel. - Code Injection (used in Tweak 12) needs a Core, Plus or Advanced plan, or the older Business and Commerce plans.
- Check the built-in settings first. Open a product, click Edit Site, then the paintbrush or Site Styles. Squarespace lets you pick the product page layout (Simple, Wrap, Half or Full), the gallery design, thumbnail position, image aspect ratio, add to cart button style and related products. See Squarespace’s guide to styling store and product pages. CSS is for what those settings can’t do.
- Paste one tweak at a time and check a real product page on your live site. One missing
}stops every rule below it.
One more thing before you write any Squarespace product page CSS: Squarespace has two sets of class names on product pages. Newer stores use lowercase names like .product-detail and .product-title. Many older forum answers use .ProductItem-details-title and similar. Where it matters I include both, so the code keeps working whichever version your store renders.
Tweak 1: How do I change the product title font and size in Squarespace?
The product title uses your Heading 1 style by default. On product pages that is often too large, especially next to a small price. This sets a separate size, weight and spacing for product titles only, without touching headings anywhere else:
/* Squarespace product page CSS: product title typography by Sukesh Das, sukeshdas.com */
.product-detail .product-title,
.ProductItem-details-title {
font-size: clamp(1.8rem, 3vw, 2.6rem) !important;
font-weight: 600 !important;
line-height: 1.15 !important;
letter-spacing: -0.01em;
margin-bottom: 12px !important;
}
To use a different font family, add font-family: "Your Font", sans-serif !important;. The font must already be loaded on your site, so pick one from Site Styles first and then reference it here.
Tweak 2: How do I style the price and sale price on a product page?
A price that blends into the body text costs sales. Make it bigger and give it your brand color. When a product is on sale, Squarespace shows the old price with the class .original-price, which you can mute and strike through:
/* Squarespace product page CSS: product price styling by Sukesh Das, sukeshdas.com */
.product-detail .product-price,
.ProductItem-product-price {
font-size: 1.5rem !important;
font-weight: 700 !important;
color: #1a1a1a !important;
margin-bottom: 20px !important;
}
/* Old price when the product is on sale */
.product-detail .product-price .original-price,
.ProductItem-product-price .original-price {
font-size: 1.1rem !important;
font-weight: 400 !important;
color: #8a8a8a !important;
text-decoration: line-through;
margin-left: 8px;
}
Tweak 3: How do I make the product description easier to read?
Long descriptions in tiny grey text are a common reason shoppers bounce. A comfortable line height, a readable size and a little space between paragraphs make a big difference:
/* Squarespace product page CSS: product description typography by Sukesh Das, sukeshdas.com */
.product-detail .product-description,
.ProductItem-details-excerpt {
font-size: 1.05rem !important;
line-height: 1.7 !important;
color: #333333 !important;
max-width: 60ch;
}
.product-detail .product-description p,
.ProductItem-details-excerpt p {
margin-bottom: 1em !important;
}
/* Bullet lists inside the description */
.product-detail .product-description ul {
padding-left: 1.2em;
}
max-width: 60ch keeps lines to roughly 60 characters, which is easier on the eye in the wide Half and Full layouts.
Tweak 4: How do I stop Squarespace from cropping product images?
This is the single most common Squarespace product page CSS question I see. Start with the setting: in the product page design options, set the gallery aspect ratio to match your photos. If your photos have mixed shapes, the setting alone can’t fit them all, so use object-fit: contain to show the full image with no cropping:
/* Squarespace product page CSS: stop product image cropping by Sukesh Das, sukeshdas.com */
.product-gallery-slides-item-image,
img.ProductItem-gallery-slides-item-image {
object-fit: contain !important;
}
/* Optional: a soft background behind images that don't fill the frame */
.product-gallery-slides-item {
background-color: #f6f6f6;
}
You can read more about how object-fit works on MDN. The cleanest long-term fix is still to export every product photo at the same ratio, for example 4:5, so nothing needs to be contained.
Tweak 5: How do I fix product gallery thumbnails in Squarespace?
When a product has many photos, the thumbnails below a slideshow gallery can squeeze into one long row. This lets them wrap into neat rows and sets a fixed size:
/* Squarespace product page CSS: product gallery thumbnails by Sukesh Das, sukeshdas.com */
[data-gallery-design="slideshow"] .product-gallery-thumbnails {
flex-wrap: wrap !important;
gap: 8px;
}
.product-gallery-thumbnails-item {
width: 72px !important;
flex: 0 0 72px !important;
opacity: 0.6;
transition: opacity 0.2s ease;
}
.product-gallery-thumbnails-item:hover,
.product-gallery-thumbnails-item[aria-current="true"] {
opacity: 1;
}
If you’d rather hide the thumbnails on phones and let shoppers swipe, wrap the rule .product-gallery-thumbnails { display: none !important; } in a @media screen and (max-width: 767px) query.
Tweak 6: How do I round gallery images and hide the gallery arrows?
/* Squarespace product page CSS: product gallery corners and arrows by Sukesh Das, sukeshdas.com */
.product-gallery-slides-item-image {
border-radius: 12px !important;
}
/* Hide the carousel arrows on the product gallery */
.product-gallery-carousel-controls {
display: none !important;
}
Rounded corners suit soft, lifestyle brands. Hiding the arrows works best when you keep thumbnails visible, so shoppers still have a way to move between photos.
Tweak 7: How do I make the add to cart button full width?
A full width button is easier to spot and easier to tap, and it takes only a few lines of Squarespace product page CSS. The button sits inside a wrapper, so both need to stretch:
/* Squarespace product page CSS: full width add to cart button by Sukesh Das, sukeshdas.com */
.product-detail .sqs-add-to-cart-button-wrapper {
width: 100% !important;
max-width: 100% !important;
}
.product-detail .sqs-add-to-cart-button {
width: 100% !important;
padding-top: 18px !important;
padding-bottom: 18px !important;
}
If the quantity box sits next to the button in your layout, the button fills the remaining space. To put the quantity on its own line above the button, add .product-add-to-cart { flex-direction: column; }.
Tweak 8: How do I change the add to cart button color, hover and icon?
By default the button follows your primary button style. If you want the product page button to look different from every other button on the site, style it directly:
/* Squarespace product page CSS: add to cart button design by Sukesh Das, sukeshdas.com */
.product-detail .sqs-add-to-cart-button {
background-color: #111111 !important;
color: #ffffff !important;
border-radius: 999px !important;
border: 2px solid #111111 !important;
transition: background-color 0.2s ease, color 0.2s ease;
}
.product-detail .sqs-add-to-cart-button:hover {
background-color: #ffffff !important;
color: #111111 !important;
}
/* Small arrow after the button text */
.product-detail .sqs-add-to-cart-button-inner::after {
content: " →";
}
For more button shapes and hover effects that work across the whole site, see my guide to Squarespace button CSS.
Tweak 9: How do I style the quantity box on a Squarespace product page?
/* Squarespace product page CSS: quantity input styling by Sukesh Das, sukeshdas.com */
.product-detail .product-quantity-input input {
width: 80px !important;
height: 52px !important;
border: 1px solid #cccccc !important;
border-radius: 8px !important;
text-align: center;
font-size: 1rem !important;
}
/* Hide the "Quantity" label above the box */
.product-detail .product-quantity-input .quantity-label {
display: none !important;
}
Match the height to your add to cart button so both line up when they sit side by side.
Tweak 10: How do I style the variant dropdown in Squarespace?
Size and color dropdowns use the browser’s default look, which rarely matches a polished store. This gives them a clean border, more padding and a bold label:
/* Squarespace product page CSS: variant dropdown styling by Sukesh Das, sukeshdas.com */
.product-detail .variant-option {
margin-bottom: 16px !important;
}
.product-detail .variant-option-title {
font-weight: 600 !important;
font-size: 0.95rem !important;
margin-bottom: 6px !important;
}
.product-detail .variant-select-wrapper select {
border: 1px solid #cccccc !important;
border-radius: 8px !important;
padding: 14px 16px !important;
font-size: 1rem !important;
background-color: #ffffff !important;
}
.product-detail .variant-select-wrapper select:focus {
outline: 2px solid #111111;
outline-offset: 2px;
}
Tweak 11: How do I style variant buttons instead of a dropdown?
Newer product layouts can show variants as buttons (sometimes called radio buttons). Turn that on in the product page design settings first, then style them so the selected option is obvious:
/* Squarespace product page CSS: variant button styling by Sukesh Das, sukeshdas.com */
.product-detail .variant-radiobtn-wrapper {
border-radius: 8px !important;
margin: 0 8px 8px 0 !important;
}
.product-detail .variant-radiobtn-wrapper label {
padding: 10px 18px !important;
border: 1px solid #cccccc !important;
border-radius: 8px !important;
}
.product-detail .variant-radiobtn-wrapper input:checked + label {
border-color: #111111 !important;
background-color: #111111 !important;
color: #ffffff !important;
}
The exact markup of variant buttons varies a little between layouts. If the checked style doesn’t show, right-click a variant on your live site, choose Inspect and check whether the label sits after the input.
Tweak 12: How do I move product add-ons above the description?
Product add-ons (gift wrap, engraving, extended warranty) appear in their own block. On some layouts they end up below a long description, where nobody sees them. CSS can’t move an element to a different parent reliably, so this short script does it. Paste it into Code Injection → Footer:
<script>
/* Move add-ons above description by Sukesh Das, sukeshdas.com */
document.addEventListener('DOMContentLoaded', function () {
var addOns = document.querySelector('.product-detail .pdp-product-add-ons');
var description = document.querySelector('.product-detail .product-description');
if (addOns && description) {
description.parentNode.insertBefore(addOns, description);
}
});
</script>
To move the add-ons right under the price instead, swap .product-description for the element that comes after the price in your layout.
Tweak 13: How do I hide the breadcrumb and pagination on product pages?
The “Shop / Product name” breadcrumb and the next and previous product links sit at the top of the product page. Some layouts include a toggle for them. If yours doesn’t, this Squarespace product page CSS hides both:
/* Squarespace product page CSS: hide product breadcrumb and pagination by Sukesh Das, sukeshdas.com */
.product-detail .product-nav,
.ProductItem-nav {
display: none !important;
}
/* Older layouts: hide only the breadcrumb and keep next and previous links */
.ProductItem-nav-breadcrumb {
display: none !important;
}
On newer product layouts the top bar holds only the breadcrumb, so the first rule is all you need there.
Keep the breadcrumb if your store has many categories. It helps shoppers get back to the right collection, and it gives search engines a clear path through your shop.
Tweak 14: How do I style the sale and sold out labels?
Squarespace shows status labels with the class .product-mark, plus .sale or .sold-out. Badge shape and color have settings now, but CSS gives you full control:
/* Squarespace product page CSS: sale and sold out labels by Sukesh Das, sukeshdas.com */
.product-mark.sale {
background-color: #d7263d !important;
color: #ffffff !important;
padding: 4px 10px !important;
border-radius: 4px !important;
font-weight: 600 !important;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.product-mark.sold-out {
background-color: #222222 !important;
color: #ffffff !important;
padding: 4px 10px !important;
border-radius: 4px !important;
}
These rules style the labels on product pages and on store grids. To change only the product page, put .product-detail in front of each selector. For grid badges, see my Squarespace store page customization guide.
Tweak 15: How do I change the “Sold Out” text in Squarespace?
There is no setting to rename the sold out label. The CSS trick is to shrink the original text to zero and show your own words with ::after:
/* Squarespace product page CSS: change sold out text by Sukesh Das, sukeshdas.com */
.product-mark.sold-out {
font-size: 0 !important;
}
.product-mark.sold-out::after {
content: "Back soon";
font-size: 13px;
letter-spacing: 0.04em;
}
Screen readers still read the original text, which is fine because it still describes the product correctly. If you sell made-to-order items, “Made to order” or “Waitlist open” can work better than a hard “Sold Out”.
Tweak 16: How do I style the low stock message?
When limited availability is turned on, Squarespace shows a short message such as “Only 3 left”. It uses the class .product-scarcity. A touch of color makes it feel urgent without shouting:
/* Squarespace product page CSS: low stock message by Sukesh Das, sukeshdas.com */
.product-detail .product-scarcity {
display: inline-block;
color: #b45309 !important;
background-color: #fff7ed;
padding: 4px 10px;
border-radius: 4px;
font-size: 0.9rem !important;
font-weight: 600;
}
Tweak 17: How do I customize related products on a Squarespace product page?
Related products appear at the bottom of the page. You can turn them on or off and set columns in the design settings. CSS handles the rest, such as the heading, spacing or hiding prices:
/* Squarespace product page CSS: related products styling by Sukesh Das, sukeshdas.com */
.product-related-products-title,
.ProductItem-related-label {
text-align: center !important;
font-size: 1.6rem !important;
margin-bottom: 24px !important;
}
/* Less space above the related products area */
.product-related-products,
.ProductItem-relatedProducts {
padding-top: 20px !important;
}
/* Hide prices in related products only */
.product-related-products .product-list-item-price,
.ProductItem-relatedProducts .product-price {
display: none !important;
}
The first selector in each rule is for newer store layouts and the second for older ones. To change the “You might also like” wording, use the same font-size: 0 and ::after trick from Tweak 15 on .product-related-products-title.
Tweak 18: How do I make the add to cart button sticky on mobile?
On a phone, the add to cart button often scrolls out of view once a shopper reads the description. Pinning it to the bottom of the screen with a little Squarespace product page CSS keeps the next step one tap away:
/* Squarespace product page CSS: sticky mobile add to cart by Sukesh Das, sukeshdas.com */
@media screen and (max-width: 767px) {
.product-detail .product-add-to-cart {
position: fixed !important;
left: 0;
right: 0;
bottom: 0;
z-index: 999;
margin: 0 !important;
padding: 12px 16px calc(12px + env(safe-area-inset-bottom)) !important;
background-color: #ffffff;
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
}
.product-detail .sqs-add-to-cart-button {
width: 100% !important;
}
/* Room at the bottom so the footer isn't hidden */
.view-item.collection-type-products {
padding-bottom: 90px;
}
}
Shoppers still need to pick a variant first. If your products have size or color options, the button shows an error until a variant is chosen, so this works best for products with no variants or with variants near the top. For more phone layout fixes, see how to fix Squarespace mobile issues.
Tweak 19: How do I add Squarespace product page CSS for one product only?
Every product page has a unique ID on the body tag that starts with item-. Right-click the product page on your live site, choose Inspect, and look at the <body> tag for id="item-...". Then put that ID in front of any rule:
/* Squarespace product page CSS: per-product CSS by Sukesh Das, sukeshdas.com */
#item-PASTE-PRODUCT-ID .product-title {
color: #7c3aed !important;
}
#item-PASTE-PRODUCT-ID .sqs-add-to-cart-button {
background-color: #7c3aed !important;
border-color: #7c3aed !important;
}
Per-product Squarespace product page CSS is handy for a featured launch, a limited edition or a product that needs its own color story. Keep a comment above each block with the product name so you remember which ID is which.
Tweak 20: How do I fix spacing around the product layout?
With a transparent or tall header, the product content can sit too close to the top or hide under the header. The Simple layout has its own attribute, so you can add space just there:
/* Squarespace product page CSS: product layout spacing by Sukesh Das, sukeshdas.com */
.product-detail > [data-product-detail-layout="simple"] .product-content-wrapper {
padding-top: 120px !important;
}
@media screen and (max-width: 767px) {
.product-detail > [data-product-detail-layout="simple"] .product-content-wrapper {
padding-top: 80px !important;
}
}
/* More space between the gallery and the details on desktop */
@media screen and (min-width: 768px) {
.product-detail .product-meta {
padding-left: 40px !important;
}
}
Did Squarespace change product page code in 2026?
Yes, two changes matter for anyone writing Squarespace product page CSS this year.
- The Additional Info area changed. Squarespace announced that the
.ProductItem-additionalclass would be removed on June 5, 2026, and the Additional Info content now uses standard section markup instead. Old CSS that targets.ProductItem-additionalwill no longer do anything. The details are on the Squarespace developer changelog. That’s why none of the tweaks above use that class. - The mini cart arrived in March 2026. Adding a product now opens a slide-out mini cart on many stores instead of sending shoppers straight to the cart page. Its colors follow the section theme at the top of the page, so if it looks wrong, check that first. To keep product thumbnails from being cropped in the mini cart,
.cart-row img { object-fit: contain; }is a good starting point.
If old snippets stopped working after these updates, my guide on why Squarespace code stopped working walks through how to find the new selector. And if your CSS works in preview but not on the live store, read Squarespace CSS not working on the live site.
What else can I add to a Squarespace product page?
Squarespace product page CSS handles the styling, but that is only half the job. A few small additions can lift conversions on a product page:
- A countdown for sales or launches. See my Squarespace countdown timer guide.
- A chat button for questions before buying. See how to add a WhatsApp button to Squarespace.
- Product schema for search results. Squarespace adds basic product data, and my Squarespace schema markup guide covers what to add on top.
- An age gate for restricted products. If you sell wine, vapes or similar, follow my guide to adding an age verification popup to Squarespace.
Want a ready-made snippet for this?
These snippets from my free library each come with a live preview, copy-ready code and settings you can change:
- Change the Sold Out text
- Hide the product breadcrumb
- Sticky Add to Cart on mobile
- Strikethrough sale price
- Hide the quantity field
- Stop product images cropping
Browse all of them in the free Squarespace snippet library.
Squarespace product page CSS FAQs
Where do I put Squarespace product page CSS?
In Website → Pages → Custom Code → Custom CSS. It applies site-wide, so the selectors in this guide only affect product pages because they start with product classes like .product-detail.
Do I need a Commerce plan to customize product pages with CSS?
You need a plan that lets you sell to have product pages, but Custom CSS itself works on every plan. Only the add-ons script in Tweak 12 needs Code Injection, which requires Core, Plus or Advanced, or an older Business or Commerce plan.
Why are my Squarespace product images cropped?
The gallery uses a fixed aspect ratio. Photos with a different shape get cropped to fit. Change the gallery aspect ratio in the design settings, or use object-fit: contain from Tweak 4 to show every image in full.
Can I change the “Sold Out” text without code?
No. Squarespace has no setting for the wording of the sold out label. The short CSS in Tweak 15 hides the original text and shows your own words in its place.
How do I target one product with CSS in Squarespace?
Find the id="item-..." on the body tag of that product page using Inspect in your browser, then start each rule with #item- followed by the ID.
Why did my old product page CSS stop working?
Squarespace has updated product page markup more than once. Classes like .ProductItem-additional were removed in 2026, and newer layouts use lowercase classes like .product-detail. Inspect the page and update the selector.
Can I make the add to cart button sticky on desktop too?
Yes, but on desktop it usually works better to make the whole details column sticky with position: sticky so the button stays in view while shoppers scroll through photos.
Will product page CSS affect product blocks on other pages?
Rules that start with .product-detail mostly stay on product pages. Broad selectors such as .product-mark or .product-price on their own can also change product blocks and store grids.
Do these tweaks work on Squarespace 7.0?
Some older class names overlap, but 7.0 templates each have their own structure. This guide is written for Squarespace 7.1.
Want your product pages designed for you?
If you would rather not touch code, I can redesign your product pages, fix the gallery and buttons, and check everything on real phones before handing it back. I build and support Squarespace stores every week as a Squarespace web designer. Send me a short brief and I will reply within one working day.
Related guide: How to add age verification to Squarespace with free popup code.

