/**
 * Gang Sheet Builder - Mobile PWA Styles v2
 * Complete rewrite for premium mobile editor experience.
 * Scoped via .gsb-mobile-body and .gsb-mobile classes.
 */

/* ========== CSS VARIABLES ========== */
:root {
    --gsm-pink: #e91e8c;
    --gsm-pink-dark: #d11a7d;
    --gsm-pink-light: #fdf2f8;
    --gsm-dark: #1e1e2d;
    --gsm-dark-deep: #0f0f1a;
    --gsm-gray-50: #f9fafb;
    --gsm-gray-100: #f3f4f6;
    --gsm-gray-200: #e5e7eb;
    --gsm-gray-300: #d1d5db;
    --gsm-gray-400: #9ca3af;
    --gsm-gray-500: #6b7280;
    --gsm-gray-600: #4b5563;
    --gsm-gray-700: #374151;
    --gsm-gray-800: #1f2937;
    --gsm-gray-900: #111827;
    --gsm-red: #ef4444;
    --gsm-green: #22c55e;
    --gsm-radius: 12px;
    --gsm-radius-sm: 8px;
    --gsm-radius-lg: 16px;
    --gsm-radius-xl: 20px;
    --gsm-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --gsm-shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --gsm-shadow-lg: 0 8px 30px rgba(0,0,0,0.18);
    --gsm-transition: 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    --gsm-safe-bottom: env(safe-area-inset-bottom, 0px);
    --gsm-nav-height: 56px;
    --gsm-topbar-height: 48px;

    /* Type-specific accent colors */
    --gsm-type1: #e91e8c;
    --gsm-type1-bg: rgba(233,30,140,0.1);
    --gsm-type1-glow: 0 4px 14px rgba(233,30,140,0.25);
    --gsm-type2: #8b5cf6;
    --gsm-type2-bg: rgba(139,92,246,0.1);
    --gsm-type2-glow: 0 4px 14px rgba(139,92,246,0.25);
    --gsm-type6: #3b82f6;
    --gsm-type6-bg: rgba(59,130,246,0.1);
    --gsm-type6-glow: 0 4px 14px rgba(59,130,246,0.25);
    --gsm-type7: #10b981;
    --gsm-type7-bg: rgba(16,185,129,0.1);
    --gsm-type7-glow: 0 4px 14px rgba(16,185,129,0.25);
}

/* ========== MOBILE BODY ========== */
.gsb-mobile-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gsm-dark);
    -webkit-text-size-adjust: 100%;
    height: 100dvh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent iOS zoom on input focus */
.gsb-mobile-body input,
.gsb-mobile-body select,
.gsb-mobile-body textarea {
    font-size: 16px !important;
}

/* ========== ANIMATIONS ========== */
@keyframes gsm-spin {
    to { transform: rotate(360deg); }
}

@keyframes gsm-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gsm-fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes gsm-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gsm-scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes gsm-splashPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes gsm-dotBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

@keyframes gsm-progressFill {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes gsm-checkDraw {
    from { stroke-dashoffset: 20; }
    to { stroke-dashoffset: 0; }
}

@keyframes gsm-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gsm-cardEntrance {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gsm-headerOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -8px) scale(1.05); }
    66% { transform: translate(-6px, 4px) scale(0.97); }
}

/* ========== AUTH SCREEN ========== */
.gsm-auth-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100dvh;
    padding: 24px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 24px);
    background: linear-gradient(135deg, var(--gsb-theme, var(--gsm-dark)) 0%, var(--gsm-dark-deep) 100%);
    color: #fff;
    animation: gsm-fadeIn 0.5s ease;
}

.gsm-auth-card {
    width: 100%;
    max-width: 360px;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--gsm-radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: gsm-scaleIn 0.4s ease 0.1s both;
}

.gsm-auth-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--gsm-radius-lg);
    object-fit: contain;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
}

.gsm-auth-logo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: var(--gsm-radius-lg);
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gsm-auth-logo-placeholder svg {
    width: 36px;
    height: 36px;
    opacity: 0.5;
}

.gsm-auth-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.gsm-auth-subtitle {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 6px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.gsm-auth-welcome {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 24px;
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
}

.gsm-auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gsm-auth-input {
    width: 100%;
    height: 48px;
    border-radius: var(--gsm-radius);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0 16px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.gsm-auth-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.gsm-auth-input:focus {
    border-color: var(--gsm-pink);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.2);
}

.gsm-auth-btn {
    width: 100%;
    height: 48px;
    border-radius: var(--gsm-radius);
    border: none;
    background: linear-gradient(135deg, var(--gsm-pink), #c2185b);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.35);
    margin-top: 4px;
}

.gsm-auth-btn:active {
    transform: scale(0.98);
}

.gsm-auth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.gsm-auth-error {
    color: #fca5a5;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

/* ========== SPLASH / LOADING SCREEN ========== */
.gsm-splash {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gsb-theme, var(--gsm-dark)) 0%, var(--gsm-dark-deep) 100%);
    color: #fff;
    transition: opacity 0.4s ease;
}

.gsm-splash.fade-out {
    opacity: 0;
    pointer-events: none;
}

.gsm-splash-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--gsm-radius-lg);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    animation: gsm-splashPulse 1.5s ease infinite;
    margin-bottom: 16px;
}

.gsm-splash-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: var(--gsm-radius-lg);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gsm-splashPulse 1.5s ease infinite;
    margin-bottom: 16px;
}

.gsm-splash-logo-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.gsm-splash-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0;
    animation: gsm-fadeIn 0.4s ease 0.2s forwards;
}

