/** * Bongoto — Cart Icon Styles (Compact + Centered) * Works on all header variants (1–5) */ :root { /* Increase to 36px if you want it slightly larger */ --bt-cart-size: 34px; --bt-cart-bg: #f9fafb; /* Subtle background */ --bt-cart-color: #111827; --bt-cart-hover-bg: #e5e7eb; /* Hover background */ --bt-cart-accent: #2563eb; /* Badge color */ --bt-cart-accent-dark: #1d4ed8; } /* --------------------------------- Cart Icon Container ---------------------------------- */ .bt-header-cart, .bt-cart-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--bt-cart-size); height: var(--bt-cart-size); border-radius: 8px; background: var(--bt-cart-bg); color: var(--bt-cart-color); text-decoration: none; cursor: pointer; transition: background 0.25s ease, transform 0.15s ease; vertical-align: middle; } .bt-header-cart:hover, .bt-cart-icon:hover { background: var(--bt-cart-hover-bg); transform: translateY(-2px); } /* --------------------------------- Dashicon / SVG Alignment ---------------------------------- */ .bt-header-cart .dashicons, .bt-cart-icon .dashicons { font-size: 17px; line-height: 1; color: var(--bt-cart-color); display: inline-flex; align-items: center; justify-content: center; height: 100%; width: 100%; transition: color 0.25s ease; } .bt-header-cart:hover .dashicons, .bt-cart-icon:hover .dashicons { color: var(--bt-cart-accent); } /* --------------------------------- Cart Count Badge ---------------------------------- */ .bt-cart-count, .bt-header-cart .cart-count { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bt-cart-accent); color: #fff; font-size: 11px; font-weight: 600; line-height: 16px; text-align: center; display: inline-block; box-shadow: 0 1px 3px rgba(0,0,0,.2); transform: scale(1); transform-origin: top right; transition: transform 0.2s ease-in-out; } .bt-header-cart:hover .bt-cart-count { transform: scale(1.1); } /* --------------------------------- WooCommerce Mini Cart Overlay (optional) ---------------------------------- */ .bt-cart-panel { position: absolute; top: calc(100% + 10px); right: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,.1); padding: 10px; min-width: 280px; z-index: 1000; display: none; } .bt-header-cart:hover .bt-cart-panel { display: block; } /* --------------------------------- Responsive Adjustments ---------------------------------- */ @media (max-width: 768px) { .bt-header-cart, .bt-cart-icon { width: 32px; height: 32px; border-radius: 7px; } .bt-cart-count { min-width: 13px; height: 13px; font-size: 10px; line-height: 13px; } .bt-header-cart .dashicons, .bt-cart-icon .dashicons { font-size: 16px; } }