/*
Theme Name: IMS by Soul Country
Description: A modern block theme for IMS Company with WooCommerce support
Version: 2.6.0
Author: Soul Country
Text Domain: ims-by-soulcountry
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: block-theme, e-commerce, modern, responsive
*/

/*
 * Font & typography styles.
 * Moved to theme.json.
 */

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

* {
    box-sizing: border-box;
}

/* Reserve scrollbar gutter permanently so that opening modal-style
   overlays (mega menu, drawers) that set body overflow:hidden doesn't
   cause the page to reflow and shift hover targets out from under the
   cursor. Fixes mega-menu hover flicker. */
html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--wp--preset--font-family--helvetica);
    line-height: 1.6;
}



.desktop-nav .wp-block-navigation a {
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-nav .wp-block-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-gold-light) !important;
}

/* Add dropdown arrow for navigation items */
.desktop-nav .wp-block-navigation li:nth-child(2) a::after {
    content: "▼";
    font-size: 12px;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.desktop-nav .wp-block-navigation li:nth-child(2):hover a::after {
    transform: rotate(180deg);
    color: var(--color-gold-light);
}

/* ==========================================================================
   Header Actions
   ========================================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 300px;
    justify-content: flex-end;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.header-search-form {
    position: relative;
}

.header-search-form .wp-block-search__inside-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    border: none;
}

.header-search-form .wp-block-search__input {
    border: none !important;
    padding: 0.75rem 1rem;
    flex-grow: 1;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: var(--color-dark);
    margin: 0;
}

.header-search-form .wp-block-search__input::placeholder {
    color: #666;
    font-size: 13px;
}

.header-search-form .wp-block-search__button {
    background: var(--color-cta) !important;
    border: none !important;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    margin: 0;
    min-width: auto;
}

.header-search-form .wp-block-search__button:hover {
    background: var(--color-cta-hover) !important;
}

.header-search-form .wp-block-search__button svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Account Links & Cart
   ========================================================================== */

.header-account-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.account-link:hover {
    color: var(--color-gold-light);
}

.header-actions .wp-block-woocommerce-mini-cart {
    margin-left: 0.5rem;
}

.header-actions .wp-block-woocommerce-mini-cart .wc-block-mini-cart__button {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.header-actions .wp-block-woocommerce-mini-cart .wc-block-mini-cart__button:hover {
    color: var(--color-gold-light) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   Mega Menu
   ========================================================================== */

.mega-menu-container {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.mega-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.mega-menu-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
}

.mega-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mega-menu-close:hover {
    background: #f0f0f0;
    color: var(--color-dark);
}

/* Category styles moved to blocks/mega-menu/style.css */

.mega-menu-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.view-all-categories {
    display: inline-block;
    background: var(--color-cta);
    color: white;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-all-categories:hover {
    background: var(--color-cta-hover);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--color-dark);
    color: white;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-search {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.mobile-search input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-dark);
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.mobile-nav a:hover {
    background: #f8f9fa;
    color: var(--color-cta);
}

.has-submenu {
    position: relative;
}

.has-submenu > a {
    padding-right: 3rem;
}

.submenu-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    color: #666;
}

.submenu {
    display: none;
    background: #f8f9fa;
    padding-left: 1rem;
}

.submenu.active {
    display: block;
}

.submenu a {
    padding: 0.75rem 1.5rem;
    font-size: 14px;
    color: #666;
}

.show-more {
    background: none;
    border: none;
    color: var(--color-cta);
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    text-align: left;
    width: 100%;
    font-size: 14px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet and below */
@media (max-width: 1024px) {
    .header-search-form .wp-block-search__inside-wrapper {
        min-width: 200px;
    }
    
    .main-header .header-content {
        padding: 1rem;
        gap: 1rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .header-search-form {
        display: none;
    }
    
    .header-account-cart {
        display: none;
    }
    
    .header-actions {
        min-width: auto;
        gap: 1rem;
    }
    
    .main-header .header-content {
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .header-logo {
        min-width: auto;
        gap: 0.75rem;
    }
    
    .header-logo .wp-block-site-title a {
        font-size: 1.4rem;
    }
    
    .mega-menu-content {
        padding: 1rem;
    }
    
    .promo-banner p {
        font-size: 12px;
        padding: 0 1rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header-logo .wp-block-site-title a {
        font-size: 1.2rem;
    }
    
    .mobile-menu {
        width: 100%;
        max-width: none;
    }
    
    .header-logo {
        gap: 0.5rem;
    }
    
    .header-logo .wp-block-site-logo img {
        height: 32px;
    }
}

/* Hamburger animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Accessibility */
.mobile-menu-toggle:focus,
.header-search-form .wp-block-search__button:focus,
.mega-menu-close:focus {
    outline: 2px solid var(--color-gold-light);
    outline-offset: 2px;
}

/* Body scroll lock */
body.mobile-menu-open,
body.mega-menu-open {
    overflow: hidden;
}

/* Additional WordPress block overrides */
.main-header .wp-block-group {
    margin-bottom: 0;
    margin-top: 0;
}

.main-header .wp-block-group__inner-container {
    padding: 0;
}

/* Ensure proper z-indexing */
/* Header template-part: flatten so sticky children can stick to viewport. */
header.wp-block-template-part {
    display: contents;
}

footer.wp-block-template-part {
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   Mobile Search Toggle & Panel (Compact Header)
   ========================================================================== */

/* Legacy .mobile-search-toggle visual rules removed — the button is
   styled via the shared .header-icon rule in blocks/header-actions/style.css
   so it matches the account/quote/cart icons. */

.mobile-search-panel {
    display: none;
}

@media (max-width: 768px) {
    .compact-search {
        display: none !important;
    }

    .mobile-search-toggle {
        display: flex;
    }

    .mobile-search-panel {
        display: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-search-panel.is-open {
        display: block;
    }

    .mobile-search-panel .ims-product-search {
        z-index: 100000;
    }

    .mobile-search-panel .ims-search-dropdown {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: 65vh;
        border-radius: 16px 16px 0 0;
        border: none;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    }
}

/* Additional search form enhancements */
.header-search-form.focused .wp-block-search__inside-wrapper {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    transform: scale(1.02);
}

/* Fix search button icon */
.header-search-form .wp-block-search__button svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Mobile search enhancements */
.mobile-search form {
    width: 100%;
}

.mobile-search input {
    width: 100%;
    box-sizing: border-box;
}

/* Navigation menu specific styling */
.ims-header-nav .wp-block-navigation__container {
    gap: 2rem;
}

.ims-header-nav .wp-block-navigation-item a {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mega menu trigger styling - now handled by mega-menu block */
/* .mega-menu-trigger is styled in blocks/mega-menu/style.css */

/* WooCommerce mini cart styling improvements */
.header-actions .wp-block-woocommerce-mini-cart .wc-block-mini-cart__button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    min-height: auto;
}

/* Better button reset for custom buttons */
.mobile-menu-toggle,
.mega-menu-close,
.mobile-menu-close,
.submenu-toggle {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* ==========================================================================
   Global Fowkes-Inspired Styles
   ========================================================================== */

:root {
    --color-primary: var(--wp--preset--color--primary);
    --color-gold-dark: var(--wp--preset--color--gold-dark);
    --color-gold-accent: var(--wp--preset--color--gold-accent);
    --color-dark: var(--wp--preset--color--dark);
    --color-dark-2: var(--wp--preset--color--dark-2);
    --color-dark-charcoal: var(--wp--preset--color--dark-charcoal);
    --color-gray-50: var(--wp--preset--color--gray-50);
    --color-text-muted: var(--wp--preset--color--text-muted);
    --color-gray: var(--wp--preset--color--secondary);
    --color-light-gray: var(--wp--preset--color--light-gray);
    --color-bg-light: var(--wp--preset--color--light);
    --color-border: var(--wp--preset--color--border);
    --color-cta: var(--wp--preset--color--cta);
    --color-cta-hover: var(--wp--preset--color--cta-hover);
    --color-gold: var(--wp--preset--color--gold);
    --color-gold-light: var(--wp--preset--color--gold-light);
    --color-gold-pale: var(--wp--preset--color--gold-pale);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.wp-block-button__link,
button[type="submit"],
.button {
    background: var(--color-cta);
    color: var(--color-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wp-block-button__link:hover,
button[type="submit"]:hover,
.button:hover {
    background: var(--color-cta-hover);
    box-shadow: 0 2px 8px rgba(249, 196, 87, 0.3);
}

/* Links */
a {
    color: var(--color-cta);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-cta-hover);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-dark);
    font-weight: 700;
    line-height: 1.2;
}

/* Logo styling */
.wp-block-site-logo img {
    max-height: 50px;
    width: auto;
}

.wp-block-site-title a {
    font-style: italic;
    font-weight: 700;
    text-decoration: none;
}

/* Ensure proper spacing for sections */
section,
.wp-block-group {
    position: relative;
}

/* Remove gap between header and first content section */
.wp-site-blocks > .wp-block-cover:first-of-type,
.wp-site-blocks > .alignfull:first-of-type {
    margin-top: 0 !important;
}

/* Reduce header-to-content gap on product listing pages */
body.archive.woocommerce .wp-site-blocks,
body.post-type-archive-product .wp-site-blocks,
body.tax-product_cat .wp-site-blocks {
    gap: 0;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==========================================================================
   Footer
   --------------------------------------------------------------------------
   The site footer ships its own dark theme via the ims/site-footer block
   (blocks/site-footer/style.css). Older selectors that targeted nested
   wp-block-* children (heading/navigation/social-links) are obsolete now
   that the block renders a custom DOM, so nothing lives here intentionally.
   ========================================================================== */

/* ==========================================================================
   WooCommerce Mini Cart Header Override
   Force header to match quote drawer design
   ========================================================================== */
html body .wc-block-mini-cart__drawer .wc-block-components-drawer__header,
html body .wc-block-mini-cart__drawer [class*="Header"],
html body .wc-block-mini-cart__drawer [class*="header"],
html body .wc-block-components-drawer .wc-block-mini-cart__drawer > div > div:first-child {
    background: linear-gradient(135deg, var(--color-dark-charcoal) 0%, var(--color-primary) 100%) !important;
    background-color: var(--color-dark-charcoal) !important;
    background-image: none !important;
    border-bottom: none !important;
    padding: 1.25rem 1.5rem !important;
    min-height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Mini cart title styling */
html body .wc-block-mini-cart__drawer .wc-block-mini-cart__title {
    color: #fff !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    background: transparent !important;
}

/* Mini cart close button */
html body .wc-block-mini-cart__drawer .wc-block-components-drawer__close {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    color: #fff !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ==========================================================================
   Header Parity — Prototype (promo 1344, header 1440, centred search)
   ========================================================================== */

/* Compact header: cap inner to 1440, allow absolute-centred search */
.compact-header {
    position: sticky;
    top: 0;
    z-index: 1000; /* above .mega-menu-overlay (998) */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    /* Rendered height = 9 + 58 (logo) + 3 = 70px, flush with nav top:70. */
    padding-top: 9px !important;
    padding-bottom: 3px !important;
    display: flex;
    align-items: center;
}
.compact-header > .wp-block-group {
    width: 100%;
    position: static;
}

/* Logo sizing to match prototype */
.compact-header .compact-logo {
    flex-shrink: 0;
}
.compact-header .compact-logo img {
    height: 58px;
    width: auto;
    display: block;
    /* Visual vertical offset baked into compact-header's asymmetric padding
       (padding-top 9px vs padding-bottom 3px) so header height stays a
       clean 70px — matches .ims-mega-menu-wrapper's top:70. */
}

/* Search absolutely centred on header width, 600px max */
@media (min-width: 769px) {
    .compact-header .compact-search {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 600px;
        max-width: calc(100% - 520px);
        z-index: 1;
        padding: 0 !important;
    }
}

/* Dark search-bar variant — override product-search block tokens for header */
.compact-header .ims-product-search--header {
    --search-bg: #1e1e1e;
    --search-border: #666666;
    --search-border-focus: var(--wp--preset--color--primary, #FAB000);
    --search-text: #666666;
    --search-placeholder: #666666;
    --search-radius: 7px;
    max-width: 100%;
}
.compact-header .ims-product-search--header .ims-search-input-wrapper {
    border-width: 1px;
}
.compact-header .ims-product-search--header .ims-search-input-wrapper:focus-within {
    box-shadow: none;
}

/* Search button: rounded on the right, square on the left */
.compact-header .ims-product-search--header .ims-search-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
}

/* Mobile search panel — mirror the dark compact-header search styling so
   the drop-down search bar matches the desktop header's search bar. */
.mobile-search-panel .ims-product-search--header {
    --search-bg: #1e1e1e;
    --search-border: #666666;
    --search-border-focus: var(--wp--preset--color--primary, #FAB000);
    --search-text: #666666;
    --search-placeholder: #666666;
    --search-radius: 7px;
    max-width: 100%;
}
.mobile-search-panel .ims-product-search--header .ims-search-input-wrapper {
    border-width: 1px;
}
.mobile-search-panel .ims-product-search--header .ims-search-input-wrapper:focus-within {
    box-shadow: none;
}
.mobile-search-panel .ims-product-search--header .ims-search-button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
}

/* Header Actions block is styled in blocks/header-actions/style.css */

/* ==========================================================================
   Toast Notifications
   --------------------------------------------------------------------------
   Site-wide container pinned to the top-right. Individual toasts announce
   additions to cart / quote with a slide-in from the right, hold briefly,
   then fade back out. Styled to match the rest of the site: gold accent
   stripe, near-black text on white, subtle shadow.
   ========================================================================== */

.ims-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100vw - 40px);
}

.ims-toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 40px 14px 16px;
    background: #ffffff;
    color: #111111;
    border: 1px solid #e8eaed;
    border-left: 4px solid var(--color-cta, #FAB000);
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    font-family: var(--wp--preset--font-family--helvetica), 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.4;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.ims-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.ims-toast.is-leaving {
    transform: translateX(calc(100% + 24px));
    opacity: 0;
}

.ims-toast--success { border-left-color: var(--color-cta, #FAB000); }
.ims-toast--error   { border-left-color: #dc2626; }

.ims-toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-cta, #FAB000);
    color: #111111;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    margin-top: 1px;
}

.ims-toast--error .ims-toast__icon {
    background: #dc2626;
    color: #ffffff;
}

.ims-toast__thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f3f4f6;
    border: 1px solid #e8eaed;
    overflow: hidden;
    margin-top: 1px;
}

.ims-toast__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ims-toast__body { flex: 1 1 auto; min-width: 0; }

.ims-toast__title {
    margin: 0 0 2px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111111;
}

.ims-toast__message {
    margin: 0;
    color: #374151;
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ims-toast__message strong {
    font-weight: 600;
    color: #111111;
}

.ims-toast__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ims-toast__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.ims-toast__action--primary {
    background: var(--color-cta, #FAB000);
    color: #111111;
    border: 1px solid var(--color-cta, #FAB000);
}

.ims-toast__action--primary:hover,
.ims-toast__action--primary:focus-visible {
    background: #e69e00;
    border-color: #e69e00;
    color: #111111;
    text-decoration: none;
}

/* Cart variant — mirrors `.ims-add-to-cart`: dark filled with hover invert. */
.ims-toast__action--cart {
    background: var(--ims-button-dark, #111111);
    color: #ffffff;
    border: 1px solid var(--ims-button-dark, #111111);
}

.ims-toast__action--cart:hover,
.ims-toast__action--cart:focus-visible {
    background: transparent;
    color: var(--ims-button-dark, #111111);
    border-color: var(--ims-button-dark, #111111);
    text-decoration: none;
}

/* Quote variant — mirrors `.ims-products-grid .ims-add-to-quote`:
   transparent with gold border and gold text. */
.ims-toast__action--quote {
    background: transparent;
    color: var(--color-cta, #FAB000);
    border: 1.5px solid var(--color-cta, #FAB000);
}

.ims-toast__action--quote:hover,
.ims-toast__action--quote:focus-visible {
    background: var(--color-gold-light, #FDE17F);
    color: var(--color-cta, #FAB000);
    border-color: var(--color-cta, #FAB000);
    text-decoration: none;
}

.ims-toast__action--secondary {
    background: transparent;
    color: #111111;
    border: 1px solid #d1d5db;
}

.ims-toast__action--secondary:hover,
.ims-toast__action--secondary:focus-visible {
    background: #f3f4f6;
    color: #111111;
    text-decoration: none;
}

.ims-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ims-toast__close:hover,
.ims-toast__close:focus-visible {
    background: #f3f4f6;
    color: #111111;
}

@media (max-width: 480px) {
    .ims-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ims-toast { transition: opacity 0.2s ease; transform: none; }
    .ims-toast.is-leaving { transform: none; }
}
 