.gsm-splash-text {
    font-size: 14px;
    opacity: 0;
    animation: gsm-fadeIn 0.4s ease 0.4s forwards;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.gsm-splash-dots {
    display: flex;
    gap: 6px;
    opacity: 0;
    animation: gsm-fadeIn 0.3s ease 0.5s forwards;
}

.gsm-splash-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: gsm-dotBounce 1.2s ease infinite;
}

.gsm-splash-dots span:nth-child(2) {
    animation-delay: 0.15s;
}

.gsm-splash-dots span:nth-child(3) {
    animation-delay: 0.3s;
}

/* Progress bar variant for editor loading */
.gsm-splash-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    animation: gsm-fadeIn 0.3s ease 0.5s forwards;
}

.gsm-splash-progress-bar {
    height: 100%;
    background: var(--gsm-pink);
    border-radius: 2px;
    animation: gsm-progressFill 1.8s ease-out forwards;
}

/* ========== PRODUCT SELECTOR ========== */
.gsm-product-screen {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--gsm-gray-100);
    color: var(--gsm-gray-800);
    animation: gsm-fadeIn 0.3s ease;
}

.gsm-product-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: calc(env(safe-area-inset-top, 0px) + 28px) 20px 22px;
    background: linear-gradient(165deg, var(--gsb-theme, var(--gsm-dark)) 0%, var(--gsm-dark-deep) 60%, #1a1035 100%);
    color: #fff;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.gsm-product-header::before,
.gsm-product-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.35;
    pointer-events: none;
    animation: gsm-headerOrb 6s ease-in-out infinite;
}

.gsm-product-header::before {
    width: 120px;
    height: 120px;
    background: var(--gsm-pink);
    top: -30px;
    right: -20px;
}

.gsm-product-header::after {
    width: 90px;
    height: 90px;
    background: #8b5cf6;
    bottom: -20px;
    left: -10px;
    animation-delay: -3s;
}

.gsm-product-header-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--gsm-radius);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.gsm-product-header-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.gsm-product-header-subtitle {
    font-size: 13px;
    opacity: 0.6;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.gsm-product-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 40px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gsm-product-card {
    background: #fff;
    border-radius: var(--gsm-radius);
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    border: 1px solid var(--gsm-gray-200);
    position: relative;
    overflow: visible;
    animation: gsm-cardEntrance 0.4s ease both;
}

/* Staggered entrance delays */
.gsm-product-card:nth-child(1) { animation-delay: 0s; }
.gsm-product-card:nth-child(2) { animation-delay: 0.05s; }
.gsm-product-card:nth-child(3) { animation-delay: 0.10s; }
.gsm-product-card:nth-child(4) { animation-delay: 0.15s; }
.gsm-product-card:nth-child(5) { animation-delay: 0.20s; }
.gsm-product-card:nth-child(6) { animation-delay: 0.25s; }
.gsm-product-card:nth-child(7) { animation-delay: 0.30s; }
.gsm-product-card:nth-child(8) { animation-delay: 0.35s; }

/* Left accent stripe via pseudo-element */
.gsm-product-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gsm-pink);
    border-radius: var(--gsm-radius) 0 0 var(--gsm-radius);
    transition: width 0.2s;
}

.gsm-product-card:active::before {
    width: 6px;
}

/* Type-specific accent stripe colors */
.gsm-product-card[data-type="1"]::before { background: var(--gsm-type1); }
.gsm-product-card[data-type="2"]::before { background: var(--gsm-type2); }
.gsm-product-card[data-type="6"]::before { background: var(--gsm-type6); }
.gsm-product-card[data-type="7"]::before,
.gsm-product-card[data-type="8"]::before { background: var(--gsm-type7); }

.gsm-product-card:active {
    transform: scale(0.985);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1), 0 8px 24px rgba(0,0,0,0.06);
}

/* Inner flex layout */
.gsm-product-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 14px 14px 18px;
}

/* Product thumbnail */
.gsm-product-thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--gsm-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--gsm-gray-100);
    border: 1px solid var(--gsm-gray-200);
}

/* SVG icon fallback when no image */
.gsm-product-thumb-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--gsm-radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gsm-product-thumb-icon svg {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.gsm-product-card[data-type="1"] .gsm-product-thumb-icon { background: var(--gsm-type1-bg); color: var(--gsm-type1); }
.gsm-product-card[data-type="2"] .gsm-product-thumb-icon { background: var(--gsm-type2-bg); color: var(--gsm-type2); }
.gsm-product-card[data-type="6"] .gsm-product-thumb-icon { background: var(--gsm-type6-bg); color: var(--gsm-type6); }
.gsm-product-card[data-type="7"] .gsm-product-thumb-icon,
.gsm-product-card[data-type="8"] .gsm-product-thumb-icon { background: var(--gsm-type7-bg); color: var(--gsm-type7); }

/* Card info column */
.gsm-product-card-info {
    flex: 1;
    min-width: 0;
}

.gsm-product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gsm-gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsm-product-price-line {
    font-size: 13px;
    font-weight: 600;
    color: var(--gsm-pink);
    margin-top: 2px;
}

.gsm-product-price-unit {
    font-weight: 400;
    color: var(--gsm-gray-400);
    font-size: 11px;
}

.gsm-product-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    background: var(--gsm-type1-bg);
    color: var(--gsm-type1);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Type-specific badge colors */
.gsm-product-card[data-type="1"] .gsm-product-type-badge { background: var(--gsm-type1-bg); color: var(--gsm-type1); }
.gsm-product-card[data-type="2"] .gsm-product-type-badge { background: var(--gsm-type2-bg); color: var(--gsm-type2); }
.gsm-product-card[data-type="6"] .gsm-product-type-badge { background: var(--gsm-type6-bg); color: var(--gsm-type6); }
.gsm-product-card[data-type="7"] .gsm-product-type-badge,
.gsm-product-card[data-type="8"] .gsm-product-type-badge { background: var(--gsm-type7-bg); color: var(--gsm-type7); }

/* Chevron arrow */
.gsm-product-card-arrow {
    flex-shrink: 0;
    color: var(--gsm-gray-300);
    transition: transform 0.2s, color 0.2s;
}

.gsm-product-card-arrow svg {
    width: 20px;
    height: 20px;
}

.gsm-product-card:active .gsm-product-card-arrow {
    transform: translateX(3px);
    color: var(--gsm-gray-500);
}

/* Size pills below card-inner */
.gsm-product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 12px 18px;
    border-top: 1px solid var(--gsm-gray-100);
    margin-top: 0;
    padding-top: 10px;
}

.gsm-size-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid var(--gsm-gray-200);
    background: var(--gsm-gray-50);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.gsm-size-pill:active,
.gsm-size-pill.active {
    border-color: var(--gsm-pink);
    background: linear-gradient(135deg, var(--gsm-pink-light), #fce7f3);
    color: var(--gsm-pink-dark);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(233,30,140,0.12);
    transform: scale(0.96);
}

.gsm-size-price {
    color: var(--gsm-gray-400);
    font-size: 11px;
    margin-left: 4px;
}

/* Empty states */
.gsm-product-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    color: var(--gsm-gray-400);
    font-size: 15px;
    gap: 8px;
}

.gsm-product-empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 4px;
    opacity: 0.4;
}

.gsm-product-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--gsm-gray-500);
}

.gsm-product-empty-desc {
    font-size: 13px;
    color: var(--gsm-gray-400);
    max-width: 260px;
    line-height: 1.5;
}

.gsm-product-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--gsm-gray-400);
}

/* ========== MOBILE EDITOR LAYOUT ========== */

/* Override GSB desktop styles when in mobile mode */
.gsb-mobile .gsb-sidebar,
.gsb-mobile .gsb-right,
.gsb-mobile .gsb-footer,
.gsb-mobile .gsb-toolbar,
.gsb-mobile .gsb-subtoolbar,
.gsb-mobile .gsb-header,
.gsb-mobile .gsb-canvas-foot,
.gsb-mobile #gsb-overlap-warning,
.gsb-mobile #gsb-lowdpi-warning,
.gsb-mobile #gsb-welcome {
    display: none !important;
}

/* Critical: .gsb has position:fixed;inset:0;z-index:999999 which
   makes it cover the entire viewport. Override to fill parent instead. */
.gsb-mobile#gsb-app,
.gsb-mobile {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.gsb-mobile .gsb-main {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    width: 100% !important;
}

.gsb-mobile .gsb-canvas-area {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.gsb-mobile .gsb-canvas-scroll {
    flex: 1 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: auto !important;
    padding: 40px 8px 8px 8px !important;
    text-align: center !important;
}

.gsb-mobile .canvas-container {
    margin: 0 auto !important;
    flex-shrink: 0 !important;
}

/* ========== EDITOR WRAPPER ========== */
#gsm-editor-wrapper {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--gsm-gray-100);
}

/* ========== TOP BAR ========== */
.gsm-top-bar {
    display: flex;
    align-items: center;
    height: auto;
    min-height: var(--gsm-topbar-height);
    padding: 0 8px;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--gsb-theme, var(--gsm-dark));
    color: #fff;
    gap: 6px;
    z-index: 100;
    flex-shrink: 0;
}

.gsm-top-bar-back {
    width: 36px;
    height: 36px;
    border-radius: var(--gsm-radius-sm);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

.gsm-top-bar-back:active {
    background: rgba(255, 255, 255, 0.2);
}

.gsm-top-bar-logo {
    height: 24px;
    max-width: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.gsm-top-bar-title {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.gsm-top-bar-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--gsm-green);
    flex-shrink: 0;
}

.gsm-top-bar-save {
    width: 36px;
    height: 36px;
    border-radius: var(--gsm-radius-sm);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
    position: relative;
}
.gsm-top-bar-save:active {
    background: rgba(255, 255, 255, 0.2);
}
.gsm-top-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--gsm-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    pointer-events: none;
}
.gsm-top-cart-badge:empty {
    display: none;
}

/* Floating save button highlight */
.gsm-float-save {
    color: var(--gsm-primary, var(--gsm-pink));
}
.gsm-float-save:active {
    background: rgba(233, 30, 140, 0.1);
}

/* ========== CANVAS AREA ========== */
.gsm-canvas-wrapper {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: none;
    position: relative;
    background: var(--gsm-gray-100);
    /* Subtle grid pattern */
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
}

/* ========== FLOATING UNDO/REDO PILL ========== */
.gsm-float-tools {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 9999px;
    box-shadow: var(--gsm-shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.gsm-float-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--gsm-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.gsm-float-btn:active {
    background: var(--gsm-gray-100);
}

.gsm-float-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.gsm-float-btn svg {
    width: 18px;
    height: 18px;
}

.gsm-float-sep {
    width: 1px;
    height: 20px;
    background: var(--gsm-gray-200);
    margin: 0 2px;
}

/* Zoom display in float tools */
.gsm-float-zoom {
    font-size: 11px;
    font-weight: 600;
    color: var(--gsm-gray-500);
    padding: 0 6px;
    min-width: 36px;
    text-align: center;
    user-select: none;
}

/* ========== BOTTOM NAVIGATION BAR ========== */
.gsm-bottom-nav {
    display: flex;
    align-items: stretch;
    /* Use auto height so safe-area padding doesn't eat content space (box-sizing: border-box) */
    height: auto;
    min-height: var(--gsm-nav-height);
    padding-bottom: var(--gsm-safe-bottom);
    background: #fff;
    border-top: 1px solid var(--gsm-gray-200);
    z-index: 100;
    flex-shrink: 0;
    position: relative;
}

.gsm-nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: none;
    background: none;
    color: var(--gsm-gray-400);
    cursor: pointer;
    position: relative;
    padding: 6px 0;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.gsm-nav-tab.active {
    color: var(--gsm-pink);
}

/* Active indicator line */
.gsm-nav-tab.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--gsm-pink);
    border-radius: 0 0 2px 2px;
}

.gsm-nav-tab svg {
    width: 22px;
    height: 22px;
    transition: transform 0.15s;
}

.gsm-nav-tab:active svg {
    transform: scale(0.9);
}

.gsm-nav-tab-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Badge on Cart tab */
.gsm-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--gsm-pink);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.gsm-nav-badge:empty {
    display: none;
}

/* ========== BOTTOM SHEET (GENERIC) ========== */
.gsm-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.gsm-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.gsm-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--gsm-radius-lg) var(--gsm-radius-lg) 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform var(--gsm-transition);
    max-height: 75dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: var(--gsm-safe-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.gsm-sheet.active {
    transform: translateY(0);
}

.gsm-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--gsm-gray-300);
    border-radius: 2px;
    margin: 10px auto 6px;
    flex-shrink: 0;
}

.gsm-sheet-title {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 20px 12px;
    flex-shrink: 0;
    color: var(--gsm-gray-900);
}

.gsm-sheet-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px 20px;
}

/* ========== LAYERS BOTTOM SHEET ========== */
.gsm-layer-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gsm-layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--gsm-radius-sm);
    background: var(--gsm-gray-50);
    cursor: pointer;
    transition: background 0.15s;
    border: 2px solid transparent;
}

.gsm-layer-item:active {
    background: var(--gsm-gray-100);
}

.gsm-layer-item.selected {
    border-color: var(--gsm-pink);
    background: var(--gsm-pink-light);
}

.gsm-layer-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--gsm-gray-200);
    flex-shrink: 0;
}

.gsm-layer-info {
    flex: 1;
    min-width: 0;
}

.gsm-layer-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gsm-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsm-layer-dims {
    font-size: 11px;
    color: var(--gsm-gray-400);
    margin-top: 1px;
}

.gsm-layer-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.gsm-layer-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--gsm-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.gsm-layer-action-btn:active {
    background: var(--gsm-gray-200);
}

.gsm-layer-action-btn.danger:active {
    background: #fee2e2;
    color: var(--gsm-red);
}

.gsm-layer-action-btn svg {
    width: 16px;
    height: 16px;
}

.gsm-layer-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--gsm-gray-400);
    font-size: 14px;
}

.gsm-layer-empty-icon {
    display: block;
    margin: 0 auto 12px;
    opacity: 0.4;
}

/* ========== CART BOTTOM SHEET ========== */
.gsm-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gsm-cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.gsm-cart-row-label {
    font-size: 14px;
    color: var(--gsm-gray-500);
}

.gsm-cart-row-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gsm-gray-800);
}

.gsm-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--gsm-gray-200);
}

.gsm-cart-total-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--gsm-gray-800);
}

.gsm-cart-total-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--gsm-pink);
}

.gsm-cart-btn {
    width: 100%;
    height: 48px;
    border-radius: var(--gsm-radius);
    border: none;
    background: linear-gradient(135deg, var(--gsm-pink), #c2185b);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.gsm-cart-btn:active {
    transform: scale(0.98);
}

.gsm-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.gsm-cart-btn svg {
    width: 20px;
    height: 20px;
}

.gsm-cart-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--gsm-gray-400);
    font-size: 14px;
}

/* ========== UPLOAD OPTIONS SHEET ========== */
.gsm-upload-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gsm-upload-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px;
    border-radius: var(--gsm-radius-sm);
    border: none;
    background: none;
    color: var(--gsm-gray-700);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}

.gsm-upload-option:active {
    background: var(--gsm-gray-100);
}

.gsm-upload-option svg {
    width: 22px;
    height: 22px;
    color: var(--gsm-gray-500);
    flex-shrink: 0;
}

.gsm-upload-option-desc {
    font-size: 12px;
    color: var(--gsm-gray-400);
    font-weight: 400;
    margin-top: 2px;
}

/* Upload sheet divider + integrations */
.gsm-upload-divider {
    height: 1px;
    background: var(--gsm-gray-200);
    margin: 12px 0 8px;
}
.gsm-upload-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gsm-gray-400);
    padding: 4px 0 8px;
}
.gsm-upload-integrations {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gsm-integration-btn {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: var(--gsm-radius);
    border: 1px solid var(--gsm-gray-200);
    background: var(--gsm-gray-50);
    color: var(--gsm-gray-700);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.gsm-integration-btn:active {
    background: var(--gsm-gray-100);
    border-color: var(--gsm-gray-300);
}
.gsm-integration-btn svg {
    width: 28px;
    height: 28px;
    color: var(--gsm-gray-500);
}

.gsm-tool-danger {
    color: #ef4444 !important;
    border-top: 1px solid var(--gsm-gray-100);
    margin-top: 4px;
    padding-top: 16px !important;
}

.gsm-tool-danger svg {
    color: #ef4444 !important;
}

/* ========== CHECKOUT OVERLAY ========== */
.gsm-checkout-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 24px;
    animation: gsm-fadeIn 0.2s ease;
}

.gsm-checkout-card {
    width: 100%;
    max-width: 320px;
    background: var(--gsm-gray-800);
    border-radius: var(--gsm-radius-lg);
    padding: 28px 24px;
    animation: gsm-scaleIn 0.3s ease;
}

.gsm-checkout-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

.gsm-checkout-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gsm-checkout-step {
    display: flex;
    align-items: center;
    gap: 14px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.gsm-checkout-step.active {
    opacity: 1;
}

.gsm-checkout-step.done {
    opacity: 0.7;
}

.gsm-checkout-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.gsm-checkout-step.active .gsm-checkout-step-icon {
    background: rgba(233, 30, 140, 0.2);
}

.gsm-checkout-step.done .gsm-checkout-step-icon {
    background: rgba(34, 197, 94, 0.2);
}

.gsm-checkout-step-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gsm-pink);
    border-radius: 50%;
    animation: gsm-spin 0.7s linear infinite;
}

.gsm-checkout-step-check {
    width: 18px;
    height: 18px;
    color: var(--gsm-green);
}

.gsm-checkout-step-check path {
    stroke-dasharray: 20;
    stroke-dashoffset: 0;
    animation: gsm-checkDraw 0.3s ease;
}

.gsm-checkout-step-text {
    font-size: 14px;
    font-weight: 500;
}

.gsm-checkout-step-status {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    min-height: 20px;
    margin-top: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gsm-checkout-error {
    text-align: center;
    margin-top: 16px;
}

.gsm-checkout-error-msg {
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 12px;
}

.gsm-checkout-retry-btn {
    height: 40px;
    padding: 0 24px;
    border-radius: var(--gsm-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.gsm-checkout-retry-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== OBJECT PROPERTIES SHEET ========== */
.gsm-prop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gsm-gray-100);
}

.gsm-prop-row:last-child {
    border-bottom: none;
}

.gsm-prop-label {
    font-size: 13px;
    color: var(--gsm-gray-500);
    font-weight: 500;
}

.gsm-prop-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--gsm-gray-800);
}

.gsm-prop-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gsm-gray-400);
    padding: 12px 0 6px;
}

.gsm-prop-align-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gsm-prop-align-btn {
    width: 40px;
    height: 36px;
    border-radius: var(--gsm-radius-sm);
    border: 1px solid var(--gsm-gray-200);
    background: #fff;
    color: var(--gsm-gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.gsm-prop-align-btn:active {
    background: var(--gsm-primary);
    border-color: var(--gsm-primary);
    color: #fff;
}

.gsm-prop-align-sep {
    width: 1px;
    height: 24px;
    background: var(--gsm-gray-200);
    margin: 0 4px;
}

.gsm-prop-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
}

.gsm-prop-action-btn {
    flex: 1;
    height: 40px;
    border-radius: var(--gsm-radius-sm);
    border: 1px solid var(--gsm-gray-200);
    background: #fff;
    color: var(--gsm-gray-700);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.15s;
}

.gsm-prop-action-btn:active {
    background: var(--gsm-gray-100);
}

.gsm-prop-action-btn.danger {
    color: var(--gsm-red);
    border-color: #fca5a5;
}

.gsm-prop-action-btn.danger:active {
    background: #fef2f2;
}

/* ========== SIZE SELECTOR IN SHEET ========== */
.gsm-size-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.gsm-size-option {
    padding: 16px 12px;
    border-radius: var(--gsm-radius);
    border: 2px solid var(--gsm-gray-200);
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.gsm-size-option:active {
    transform: scale(0.97);
}

.gsm-size-option.selected {
    border-color: var(--gsm-pink);
    background: linear-gradient(135deg, var(--gsm-pink-light), #fce7f3);
    box-shadow: 0 0 0 3px rgba(233,30,140,0.12);
}

.gsm-size-option-label {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--gsm-gray-900);
}

.gsm-size-option.selected .gsm-size-option-label {
    color: var(--gsm-pink-dark);
}

.gsm-size-option-price {
    font-size: 13px;
    color: var(--gsm-gray-400);
    font-weight: 500;
}

.gsm-size-option.selected .gsm-size-option-price {
    color: var(--gsm-pink);
}

/* ========== CONTEXT MENU (LONG-PRESS) ========== */
.gsm-context-menu {
    position: fixed;
    background: #fff;
    border-radius: var(--gsm-radius);
    box-shadow: var(--gsm-shadow-lg);
    z-index: 1500;
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.15s, transform 0.15s;
    pointer-events: none;
}

.gsm-context-menu.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.gsm-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--gsm-gray-700);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: background 0.1s;
}

.gsm-context-item:active {
    background: var(--gsm-gray-100);
}

.gsm-context-item.danger {
    color: var(--gsm-red);
}

.gsm-context-sep {
    height: 1px;
    background: var(--gsm-gray-100);
}

/* ========== LOADING / SPINNER ========== */
.gsm-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gsm-spin 0.6s linear infinite;
}

.gsm-spinner--dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--gsm-gray-500);
}

/* ========== TOAST NOTIFICATIONS ========== */
.gsm-toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    background: var(--gsm-gray-800);
    color: #fff;
    padding: 10px 18px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    z-index: 5000;
    transition: transform 0.3s var(--gsm-transition);
    white-space: nowrap;
    box-shadow: var(--gsm-shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100vw - 32px);
}

.gsm-toast.visible {
    transform: translateX(-50%) translateY(0);
}

.gsm-toast.error {
    background: var(--gsm-red);
}

.gsm-toast.success {
    background: var(--gsm-green);
}

.gsm-toast-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ========== TYPE 7/8 UPLOAD SCREEN ========== */
.gsm-upload-screen {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    background: var(--gsm-gray-50);
    color: var(--gsm-gray-800);
    animation: gsm-fadeIn 0.3s ease;
}

.gsm-upload-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 100px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gsm-upload-section {
    background: #fff;
    border-radius: var(--gsm-radius);
    padding: 16px;
    box-shadow: var(--gsm-shadow-sm);
    border: 1px solid var(--gsm-gray-200);
}

.gsm-upload-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gsm-gray-500);
    margin-bottom: 12px;
}

