Shopify

Shopify Reformation Theme: Optimizing Mobile Product Cards for Enhanced UX

Hey there, fellow store owners! We all know how crucial a stellar mobile experience is these days. Most of our customers are probably browsing and buying right from their phones. So, when something looks a little off, or not quite as impactful as we'd like on a smaller screen, it's totally understandable to want to tweak it.

Recently, a common challenge popped up in the Shopify community, specifically around customizing product cards on the popular Reformation theme. It's a great premium theme, but like any template, sometimes you need to put your own stamp on it to truly shine.

Cramped mobile product card layout on Shopify Reformation theme
Cramped mobile product card layout on Shopify Reformation theme

The Mobile Product Card Dilemma on Reformation

Our community member, siva_fds, brought up a super relevant point about the "Collection Tabs" section on their homepage. On mobile devices, the Reformation theme was displaying two product cards per row. While this might save some vertical space, it often makes individual products feel smaller and less prominent. Siva_fds's goal was clear: get those product cards to display one per row on mobile, making them larger and more eye-catching. Plus, they wanted to tackle some of that extra white space that often comes with default layouts.

Take a look at what siva_fds was seeing – two cards side-by-side, which can feel a bit cramped:

Screenshot showing two product cards per row on mobile in Reformation theme

Why a Single Product Card Row on Mobile Matters

In today's mobile-first world, optimizing your e-commerce site for smaller screens isn't just a recommendation; it's a necessity. A single product card per row on mobile offers several significant advantages:

  • Improved Readability: Larger text and product details are easier to read without squinting or excessive zooming.
  • Enhanced Visual Impact: Products appear larger and more prominent, allowing their details and aesthetics to shine, which is crucial for fashion and visual brands.
  • Easier Interaction: Tapping on product images or 'Add to Cart' buttons becomes less error-prone when elements are larger and well-spaced.
  • Reduced Clutter: A cleaner layout minimizes visual noise, helping customers focus on one product at a time.
  • Better Conversion Rates: A seamless and enjoyable mobile shopping experience directly translates to higher engagement and, ultimately, more sales.

The Solution: Customizing Your Reformation Theme with CSS

The good news is that achieving this single-column layout and addressing white space is entirely possible with a bit of custom CSS. A helpful community member, Wsp, provided a concise and effective solution that targets the specific elements within the Reformation theme's 'Collection Tabs' section.

Understanding the Code

The provided CSS uses a media query, which is a fundamental part of responsive web design. It allows you to apply specific styles only when certain conditions are met – in this case, when the screen width is 768 pixels or less (typical for mobile devices and smaller tablets).


@media screen and (max-width: 768px) {

  .collection-tabs .product-grid,
  .collection-tabs .grid,
  .collection-tabs__product-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .collection-tabs .grid__item,
  .collection-tabs .product-card,
  .collection-tabs__product-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  .collection-tabs {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

Breaking Down the CSS:

  1. @media screen and (max-width: 768px) { ... }

    This is the media query. All the styles inside this block will only apply to screens that are 768 pixels wide or narrower. This ensures your desktop layout remains unchanged.

  2. Targeting the Grid Container:
    .collection-tabs .product-grid, .collection-tabs .grid, .collection-tabs__product-grid { ... }
    • These selectors target the main container elements responsible for arranging your product cards within the 'Collection Tabs' section. Themes often use multiple classes for similar elements, so including all relevant ones ensures broad compatibility.
    • display: grid !important;: This property turns the container into a CSS Grid, a powerful layout system.
    • grid-template-columns: 1fr !important;: This is the magic line! It tells the grid to create a single column, taking up all available fractional space. This effectively changes your two-column layout to one column.
    • gap: 16px !important;: This adds a 16-pixel space between your product cards, preventing them from looking too cramped.
  3. Targeting Individual Product Cards:
    .collection-tabs .grid__item, .collection-tabs .product-card, .collection-tabs__product-card { ... }
    • These selectors target the individual product card elements themselves.
    • width: 100% !important; and max-width: 100% !important;: These ensure that each product card expands to fill the entire width of its single-column grid track, making it larger and more prominent.
  4. Adjusting Section Padding:
    .collection-tabs { padding-left: 12px !important; padding-right: 12px !important; }
    • This adjusts the left and right padding of the entire 'Collection Tabs' section, helping to reduce any excessive white space on the sides and giving your products a slightly more edge-to-edge feel, while still maintaining some breathing room.

A note on !important: While generally advised to use sparingly, it's often necessary in theme customization to override existing theme styles, especially when dealing with complex or deeply nested CSS rules.

Step-by-Step Implementation Guide

Ready to implement this improvement on your Shopify store? Follow these steps carefully:

  1. Backup Your Theme: Before making any code changes, always duplicate your live theme. Go to Online Store > Themes, find your current theme, click Actions > Duplicate. This creates a safe rollback point.
  2. Access Theme Code: In your Shopify admin, go to Online Store > Themes. On your live theme (or the duplicate you're working on), click Actions > Edit code.
  3. Locate Your CSS File: In the left sidebar, navigate to the Assets folder. Look for files like base.css, theme.css, styles.css, or similar. The exact name can vary by theme. If you can't find a dedicated CSS file, you can also paste the code within tags in your theme.liquid file, ideally just before the closing tag.
  4. Paste the Code: Scroll to the very bottom of your chosen CSS file and paste the entire CSS block provided above.
  5. Save Changes: Click the Save button in the top right corner.
  6. Preview and Test: Open your store on a mobile device or use your browser's developer tools to simulate a mobile screen. Navigate to the 'Collection Tabs' section on your homepage to confirm the changes. Clear your browser cache if the changes don't appear immediately.

Beyond the Code: Best Practices for Shopify Theme Customization

While this specific customization is straightforward, it highlights broader principles for working with Shopify themes:

  • Always Back Up: This cannot be stressed enough. A backup saves you from potential headaches.
  • Test Thoroughly: Check your changes on various devices, browsers, and screen sizes to ensure everything looks and functions as expected.
  • Understand the Impact: Be mindful that custom code might need adjustments if your theme receives a major update from the developer.
  • Consider Professional Help: For complex customizations, or if you're not comfortable with code, don't hesitate to hire a Shopify expert.

Conclusion

Optimizing your Shopify store for mobile is a continuous journey, and tweaking elements like product card layouts can significantly enhance your customer's shopping experience. By implementing this simple CSS customization for the Reformation theme, you can transform a cramped mobile display into a spacious, engaging, and conversion-friendly showcase for your products.

At Shopping Cart Mover, we're not just experts in seamless e-commerce migrations; we also understand the nuances of Shopify theme development and customization. If you're looking to elevate your store's design, improve its functionality, or need assistance with more complex integrations, our team is here to help you build a truly exceptional online presence.

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases