/**
 * Sparklevida Floating Menu
 * Beautiful circular floating navigation
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --svfm-bg: #2d2d2d;
    --svfm-icon: #B76E79;
    --svfm-text: #ffffff;
    --svfm-glass: rgba(0, 0, 0, 0.6);
    --svfm-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --svfm-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.4);
    --svfm-transition: cubic-bezier(0.4, 0, 0.2, 1);
    --svfm-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ========================================
   SEO NAVIGATION (Hidden but crawlable)
   ======================================== */
.svfm-seo-nav {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ========================================
   GLASS OVERLAY
   ======================================== */
.svfm-glass-overlay {
    position: fixed;
    inset: 0;
    background: var(--svfm-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--svfm-transition), visibility 0.3s;
    z-index: 99990;
}

.svfm-glass-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   HOME BUTTON (Top Left)
   ======================================== */
.svfm-home-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 58px;
    height: 58px;
    background: var(--svfm-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--svfm-shadow);
    z-index: 99998;
    transition: transform 0.3s var(--svfm-spring), box-shadow 0.3s var(--svfm-transition);
    overflow: hidden;
}

.svfm-home-btn:hover {
    transform: scale(1.08);
    box-shadow: var(--svfm-shadow-hover);
}

.svfm-home-icon {
    width: 28px;
    height: 28px;
    color: var(--svfm-icon);
}

/* ========================================
   MAIN FLOATING MENU
   ======================================== */
.svfm-menu {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    padding: 10px;
    background: rgba(45, 45, 45, 0.95);
    border-radius: 50px;
    box-shadow: var(--svfm-shadow);
    z-index: 99999;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   MAIN MENU BUTTONS
   ======================================== */
.svfm-btn {
    position: relative;
    width: 68px;
    height: 68px;
    background: var(--svfm-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s var(--svfm-spring), box-shadow 0.3s var(--svfm-transition), background 0.3s;
    overflow: visible;
}

.svfm-btn:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: var(--svfm-shadow-hover);
}

.svfm-btn:active {
    transform: scale(0.95);
}

.svfm-btn.active {
    background: var(--svfm-icon);
}

.svfm-btn.active .svfm-btn-icon {
    color: var(--svfm-text);
}

.svfm-btn-icon {
    width: 26px;
    height: 26px;
    color: var(--svfm-icon);
    margin-top: -4px;
    transition: color 0.3s;
}

/* Curved label using SVG */
.svfm-curved-label {
    position: absolute;
    width: 68px;
    height: 68px;
    top: 0;
    left: 0;
    pointer-events: none;
}

.svfm-curved-label text {
    fill: var(--svfm-text);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cart count badge - positioned at bottom */
.svfm-cart-count {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    background: var(--svfm-icon);
    color: var(--svfm-text);
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: svfm-pop-in 0.3s var(--svfm-spring);
    z-index: 5;
}

@keyframes svfm-pop-in {
    0% { transform: translateX(-50%) scale(0); }
    100% { transform: translateX(-50%) scale(1); }
}

/* ========================================
   INDIVIDUAL BUTTONS MODE
   ======================================== */
.svfm-menu.svfm-individual {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    gap: 16px;
}

.svfm-menu.svfm-individual .svfm-btn {
    box-shadow: var(--svfm-shadow);
}

/* ========================================
   TOP MENU POSITION
   ======================================== */
.svfm-menu.svfm-top {
    bottom: auto;
    top: 20px;
}

.svfm-home-btn.svfm-bottom {
    top: auto;
    bottom: 20px;
}

/* When menu is at top, flip the shop submenu */
body.svfm-menu-top .svfm-submenu-shop .svfm-sub-top {
    top: auto;
    bottom: 0;
    transform: translateX(-50%) scale(0);
}

body.svfm-menu-top .svfm-submenu-shop .svfm-sub-left {
    bottom: auto;
    top: 0;
    left: 10px;
    transform: scale(0);
}

body.svfm-menu-top .svfm-submenu-shop .svfm-sub-right {
    bottom: auto;
    top: 0;
    right: 10px;
    transform: scale(0);
}

body.svfm-menu-top .svfm-submenu-shop.active .svfm-sub-top { transform: translateX(-50%) scale(1); }
body.svfm-menu-top .svfm-submenu-shop.active .svfm-sub-left { transform: scale(1); }
body.svfm-menu-top .svfm-submenu-shop.active .svfm-sub-right { transform: scale(1); }

/* Also flip the more submenu when at top */
body.svfm-menu-top .svfm-submenu-more .svfm-sub-top {
    top: auto;
    bottom: 0;
    transform: translateX(-50%) scale(0);
}

body.svfm-menu-top .svfm-submenu-more .svfm-sub-bottom {
    bottom: auto;
    top: 0;
    transform: translateX(-50%) scale(0);
}

body.svfm-menu-top .svfm-submenu-more.active .svfm-sub-top { transform: translateX(-50%) scale(1); }
body.svfm-menu-top .svfm-submenu-more.active .svfm-sub-bottom { transform: translateX(-50%) scale(1); }

/* ========================================
   SUBMENUS
   ======================================== */
.svfm-submenu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99995;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s var(--svfm-transition), visibility 0.3s;
}

.svfm-submenu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* More submenu - Cross pattern (4 items) */
.svfm-submenu-more {
    width: 220px;
    height: 220px;
}

/* Shop submenu - Triangle pattern (3 items) */
.svfm-submenu-shop {
    width: 260px;
    height: 200px;
}

/* ========================================
   SUBMENU BUTTONS
   ======================================== */
.svfm-sub-btn {
    position: absolute;
    width: 78px;
    height: 78px;
    background: var(--svfm-bg);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--svfm-shadow);
    transition: transform 0.3s var(--svfm-spring), box-shadow 0.3s var(--svfm-transition);
    opacity: 0;
    transform: scale(0);
    overflow: visible;
}

.svfm-submenu.active .svfm-sub-btn {
    opacity: 1;
    transform: scale(1);
}

/* Staggered animation delays */
.svfm-submenu.active .svfm-sub-btn:nth-child(1) { transition-delay: 0s; }
.svfm-submenu.active .svfm-sub-btn:nth-child(2) { transition-delay: 0.05s; }
.svfm-submenu.active .svfm-sub-btn:nth-child(3) { transition-delay: 0.1s; }
.svfm-submenu.active .svfm-sub-btn:nth-child(4) { transition-delay: 0.15s; }

.svfm-sub-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: var(--svfm-shadow-hover);
}

/* Disabled submenu buttons (no URL set) */
.svfm-sub-btn.svfm-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.svfm-sub-btn.svfm-disabled:hover {
    transform: scale(1) !important;
    box-shadow: var(--svfm-shadow);
}

.svfm-sub-icon {
    width: 26px;
    height: 26px;
    color: var(--svfm-icon);
    margin-top: -4px;
}

/* Curved label for submenu buttons */
.svfm-sub-curved-label {
    position: absolute;
    width: 72px;
    height: 72px;
    top: 0;
    left: 0;
    pointer-events: none;
}

.svfm-sub-curved-label text {
    fill: var(--svfm-text);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* More submenu positions (Cross pattern) */
.svfm-submenu-more .svfm-sub-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
}

.svfm-submenu-more .svfm-sub-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%) scale(0);
}

.svfm-submenu-more .svfm-sub-bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
}

.svfm-submenu-more .svfm-sub-left {
    top: 50%;
    left: 0;
    transform: translateY(-50%) scale(0);
}

.svfm-submenu-more.active .svfm-sub-top { transform: translateX(-50%) scale(1); }
.svfm-submenu-more.active .svfm-sub-right { transform: translateY(-50%) scale(1); }
.svfm-submenu-more.active .svfm-sub-bottom { transform: translateX(-50%) scale(1); }
.svfm-submenu-more.active .svfm-sub-left { transform: translateY(-50%) scale(1); }

/* Shop submenu positions (Triangle/Pyramid pattern) - more spacing */
.svfm-submenu-shop .svfm-sub-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0);
}

.svfm-submenu-shop .svfm-sub-left {
    bottom: 0;
    left: 10px;
    transform: scale(0);
}

.svfm-submenu-shop .svfm-sub-right {
    bottom: 0;
    right: 10px;
    transform: scale(0);
}

.svfm-submenu-shop.active .svfm-sub-top { transform: translateX(-50%) scale(1); }
.svfm-submenu-shop.active .svfm-sub-left { transform: scale(1); }
.svfm-submenu-shop.active .svfm-sub-right { transform: scale(1); }

/* ========================================
   SUBMENU CLOSE BUTTON
   ======================================== */
.svfm-sub-close {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 56px;
    height: 56px;
    background: var(--svfm-icon);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--svfm-shadow);
    transition: transform 0.3s var(--svfm-spring), background 0.3s;
    z-index: 10;
}

/* Shop submenu close button - centered in triangle (lower position) */
.svfm-submenu-shop .svfm-sub-close {
    top: 58%;
}

.svfm-submenu.active .svfm-sub-close {
    transform: translate(-50%, -50%) scale(1);
    transition-delay: 0.2s;
}

.svfm-sub-close:hover {
    transform: translate(-50%, -50%) scale(1.1) !important;
    background: #a25d67;
}

.svfm-sub-close svg {
    width: 24px;
    height: 24px;
    color: var(--svfm-text);
}

/* When menu is at top, adjust shop close button for flipped layout */
body.svfm-menu-top .svfm-submenu-shop .svfm-sub-close {
    top: 42%;
}

/* Shop submenu close button - position lower due to triangle layout */
.svfm-submenu-shop .svfm-sub-close {
    top: 60%;
}

/* ========================================
   POPUPS
   ======================================== */
.svfm-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--svfm-transition), visibility 0.3s;
    padding: 0 12px;
    box-sizing: border-box;
}

.svfm-popup.active {
    opacity: 1;
    visibility: visible;
}

.svfm-popup-container {
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    background: #fff;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s var(--svfm-spring);
    overflow: hidden;
}

.svfm-popup.active .svfm-popup-container {
    transform: translateY(0);
}

.svfm-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.svfm-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

/* Popup header with cart link */
.svfm-popup-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.svfm-popup-header-left h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.sv-header-cart-link {
    font-size: 13px;
    color: var(--svfm-icon);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sv-header-cart-link:hover {
    color: #a25d67;
    text-decoration: underline;
}

.svfm-popup-close {
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.svfm-popup-close:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.svfm-popup-close svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.svfm-popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for popup */
.svfm-popup-content::-webkit-scrollbar {
    width: 8px;
}

.svfm-popup-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.svfm-popup-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.svfm-popup-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ========================================
   POPUP CONTENT - PREMIUM STYLES (from woo-components)
   ======================================== */

/* CSS Variables for popup content */
.svfm-popup-content {
    --sv-primary: #B76E79;
    --sv-primary-hover: #a25d67;
    --sv-primary-light: rgba(183, 110, 121, 0.1);
    --sv-secondary: #D4AF37;
    --sv-success: #22c55e;
    --sv-success-light: rgba(34, 197, 94, 0.1);
    --sv-error: #ef4444;
    --sv-error-light: rgba(239, 68, 68, 0.1);
    --sv-warning: #f59e0b;
    --sv-bg: #FAFAFA;
    --sv-surface: #FFFFFF;
    --sv-border: #e5e7eb;
    --sv-border-light: #f3f4f6;
    --sv-text: #1f2937;
    --sv-text-secondary: #6b7280;
    --sv-text-muted: #9ca3af;
    --sv-radius: 12px;
    --sv-radius-sm: 8px;
    --sv-radius-lg: 16px;
    --sv-radius-full: 9999px;
    --sv-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --sv-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --sv-transition: all 0.2s ease;
}

/* Cart V2 Variables */
.svfm-cart-content {
    --sv-cart-bg: #ffffff;
    --sv-cart-card-bg: #f8f8f8;
    --sv-cart-border: #f0f0f0;
    --sv-cart-text: #1a1a1a;
    --sv-cart-muted: #888;
    --sv-cart-primary: #B76E79;
    --sv-cart-primary-light: rgba(183, 110, 121, 0.1);
    --sv-cart-gold: #D4AF37;
    --sv-cart-danger: #ef4444;
    --sv-cart-success: #22c55e;
    --sv-cart-radius: 16px;
    --sv-cart-radius-sm: 12px;
}

/* ========================================
   CART POPUP STYLES - V2 Premium Design
   ======================================== */

/* Cart Popup Container Override */
.svfm-cart-popup-container {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
}

/* Cart Header with View Full Cart Link */
.svfm-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.svfm-cart-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.svfm-cart-header-left h3 {
    margin: 0;
}

.svfm-view-full-cart-link {
    font-size: 12px;
    color: var(--svfm-icon);
    text-decoration: none;
    padding: 4px 10px;
    background: rgba(183, 110, 121, 0.1);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.svfm-view-full-cart-link:hover {
    background: rgba(183, 110, 121, 0.2);
    color: var(--svfm-icon);
}

/* Cart Content - Flex Container for Scroll + Sticky */
.svfm-popup-content.svfm-cart-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

/* Scrollable Cart Items Area */
.svfm-cart-items-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.svfm-cart-items-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.svfm-cart-items-scroll-area::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.svfm-cart-items-scroll-area::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.svfm-cart-items-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.svfm-cart-items-v2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.svfm-cart-items-v2::-webkit-scrollbar {
    width: 8px;
}

.svfm-cart-items-v2::-webkit-scrollbar-track {
    background: var(--sv-cart-card-bg);
    border-radius: 4px;
}

.svfm-cart-items-v2::-webkit-scrollbar-thumb {
    background: var(--sv-cart-border);
    border-radius: 4px;
}

.svfm-cart-items-v2::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Cart Card */
.sv-cart-card {
    display: flex;
    align-items: stretch;
    background: var(--sv-cart-card-bg);
    border-radius: var(--sv-cart-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sv-cart-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sv-cart-card-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
    min-width: 0;
}

.sv-cart-card-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: var(--sv-cart-radius-sm);
    overflow: hidden;
    background: #fff;
}

.sv-cart-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sv-cart-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sv-cart-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-cart-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.sv-cart-card-variant {
    font-size: 12px;
    color: var(--sv-cart-muted);
    margin: 0;
}

.sv-cart-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--sv-cart-primary);
    margin: 4px 0 0 0;
}

/* Quantity Controls V2 */
.sv-cart-card-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border-radius: 24px;
    padding: 3px;
    margin-top: 6px;
}

.sv-qty-btn-v2 {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--sv-cart-text);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
}

.sv-qty-btn-v2:hover {
    background: var(--sv-cart-primary-light);
    color: var(--sv-cart-primary);
}

.sv-qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-cart-text);
}

/* Delete Button - Swipe Style */
.sv-cart-card-delete {
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sv-cart-danger);
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sv-cart-card-delete:hover {
    background: #dc2626;
    width: 64px;
}

.sv-cart-card-delete svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.sv-cart-card-delete:hover svg {
    transform: scale(1.1);
}

/* Sticky Footer Area */
.svfm-cart-sticky-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid var(--sv-cart-border);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

/* Coupon Section V2 */
.sv-coupon-section {
    padding: 12px 16px;
    border-top: none;
}

.sv-coupon-form-v2 {
    display: flex;
    gap: 8px;
}

.sv-coupon-input-v2 {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--sv-cart-border);
    border-radius: var(--sv-cart-radius-sm);
    font-size: 14px;
    background: var(--sv-cart-card-bg);
    transition: border-color 0.2s;
}

.sv-coupon-input-v2:focus {
    outline: none;
    border-color: var(--sv-cart-primary);
}

.sv-coupon-input-v2::placeholder {
    color: var(--sv-cart-muted);
}

.sv-coupon-apply-btn {
    padding: 12px 18px;
    background: var(--sv-cart-gold);
    color: #fff;
    border: none;
    border-radius: var(--sv-cart-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sv-coupon-apply-btn:hover {
    background: #c9a230;
    transform: translateY(-1px);
}

/* Applied Coupons V2 */
.sv-applied-coupons-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sv-coupon-tag-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--sv-cart-primary-light);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sv-cart-primary);
}

.sv-coupon-tag-v2 svg {
    width: 14px;
    height: 14px;
}

.sv-coupon-remove-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    background: rgba(183, 110, 121, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--sv-cart-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.sv-coupon-remove-v2:hover {
    background: var(--sv-cart-primary);
    color: #fff;
}

.sv-coupon-remove-v2 svg {
    width: 10px;
    height: 10px;
}

/* Totals V2 */
.sv-cart-totals-v2 {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 16px;
}

.sv-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--sv-cart-text);
}

.sv-discount-row {
    color: var(--sv-cart-success);
}

.sv-total-final {
    padding-top: 10px;
    border-top: 1px dashed var(--sv-cart-border);
    font-size: 16px;
    font-weight: 700;
}

.sv-total-final span:last-child {
    color: var(--sv-cart-primary);
    font-size: 20px;
}

/* Checkout Button V2 */
.sv-checkout-btn-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 32px);
    margin: 8px 16px 16px;
    padding: 16px 20px;
    background: var(--sv-cart-primary);
    color: #fff;
    border: none;
    border-radius: var(--sv-cart-radius);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sv-checkout-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sv-checkout-total {
    font-size: 16px;
    font-weight: 700;
    opacity: 0.95;
}

.sv-checkout-btn-v2:hover {
    background: #a25d67;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(183, 110, 121, 0.3);
    color: #fff;
}

.sv-checkout-btn-v2 svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.sv-checkout-btn-v2:hover svg {
    transform: translateX(4px);
}

/* View Cart Link - Now in header, these are legacy fallback styles */
.sv-view-cart-link {
    display: none;
}

/* Empty Cart V2 */
.sv-cart-empty-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
}

.sv-cart-empty-icon {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sv-cart-card-bg);
    border-radius: 50%;
    margin-bottom: 20px;
    color: var(--sv-cart-muted);
}

.sv-cart-empty-icon svg {
    width: 48px;
    height: 48px;
}

.sv-cart-empty-v2 h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--sv-cart-text);
}

.sv-cart-empty-v2 p {
    font-size: 14px;
    color: var(--sv-cart-muted);
    margin: 0 0 20px;
}

.sv-cart-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--sv-cart-primary);
    color: #fff;
    border-radius: var(--sv-cart-radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sv-cart-shop-btn:hover {
    background: #a25d67;
    transform: translateY(-2px);
    color: #fff;
}

/* ========================================
   ACCOUNT POPUP STYLES - V2 Premium Design
   ======================================== */
.sv-account-popup {
    padding: 20px;
}

/* Auth Toggle (Login/Register) */
.sv-auth-toggle {
    display: flex;
    background: var(--sv-border-light);
    border-radius: var(--sv-radius-full);
    padding: 4px;
    margin-bottom: 20px;
}

.sv-auth-toggle-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--sv-radius-full);
    cursor: pointer;
    transition: var(--sv-transition);
}

.sv-auth-toggle-btn.active {
    background: var(--sv-surface);
    color: var(--sv-text);
    box-shadow: var(--sv-shadow-sm);
}

.sv-auth-panel {
    display: none;
}

.sv-auth-panel.active {
    display: block;
    animation: sv-fade-in 0.3s ease;
}

@keyframes sv-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Elements */
.sv-form-group {
    margin-bottom: 14px;
}

.sv-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sv-text);
    margin-bottom: 6px;
}

.sv-form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: var(--sv-text);
    background: var(--sv-surface);
    border: 1.5px solid var(--sv-border);
    border-radius: var(--sv-radius-sm);
    transition: var(--sv-transition);
    outline: none;
    min-height: 50px;
    box-sizing: border-box;
}

.sv-form-group input:focus {
    border-color: var(--sv-primary);
    box-shadow: 0 0 0 3px var(--sv-primary-light);
}

.sv-form-group input::placeholder {
    color: var(--sv-text-muted);
}

.sv-form-row {
    display: flex;
    gap: 12px;
}

.sv-form-row-2 > * {
    flex: 1;
}

.sv-form-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sv-password-wrapper {
    position: relative;
}

.sv-password-wrapper input {
    padding-right: 44px;
}

.sv-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--sv-text-muted);
    transition: var(--sv-transition);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-password-toggle:hover {
    color: var(--sv-text);
}

.sv-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sv-text-secondary);
    cursor: pointer;
}

.sv-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--sv-primary);
}

.sv-forgot-link {
    font-size: 13px;
    color: var(--sv-primary);
    text-decoration: none;
}

.sv-forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.sv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--sv-radius-full);
    cursor: pointer;
    transition: var(--sv-transition);
    border: 2px solid transparent;
}

.sv-btn-primary {
    background: var(--sv-primary);
    color: #fff;
    border-color: var(--sv-primary);
}

.sv-btn-primary:hover {
    background: var(--sv-primary-hover);
    border-color: var(--sv-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--sv-shadow);
}

.sv-btn-outline {
    background: transparent;
    color: var(--sv-primary);
    border-color: var(--sv-primary);
}

.sv-btn-outline:hover {
    background: var(--sv-primary);
    color: #fff;
}

.sv-btn-full {
    width: 100%;
}

.sv-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sv-btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sv-spin 0.8s linear infinite;
}

.sv-btn.loading .sv-btn-text {
    opacity: 0;
}

.sv-btn.loading .sv-btn-loader {
    display: block;
    position: absolute;
}

@keyframes sv-spin {
    to { transform: rotate(360deg); }
}

.sv-form-messages {
    margin: 12px 0;
}

.sv-form-messages.sv-form-error {
    padding: 12px 14px;
    border-radius: var(--sv-radius-sm);
    font-size: 13px;
    background: var(--sv-error-light);
    color: var(--sv-error);
    margin-bottom: 16px;
}

.sv-form-message {
    padding: 12px 14px;
    border-radius: var(--sv-radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sv-form-message-error {
    background: var(--sv-error-light);
    color: var(--sv-error);
}

.sv-terms-note {
    font-size: 12px;
    color: var(--sv-text-muted);
    text-align: center;
    margin-top: 14px;
}

.sv-terms-note a {
    color: var(--sv-primary);
    text-decoration: none;
}

.sv-form-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 14px;
}

.sv-form-divider::before,
.sv-form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sv-border);
}

.sv-form-divider span {
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Account Header (Logged In) */
.sv-account-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sv-border-light);
    margin-bottom: 16px;
}

.sv-account-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.sv-account-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sv-primary), #a25d67);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-account-info {
    flex: 1;
    min-width: 0;
}

.sv-account-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--sv-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.sv-account-email {
    display: block;
    font-size: 13px;
    color: var(--sv-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0 0 0;
}

/* Account Pills */
.sv-account-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.sv-pill {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sv-text-secondary);
    background: var(--sv-border-light);
    border: none;
    border-radius: var(--sv-radius-full);
    cursor: pointer;
    transition: var(--sv-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.sv-pill:hover {
    background: var(--sv-border);
}

.sv-pill.active {
    background: var(--sv-primary);
    color: #fff;
}

/* Account Panels */
.sv-account-panel {
    display: none;
}

.sv-account-panel.active {
    display: block;
    animation: sv-fade-in 0.3s ease;
}

/* Order Cards */
.sv-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sv-order-card {
    background: var(--sv-bg);
    border: 1px solid var(--sv-border-light);
    border-radius: var(--sv-radius);
    padding: 12px;
    transition: var(--sv-transition);
}

.sv-order-card:hover {
    border-color: var(--sv-border);
    box-shadow: var(--sv-shadow-sm);
}

.sv-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sv-order-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--sv-text);
}

.sv-order-status {
    display: inline-flex;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--sv-radius-full);
}

.sv-status-processing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.sv-status-completed {
    background: var(--sv-success-light);
    color: var(--sv-success);
}

.sv-status-pending,
.sv-status-on-hold {
    background: rgba(245, 158, 11, 0.1);
    color: var(--sv-warning);
}

.sv-status-cancelled,
.sv-status-failed,
.sv-status-refunded {
    background: var(--sv-error-light);
    color: var(--sv-error);
}

.sv-order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--sv-text-secondary);
    margin-bottom: 8px;
}

.sv-order-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sv-order-date svg {
    width: 12px;
    height: 12px;
}

.sv-order-total {
    font-weight: 600;
    color: var(--sv-text);
}

.sv-order-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: var(--sv-text-muted);
    margin-bottom: 8px;
}

.sv-order-item-name {
    background: var(--sv-surface);
    padding: 3px 6px;
    border-radius: 4px;
}

.sv-order-more {
    color: var(--sv-primary);
    font-weight: 500;
}

.sv-order-view {
    font-size: 12px;
    font-weight: 600;
    color: var(--sv-primary);
    text-decoration: none;
}

.sv-order-view:hover {
    text-decoration: underline;
}

/* Account Footer */
.sv-account-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px 0;
    margin-top: 14px;
    border-top: 1px solid var(--sv-border-light);
}

.sv-logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--sv-radius);
    transition: all 0.2s ease;
}

.sv-logout-link:hover {
    color: var(--sv-error);
    background: var(--sv-error-light);
}

.sv-view-all-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--sv-primary);
    text-decoration: none;
}

/* ========================================
   ADDRESS CARDS - Account Popup
   ======================================== */
.sv-addresses-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sv-address-card {
    background: var(--sv-bg);
    border: 1px solid var(--sv-border-light);
    border-radius: var(--sv-radius);
    padding: 16px;
    transition: var(--sv-transition);
}

.sv-address-card:hover {
    border-color: var(--sv-border);
}

.sv-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.sv-address-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sv-address-header h4 svg {
    color: var(--sv-primary);
}

.sv-address-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sv-primary);
    background: var(--sv-primary-light);
    border: none;
    border-radius: var(--sv-radius-full);
    cursor: pointer;
    transition: var(--sv-transition);
}

.sv-address-edit-btn:hover {
    background: var(--sv-primary);
    color: #fff;
}

.sv-address-content {
    font-size: 13px;
    line-height: 1.6;
    color: var(--sv-text-secondary);
}

.sv-address-content p {
    margin: 0;
}

.sv-address-name {
    font-weight: 600;
    color: var(--sv-text);
    margin-bottom: 4px !important;
}

.sv-address-phone {
    margin-top: 6px !important;
    color: var(--sv-text);
}

.sv-address-empty {
    font-style: italic;
    color: var(--sv-text-muted);
}

/* Address Form */
.sv-address-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--sv-border-light);
    animation: sv-fade-in 0.3s ease;
}

.sv-address-form .sv-form-group {
    margin-bottom: 10px;
}

.sv-address-form .sv-form-group label {
    font-size: 12px;
    margin-bottom: 4px;
}

.sv-address-form .sv-form-group input {
    padding: 10px 12px;
    font-size: 13px;
}

.sv-address-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.sv-address-form-actions .sv-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
}

/* Address Section Styles */
.sv-address-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sv-border-light);
}

.sv-address-section:last-of-type {
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}

.sv-address-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--sv-text);
    margin: 0 0 14px 0;
}

.sv-address-title svg {
    color: var(--sv-primary);
}

.sv-copy-billing {
    margin: 0 0 14px 0;
    padding: 10px 14px;
    background: var(--sv-primary-light);
    border-radius: var(--sv-radius-sm);
}

.sv-shipping-fields {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.sv-shipping-fields.hidden {
    opacity: 0.4;
    pointer-events: none;
}

/* Account Form */
.sv-account-form .sv-form-group,
.sv-address-form .sv-form-group {
    margin-bottom: 12px;
}

.sv-account-form select,
.sv-address-form select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--sv-text);
    background: var(--sv-surface);
    border: 1.5px solid var(--sv-border);
    border-radius: var(--sv-radius-sm);
    transition: var(--sv-transition);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.sv-account-form select:focus,
.sv-address-form select:focus {
    border-color: var(--sv-primary);
    box-shadow: 0 0 0 3px var(--sv-primary-light);
}

/* Account Form Save Button */
.sv-btn-save {
    margin-top: 8px;
}

.sv-view-all-link:hover {
    text-decoration: underline;
}

.sv-logout-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--sv-text-muted);
    text-decoration: none;
    transition: var(--sv-transition);
}

.sv-logout-link:hover {
    color: var(--sv-error);
}

.sv-logout-link svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.sv-empty-state {
    text-align: center;
    padding: 30px 16px;
}

.sv-empty-state svg {
    color: var(--sv-text-muted);
    margin-bottom: 12px;
}

.sv-empty-state p {
    font-size: 14px;
    color: var(--sv-text-secondary);
    margin: 8px 0 14px;
}

/* ========================================
   LEGACY CART POPUP STYLES (kept for fallback)
   ======================================== */
.svfm-cart-items {
    padding: 0 20px;
    max-height: 40vh;
    overflow-y: auto;
}

.svfm-cart-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
}

.svfm-cart-item:last-child {
    border-bottom: none;
}

.svfm-cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f9fafb;
}

.svfm-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.svfm-cart-item-details {
    flex: 1;
    min-width: 0;
}

.svfm-cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svfm-cart-item-meta {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.svfm-cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--svfm-icon);
}

.svfm-cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
}

.svfm-cart-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #fff;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.svfm-cart-qty-btn:hover {
    background: #e5e7eb;
}

.svfm-cart-qty-input {
    width: 36px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.svfm-cart-qty-input::-webkit-inner-spin-button,
.svfm-cart-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.svfm-cart-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    flex-shrink: 0;
}

.svfm-cart-item-remove:hover {
    color: #ef4444;
}

.svfm-cart-item-remove svg {
    width: 18px;
    height: 18px;
}

/* Empty cart */
.svfm-cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.svfm-cart-empty svg {
    width: 48px;
    height: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.svfm-cart-empty p {
    margin: 0;
    font-size: 15px;
}

/* Coupon section */
.svfm-coupon-section {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
    background: #fafafa;
}

.svfm-coupon-form {
    display: flex;
    gap: 8px;
}

.svfm-coupon-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.svfm-coupon-input:focus {
    outline: none;
    border-color: var(--svfm-icon);
}

.svfm-coupon-btn {
    padding: 12px 18px;
    background: var(--svfm-bg);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.svfm-coupon-btn:hover {
    background: #1f1f1f;
}

.svfm-coupon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.svfm-coupon-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ecfdf5;
    border-radius: 10px;
    margin-top: 10px;
}

.svfm-coupon-applied-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #059669;
    font-size: 14px;
    font-weight: 600;
}

.svfm-coupon-applied-text svg {
    width: 18px;
    height: 18px;
}

.svfm-coupon-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svfm-coupon-remove:hover {
    color: #ef4444;
}

.svfm-coupon-remove svg {
    width: 16px;
    height: 16px;
}

/* Cart footer */
.svfm-cart-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}

.svfm-cart-totals {
    margin-bottom: 16px;
}

.svfm-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #6b7280;
}

.svfm-cart-total-row.discount {
    color: #059669;
}

.svfm-cart-total-row.total {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 4px;
}

.svfm-checkout-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--svfm-icon), #a25d67);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.svfm-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(183, 110, 121, 0.3);
    color: #fff;
}

.svfm-view-cart-link {
    display: block;
    text-align: center;
    padding: 12px;
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.svfm-view-cart-link:hover {
    color: var(--svfm-icon);
}

/* ========================================
   ACCOUNT POPUP STYLES
   ======================================== */
.svfm-account-content {
    padding: 24px 20px;
}

.svfm-account-logged-in {
    text-align: center;
}

.svfm-account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--svfm-icon), #a25d67);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.svfm-account-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.svfm-account-email {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px 0;
}

.svfm-account-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.svfm-account-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 12px;
    text-decoration: none;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}

.svfm-account-link:hover {
    background: #f3f4f6;
}

.svfm-account-link svg {
    width: 20px;
    height: 20px;
    color: var(--svfm-icon);
}

.svfm-logout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.svfm-logout-btn:hover {
    background: #fecaca;
}

/* Login form */
.svfm-login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.svfm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.svfm-form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.svfm-form-input {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.svfm-form-input:focus {
    outline: none;
    border-color: var(--svfm-icon);
    box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.1);
}

.svfm-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.svfm-remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
}

.svfm-remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--svfm-icon);
}

.svfm-forgot-link {
    font-size: 14px;
    color: var(--svfm-icon);
    text-decoration: none;
}

.svfm-forgot-link:hover {
    text-decoration: underline;
}

.svfm-login-btn {
    padding: 16px;
    background: var(--svfm-bg);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.svfm-login-btn:hover {
    background: #1f1f1f;
}

.svfm-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.svfm-form-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #9ca3af;
    font-size: 13px;
}

.svfm-form-divider::before,
.svfm-form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.svfm-register-link {
    display: block;
    padding: 14px;
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.svfm-register-link:hover {
    background: #f3f4f6;
}

.svfm-form-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 14px;
    display: none;
}

.svfm-form-error.visible {
    display: block;
}

/* ========================================
   RESPONSIVE - FLUID MOBILE SIZING
   ======================================== */

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

/* Mobile: Use fluid sizing based on viewport width */
@media (max-width: 480px) {
    .svfm-menu {
        /* Fluid gap: scales from 12px to 16px based on screen width */
        gap: clamp(12px, 3vw, 16px);
        padding: clamp(10px, 2.5vw, 14px);
        bottom: 12px;
        /* Take up most of the screen width */
        width: calc(100vw - 24px);
        max-width: 400px;
        justify-content: space-evenly;
    }
    
    .svfm-menu.svfm-individual {
        gap: clamp(14px, 4vw, 20px);
    }
    
    .svfm-menu.svfm-top {
        top: 12px;
        bottom: auto;
    }
    
    /* Fluid button size: scales from 64px to 74px */
    .svfm-btn {
        width: clamp(64px, 17vw, 74px);
        height: clamp(64px, 17vw, 74px);
    }
    
    .svfm-btn-icon {
        width: clamp(22px, 6vw, 26px);
        height: clamp(22px, 6vw, 26px);
    }
    
    .svfm-curved-label {
        width: clamp(64px, 17vw, 74px);
        height: clamp(64px, 17vw, 74px);
    }
    
    .svfm-curved-label text {
        font-size: clamp(8px, 2.2vw, 10px);
    }
    
    .svfm-cart-count {
        height: 18px;
        font-size: 10px;
        min-width: 20px;
        bottom: 3px;
    }
    
    .svfm-home-btn {
        width: 54px;
        height: 54px;
        top: 12px;
        left: 12px;
    }
    
    .svfm-home-btn.svfm-bottom {
        top: auto;
        bottom: 12px;
    }
    
    .svfm-home-icon {
        width: 24px;
        height: 24px;
    }
    
    .svfm-sub-btn {
        width: clamp(72px, 20vw, 84px);
        height: clamp(72px, 20vw, 84px);
    }
    
    .svfm-sub-icon {
        width: clamp(24px, 6.5vw, 28px);
        height: clamp(24px, 6.5vw, 28px);
    }
    
    .svfm-sub-curved-label {
        width: clamp(72px, 20vw, 84px);
        height: clamp(72px, 20vw, 84px);
    }
    
    .svfm-sub-curved-label text {
        font-size: clamp(8px, 2vw, 9px);
    }
    
    .svfm-sub-close {
        width: 52px;
        height: 52px;
    }
    
    .svfm-sub-close svg {
        width: 22px;
        height: 22px;
    }
    
    .svfm-submenu-more {
        width: clamp(220px, 60vw, 260px);
        height: clamp(220px, 60vw, 260px);
    }
    
    .svfm-submenu-shop {
        width: clamp(260px, 70vw, 300px);
        height: clamp(195px, 52vw, 225px);
    }
    
    .svfm-popup-container {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    
    .svfm-popup-header {
        padding: 16px 20px;
    }
    
    .svfm-popup-close {
        width: 44px;
        height: 44px;
    }
    
    .svfm-popup-close svg {
        width: 22px;
        height: 22px;
    }
    
    .svfm-cart-header-left {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .svfm-view-full-cart-link {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .svfm-cart-items-v2 {
        padding: 12px;
    }
    
    .sv-coupon-section {
        padding: 12px 16px;
    }
    
    .svfm-cart-sticky-footer .sv-checkout-btn-v2 {
        margin: 0 12px 12px;
        width: calc(100% - 24px);
    }
    
    .svfm-account-content {
        padding: 20px 16px;
    }
    
    /* Account popup from top on mobile (keyboard friendly) */
    .svfm-popup-account {
        align-items: flex-start;
        padding-top: 0;
    }
    
    .svfm-popup-account .svfm-popup-container {
        border-radius: 0 0 24px 24px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    
    .svfm-popup-account.active .svfm-popup-container {
        transform: translateY(0);
    }
    
    /* Larger form inputs on mobile for easier tapping */
    .sv-form-group input {
        padding: 16px 16px;
        font-size: 16px;
        min-height: 54px;
    }
    
    .sv-form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .sv-btn-primary,
    .sv-btn {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 54px;
    }
}

@media (min-width: 768px) {
    .svfm-menu {
        gap: 16px;
        padding: 12px 16px;
    }
    
    .svfm-menu.svfm-individual {
        gap: 20px;
    }
    
    .svfm-btn {
        width: 72px;
        height: 72px;
    }
    
    .svfm-btn-icon {
        width: 28px;
        height: 28px;
    }
    
    .svfm-curved-label {
        width: 72px;
        height: 72px;
    }
    
    .svfm-curved-label text {
        font-size: 11px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes svfm-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Hover effect enhancement for submenu items */
.svfm-sub-btn:hover .svfm-sub-icon {
    animation: svfm-pulse 0.5s ease;
}

/* Body scroll lock when popup is open */
body.svfm-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .svfm-menu,
    .svfm-home-btn,
    .svfm-submenu,
    .svfm-popup,
    .svfm-glass-overlay {
        display: none !important;
    }
}

/* Body scroll lock when popup open */
body.svfm-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Cart item transition for removal */
.svfm-cart-item {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