/* Size pills */
.gsm-upload-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gsm-upload-size-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    border-radius: var(--gsm-radius-sm);
    border: 2px solid var(--gsm-gray-200);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-width: 80px;
    -webkit-tap-highlight-color: transparent;
}

.gsm-upload-size-pill:active,
.gsm-upload-size-pill.selected {
    border-color: var(--gsm-pink);
    background: var(--gsm-pink-light);
}

.gsm-upload-size-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gsm-gray-800);
}

.gsm-upload-size-dim {
    font-size: 11px;
    color: var(--gsm-gray-400);
    margin-top: 2px;
}

.gsm-upload-size-pill.selected .gsm-upload-size-name {
    color: var(--gsm-pink-dark);
}

/* Dropzone */
.gsm-upload-dropzone {
    position: relative;
    border: 2px dashed var(--gsm-gray-300);
    border-radius: var(--gsm-radius);
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.gsm-upload-dropzone:active {
    border-color: var(--gsm-pink);
    background: var(--gsm-pink-light);
}

.gsm-upload-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 16px;
    color: var(--gsm-gray-400);
}

.gsm-upload-dropzone-empty svg {
    color: var(--gsm-gray-300);
    margin-bottom: 4px;
}

.gsm-upload-dropzone-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--gsm-gray-600);
}

.gsm-upload-dropzone-hint {
    font-size: 12px;
    color: var(--gsm-gray-400);
}

/* Preview */
.gsm-upload-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    width: 100%;
    box-sizing: border-box;
}

.gsm-upload-preview-img {
    width: 64px;
    height: 64px;
    border-radius: var(--gsm-radius-sm);
    object-fit: contain;
    background: var(--gsm-gray-100);
    border: 1px solid var(--gsm-gray-200);
    flex-shrink: 0;
}

.gsm-upload-preview-info {
    flex: 1;
    min-width: 0;
}

.gsm-upload-preview-dims {
    font-size: 15px;
    font-weight: 600;
    color: var(--gsm-gray-800);
}

.gsm-upload-preview-name {
    font-size: 12px;
    color: var(--gsm-gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.gsm-upload-preview-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gsm-gray-100);
    color: var(--gsm-gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.gsm-upload-preview-remove:active {
    background: #fee2e2;
    color: var(--gsm-red);
}

/* Pricing info bar */
.gsm-upload-pricing-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: var(--gsm-radius-sm);
    color: #4338ca;
    font-size: 13px;
    font-weight: 600;
}

.gsm-upload-pricing-info svg {
    flex-shrink: 0;
    color: #6366f1;
}

/* Summary section */
.gsm-upload-summary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gsm-upload-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--gsm-gray-600);
}

.gsm-upload-summary-total {
    border-top: 1px solid var(--gsm-gray-200);
    padding-top: 10px;
    margin-top: 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gsm-gray-900);
}

.gsm-upload-summary-total span:last-child {
    color: var(--gsm-pink);
    font-size: 18px;
}

/* Disclaimer */
.gsm-upload-disclaimer {
    padding: 0 2px;
}

.gsm-upload-disclaimer-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--gsm-gray-600);
    line-height: 1.4;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.gsm-upload-disclaimer-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--gsm-pink);
}

/* Fixed bottom footer */
.gsm-upload-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    padding-bottom: calc(12px + var(--gsm-safe-bottom));
    background: #fff;
    border-top: 1px solid var(--gsm-gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.gsm-upload-footer-btn {
    flex: 1;
    height: 48px;
    border-radius: var(--gsm-radius);
    border: none;
    background: linear-gradient(135deg, var(--gsm-pink), #c2185b);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.15s;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}

.gsm-upload-footer-btn-secondary {
    background: #fff;
    color: var(--gsm-gray-700);
    border: 1px solid var(--gsm-gray-300);
    box-shadow: var(--gsm-shadow-sm);
}

.gsm-upload-footer-btn:active {
    transform: scale(0.98);
}

.gsm-upload-footer-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.gsm-upload-footer-btn svg {
    width: 18px;
    height: 18px;
}

/* ========== TYPE 8 SIZE/QTY GRID ========== */
.gsm-t8-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gsm-t8-grid thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gsm-gray-400);
    padding: 0 0 8px 0;
    border-bottom: 1px solid var(--gsm-gray-200);
}

.gsm-t8-grid thead th:last-child {
    text-align: center;
}

.gsm-t8-grid tbody tr {
    border-bottom: 1px solid var(--gsm-gray-100);
}

.gsm-t8-size-name {
    font-weight: 600;
    color: var(--gsm-gray-800);
    padding: 12px 8px 12px 0;
}

.gsm-t8-price {
    color: var(--gsm-gray-500);
    padding: 12px 8px;
    white-space: nowrap;
}

.gsm-t8-qty-cell {
    padding: 8px 0;
}

.gsm-t8-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 1px solid var(--gsm-gray-200);
    border-radius: var(--gsm-radius-sm);
    overflow: hidden;
    height: 36px;
}

.gsm-t8-qty-btn {
    width: 36px;
    height: 100%;
    border: none;
    background: var(--gsm-gray-50);
    color: var(--gsm-gray-600);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s;
}

.gsm-t8-qty-btn:active {
    background: var(--gsm-gray-200);
}

.gsm-t8-qty-input {
    width: 40px;
    height: 100%;
    border: none;
    border-left: 1px solid var(--gsm-gray-200);
    border-right: 1px solid var(--gsm-gray-200);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gsm-gray-800);
    background: #fff;
    -moz-appearance: textfield;
}

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

/* ========== CANVAS SETTINGS BOTTOM SHEET ========== */
.gsm-settings-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--gsm-gray-100);
}

.gsm-settings-section:last-child {
    border-bottom: none;
}

.gsm-settings-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gsm-gray-400);
    margin-bottom: 10px;
}

.gsm-settings-info-badge {
    font-size: 13px;
    color: var(--gsm-green);
    font-weight: 600;
    padding: 6px 10px;
    background: #f0fdf4;
    border-radius: var(--gsm-radius-sm);
    margin-bottom: 10px;
    display: inline-block;
}

.gsm-settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
    color: var(--gsm-gray-700);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* iOS-style toggle switch */
.gsm-toggle {
    position: relative;
    width: 44px;
    height: 26px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gsm-gray-300);
    border-radius: 13px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.gsm-toggle:checked {
    background: var(--gsm-pink);
}

.gsm-toggle::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.gsm-toggle:checked::before {
    transform: translateX(18px);
}

.gsm-settings-range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gsm-settings-range {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gsm-gray-200);
    border-radius: 3px;
    outline: none;
}

.gsm-settings-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--gsm-pink);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.gsm-settings-range-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--gsm-gray-700);
    min-width: 42px;
    text-align: right;
}

.gsm-settings-color-row {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.gsm-settings-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--gsm-gray-200);
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.gsm-settings-swatch:active {
    transform: scale(0.92);
}

.gsm-settings-swatch.active {
    border-color: var(--gsm-pink);
    transform: scale(1.08);
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.25);
}

.gsm-settings-color-labels {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--gsm-gray-400);
}

.gsm-settings-color-labels span {
    width: 40px;
    text-align: center;
}

/* ========== UTILITIES ========== */
.gsm-hidden {
    display: none !important;
}

/* Selection override for mobile — ensure Fabric.js handles all touch */
.gsb-mobile .canvas-container,
.gsb-mobile .canvas-container canvas,
.gsb-mobile .upper-canvas {
    touch-action: none !important;
}

/* Allow scroll/pan on the scroll container so the canvas can be scrolled into view */
.gsb-mobile .gsb-canvas-scroll {
    -webkit-overflow-scrolling: auto !important;
    touch-action: pan-x pan-y !important;
}

/* Warning banners — mobile overrides */
.gsb-mobile #gsb-overlap-warning,
.gsb-mobile #gsb-lowdpi-warning {
    font-size: 12px !important;
    padding: 6px 12px !important;
    gap: 6px !important;
    line-height: 1.3 !important;
    flex-shrink: 0 !important;
}

.gsb-mobile #gsb-overlap-warning svg,
.gsb-mobile #gsb-lowdpi-warning svg {
    width: 14px !important;
    height: 14px !important;
}

/* Hide the desktop splash/welcome */
.gsb-mobile #gsb-welcome {
    display: none !important;
}

/* ========== CUT TYPE PILLS (Type 2 Sticker) ========== */
.gsm-cut-type-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 4px;
}
.gsm-cut-type-pill {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--gsm-gray-200);
    background: var(--gsm-gray-50);
    color: var(--gsm-gray-700);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.gsm-cut-type-pill:active {
    background: var(--gsm-gray-100);
}
.gsm-cut-type-pill.selected {
    border-color: var(--gsm-pink);
    background: var(--gsm-pink-light);
    color: var(--gsm-pink);
    font-weight: 600;
}

/* ========== ROLLING HEIGHT SELECTOR (Type 6) ========== */
.gsm-rolling-height-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}
.gsm-rolling-step-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--gsm-gray-200);
    background: var(--gsm-gray-50);
    color: var(--gsm-gray-700);
    font-size: 22px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.gsm-rolling-step-btn:active {
    background: var(--gsm-gray-200);
    border-color: var(--gsm-gray-300);
}
.gsm-rolling-height-input {
    width: 80px;
    height: 44px;
    text-align: center;
    border: 1.5px solid var(--gsm-gray-200);
    border-radius: var(--gsm-radius-sm);
    font-size: 18px;
    font-weight: 600;
    color: var(--gsm-gray-800);
    background: #fff;
    -moz-appearance: textfield;
}
.gsm-rolling-height-input::-webkit-inner-spin-button,
.gsm-rolling-height-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.gsm-rolling-apply-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: none;
    border-radius: var(--gsm-radius);
    background: var(--gsm-pink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.gsm-rolling-apply-btn:active {
    background: var(--gsm-pink-dark);
}

/* ========== CART FAB (Product List) ========== */
.gsm-cart-fab {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--gsm-pink), #c2185b);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(233, 30, 140, 0.35), 0 2px 6px rgba(0,0,0,0.15);
    z-index: 500;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    animation: gsm-fab-pop 0.3s ease;
}
@keyframes gsm-fab-pop {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.gsm-cart-fab:active {
    transform: scale(0.92);
    box-shadow: 0 2px 8px rgba(233, 30, 140, 0.25);
}
.gsm-cart-fab svg {
    width: 24px;
    height: 24px;
}
.gsm-cart-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* ========== PRODUCT CART SHEET ITEMS ========== */
.gsm-pcart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 8px;
}
.gsm-pcart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 12px;
}
.gsm-pcart-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}
.gsm-pcart-item-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
}
.gsm-pcart-item-thumb-placeholder svg {
    width: 24px;
    height: 24px;
    color: #9ca3af;
}
.gsm-pcart-item-info {
    flex: 1;
    min-width: 0;
}
.gsm-pcart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gsm-pcart-item-detail {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gsm-pcart-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}
.gsm-pcart-item-remove:active {
    background: #fecaca;
    color: #dc2626;
}
.gsm-pcart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    border: none;
    border-radius: var(--gsm-radius, 12px);
    background: linear-gradient(135deg, var(--gsm-pink), #c2185b);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease;
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-shrink: 0;
}
.gsm-pcart-checkout-btn:active {
    background: var(--gsm-pink-dark, #d11a7d);
}
.gsm-pcart-checkout-btn svg {
    width: 18px;
    height: 18px;
}

/* ========== DRIVER.JS MOBILE TOUR OVERRIDES ========== */
.driver-popover {
    max-width: 280px !important;
    font-size: 14px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2) !important;
}
.driver-popover .driver-popover-title {
    font-size: 16px !important;
    font-weight: 700 !important;
}
.driver-popover .driver-popover-description {
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #4a5568 !important;
}
.driver-popover .driver-popover-footer {
    gap: 6px !important;
}
.driver-popover .driver-popover-footer button {
    min-height: 36px !important;
    min-width: 36px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    -webkit-tap-highlight-color: transparent;
}
.driver-popover .driver-popover-progress-text {
    font-size: 11px !important;
}
/* Ensure tour overlay is above mobile UI */
.driver-overlay {
    z-index: 9998 !important;
}
.driver-active-element {
    z-index: 9999 !important;
}
.driver-popover {
    z-index: 10000 !important;
}

/* ========== PRODUCT DETAIL BOTTOM SHEET ========== */
.gsm-product-detail-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #f8fafc;
}
.gsm-product-detail-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 16px 0;
}
.gsm-product-detail-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 16px 0 10px 0;
}
.gsm-product-detail-action {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: var(--gsb-theme, #1e1e2d);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.gsm-product-detail-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.gsm-product-detail-action:not(:disabled):active {
    opacity: 0.8;
}

/* Size options in detail sheet — selected state */
#gsm-detail-sizes .gsm-size-option.selected {
    border-color: var(--gsb-theme, #1e1e2d);
    background: rgba(30, 30, 45, 0.05);
    box-shadow: 0 0 0 2px var(--gsb-theme, #1e1e2d);
}

/* ========== EXTRA OPTIONS ========== */
.gsm-extra-option-group {
    margin-bottom: 16px;
}
.gsm-extra-option-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.gsm-extra-option-req {
    color: #ef4444;
}
.gsm-extra-option-radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gsm-extra-option-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.gsm-extra-option-radio-item:active {
    background: #f8fafc;
}
.gsm-extra-option-radio-item.selected {
    border-color: var(--gsb-theme, #1e1e2d);
    background: rgba(30, 30, 45, 0.04);
}
.gsm-extra-option-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}
.gsm-extra-option-radio-item.selected .gsm-extra-option-radio-dot {
    border-color: var(--gsb-theme, #1e1e2d);
}
.gsm-extra-option-radio-item.selected .gsm-extra-option-radio-dot::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gsb-theme, #1e1e2d);
}
.gsm-extra-option-radio-text {
    flex: 1;
    font-size: 14px;
    color: #1e293b;
}
.gsm-extra-option-subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}
.gsm-extra-option-price {
    margin-left: auto;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}
.gsm-extra-option-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.gsm-extra-option-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gsm-extra-option-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    -webkit-tap-highlight-color: transparent;
}
.gsm-extra-option-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gsb-theme, #1e1e2d);
}
.gsm-extra-option-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
}
.gsm-extra-option-input:focus {
    border-color: var(--gsb-theme, #1e1e2d);
    outline: none;
}
.gsm-extra-option-color {
    width: 60px;
    height: 40px;
    padding: 4px;
    cursor: pointer;
}
.gsm-extra-option-input-fee {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

/* Option tables (table + pricing_table display types) */
.gsm-option-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
}
.gsm-option-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.gsm-option-table thead th {
    background: #f8fafc;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1.5px solid #e2e8f0;
}
.gsm-option-table tbody td {
    padding: 12px 12px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
.gsm-option-table tbody tr:last-child td {
    border-bottom: none;
}
.gsm-option-table-radio-col {
    width: 36px;
    text-align: center;
}
.gsm-option-table-radio-col input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--gsb-theme, #1e1e2d);
    cursor: pointer;
}
.gsm-option-table-row {
    cursor: pointer;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.gsm-option-table-row:active {
    background: #f8fafc;
}
.gsm-option-table-row.selected {
    background: rgba(30, 30, 45, 0.04);
}
.gsm-option-table-row.selected td {
    font-weight: 500;
}

/* Pricing table (display-only — no radio, no selection) */
.gsm-pricing-table .gsm-option-table-row {
    cursor: default;
}
.gsm-pricing-table .gsm-option-table-row:active {
    background: transparent;
}

/* ========== PWA INSTALL BANNER ========== */
.gsm-install-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: #fff;
    padding: 16px 20px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
    box-shadow: var(--gsm-shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(-100%);
    transition: transform var(--gsm-transition);
}

.gsm-install-banner.active {
    transform: translateY(0);
}

.gsm-install-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--gsm-radius);
    background: linear-gradient(135deg, var(--gsm-pink), var(--gsm-pink-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gsm-install-banner-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.gsm-install-banner-text {
    flex: 1;
    min-width: 0;
}

.gsm-install-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gsm-gray-900);
}

.gsm-install-banner-desc {
    font-size: 12px;
    color: var(--gsm-gray-500);
    margin-top: 2px;
}

.gsm-install-banner-desc .gsm-ios-share-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: -3px;
    margin: 0 2px;
}

.gsm-install-btn {
    padding: 8px 16px;
    border-radius: 9999px;
    border: none;
    background: var(--gsm-pink);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.gsm-install-btn:active {
    background: var(--gsm-pink-dark);
}

.gsm-install-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--gsm-gray-100);
    color: var(--gsm-gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.gsm-install-close:active {
    background: var(--gsm-gray-200);
}

.gsm-install-close svg {
    width: 14px;
    height: 14px;
}

/* ========== ENHANCED PRODUCT CARD ========== */
.gsm-product-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
