/* Component styles extracted from main.css */

/* --- Auth / Guest blocks --- */
.auth-block,
.guest-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.auth-block {
    background: var(--bg-surface);
    padding: 20px 24px;
}

.guest-block {
    background: var(--bg-subtle);
    padding: 20px 24px;
}

/* Centered container for the Steam auth content */
.login-wrapper {
    width: 1360px;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

/* Full-bleed section helper */
.full-bleed {
    /* Robust full-viewport strip regardless of container padding */
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
}

.login-section.full-bleed,
.guest-purchase-info.full-bleed {
    margin-top: 0;
    margin-bottom: 0;
}

/* Add vertical space between store grid and first auth strip */
.login-section.full-bleed {
    margin-top: var(--spacing-2xl);
}

/* Neutralize positional shift for auth/guest strips; use visual full-bleed via shadows */
.login-section.full-bleed,
.guest-purchase-info.full-bleed {
    left: 0;
    right: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Cancel horizontal container padding so strips touch both viewport edges */
.login-section.full-bleed,
.guest-purchase-info.full-bleed {
    margin-left: calc(-1 * var(--spacing-md));
    margin-right: calc(-1 * var(--spacing-md));
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

@media (min-width: 768px) and (max-width: 1199px) {

    .login-section.full-bleed,
    .guest-purchase-info.full-bleed {
        margin-left: calc(-1 * var(--spacing-xl));
        margin-right: calc(-1 * var(--spacing-xl));
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
}

@media (min-width: 1200px) {

    .login-section.full-bleed,
    .guest-purchase-info.full-bleed {
        margin-left: calc(-1 * var(--spacing-2xl));
        margin-right: calc(-1 * var(--spacing-2xl));
        padding-left: var(--spacing-2xl);
        padding-right: var(--spacing-2xl);
    }
}

/* Cancel the container's vertical padding so strips touch top/bottom edges */
.container>.full-bleed:first-child {
    margin-top: calc(-1 * var(--spacing-md));
}

.container>.full-bleed {
    margin-bottom: calc(-1 * var(--spacing-md));
}

@media (min-width: 768px) {
    .container>.full-bleed:first-child {
        margin-top: calc(-1 * var(--spacing-lg));
    }

    .container>.full-bleed {
        margin-bottom: calc(-1 * var(--spacing-lg));
    }
}

.auth-title {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.auth-title h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-ink);
    font-weight: 800;
}

.auth-sub {
    color: var(--text-ink);
    font-size: 16px;
    text-align: center;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-primary);
    color: var(--bg-surface);
    padding: 10px 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
    border: 0;
    box-shadow: none;
    filter: none;
}

.auth-button img {
    width: 16px;
    height: 16px;
    filter: invert(1) brightness(2);
}

.auth-button span {
    font-size: 14px;
}

.auth-button:hover {
    background: var(--brand-primary);
    color: var(--bg-surface);
    text-decoration: none;
    filter: none;
    box-shadow: none;
}

/* Make icons inside buttons inherit text color */
.auth-button .icon {
    background-color: currentColor;
}

.guest-title {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.guest-title h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-ink);
    font-weight: 700;
}

.guest-sub {
    color: var(--text-ink);
    font-size: 16px;
    text-align: center;
}

/* Make guest block visually full-bleed using large inset shadows. */
.guest-block.full-bleed {
    box-shadow: 9999px 0 0 0 var(--bg-subtle), -9999px 0 0 0 var(--bg-subtle);
    border-radius: 0;
}

/* Make the auth (white) strip visually full-width as well */
.auth-block.full-bleed {
    box-shadow: 9999px 0 0 0 var(--bg-surface), -9999px 0 0 0 var(--bg-surface);
    border-radius: 0;
}

/* Remove container bottom padding visually so the strip touches the footer */
.guest-block.full-bleed {
    margin-bottom: calc(-1 * var(--spacing-2xl));
}

@media (min-width: 768px) {
    .guest-block.full-bleed {
        margin-bottom: calc(-1 * var(--spacing-3xl));
    }
}

@media (min-width: 1200px) {
    .guest-block.full-bleed {
        margin-bottom: calc(-1 * var(--spacing-4xl));
    }
}

/* Additional login wrapper (legacy definition) */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 1.5rem;
}

/* --- Header / Navigation --- */
nav .container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background-color: var(--bg-surface);
    z-index: 1000;
    gap: var(--spacing-sm);
    /* Mobile-first navigation padding */
    padding: var(--spacing-sm) var(--spacing-md);
}

@media (min-width: 768px) {
    nav .container {
        gap: var(--spacing-md);
        padding: var(--spacing-sm) var(--spacing-2xl);
    }
}

nav a {
    text-decoration: none;
    color: var(--text-ink);
    /* Mobile-first touch-friendly padding */
    padding: var(--spacing-md) var(--spacing-sm);
    transition: color var(--transition-slow);
    /* Ensure minimum touch target size */
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

nav a:hover {
    color: var(--brand-primary);
    background-color: var(--bg-subtle);
}

@media (min-width: 768px) {
    nav a {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Header - Grid-Aligned Layout System */
.site-header {
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1px solid #141414;
}

.header-bar {
    width: 100%;
}

.header-content {
    width: 100%;
    max-width: var(--layout-shell-desktop);
    margin: 0 auto;
    padding: var(--spacing-md) var(--header-padding-mobile);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: var(--header-min-height-mobile);
    gap: 16px;

    /* Ensure header container width matches main content container */
    width: 100%;
    box-sizing: border-box;

    /* Override any container class background */
    background-color: transparent;
}

/* Tablet breakpoint - align with content grid */
@media (min-width: 768px) {
    .header-content {
        padding: var(--spacing-md) var(--header-padding-tablet);
        gap: 24px;
    }
}

/* Desktop breakpoint - precise grid alignment */
@media (min-width: 1200px) {
    .header-content {
        min-height: var(--header-min-height-desktop);
        padding: var(--spacing-md) var(--header-padding-desktop);
        gap: 24px;

        /* Grid alignment calculation for 1360px container:
         * Store grid: 4 cards (310px each) + 3 gaps (40px each) = 1360px total
         * Centered in 1360px container with 40px padding on each side
         * Header should align logo with left edge of first card
         * and language buttons with right edge of last card */
    }
}

/* Grid alignment system - align header with store grid at all breakpoints */

/* Desktop: 4 cards layout (1440px+ screens) */
@media (min-width: 1440px) {
    .header-content {
        /* Store grid: 4×310px + 3×40px = 1360px total width */
        /* Main container has 40px padding, so cards start at 40px from viewport edge */
        gap: 32px;
    }
}

/* Large desktop: 3 cards layout (1080px - 1439px screens) */
@media (min-width: 1080px) and (max-width: 1439px) {
    .header-content {
        gap: 28px;
    }
}

/* Tablet: 2 cards layout (720px - 1079px screens) */
@media (min-width: 720px) and (max-width: 1079px) {
    .header-content {
        gap: 20px;
    }
}

/* Mobile: 1 card layout (below 720px) */
@media (max-width: 719px) {
    .header-content {
        /* Store grid: 1 card, full width with padding */
        /* Keep flexbox for mobile for better wrapping */
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 16px;
        /* Ensure proper alignment on mobile */
        align-content: flex-start;
    }

    /* Mobile navigation layout improvements */
    .nav-links {
        /* Ensure nav-links wrap properly and maintain alignment */
        order: 3;
        /* Move navigation below logo and nav-right on wrap */
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 8px;
    }

    .logo-wrap {
        order: 1;
        flex-shrink: 0;
    }

    .nav-right {
        order: 2;
        flex-shrink: 0;
        flex-basis: auto;
    }

    .avatar-dropdown {
        min-width: 40px;
    }
}

/* Prevent horizontal overflow on very small screens */
@media (max-width: 480px) {
    .header-content {
        padding: var(--spacing-md) 12px;
        gap: 8px;
    }

    .nav-links {
        gap: 8px;
        /* Ensure navigation items stay properly aligned */
        justify-content: center;
        margin-top: 12px;
    }

    .tab {
        padding: 8px 10px;
        font-size: 14px;
        /* Maintain minimum touch target even on small screens */
        min-height: 44px;
        min-width: 44px;
        /* Better text alignment for small tabs */
        white-space: nowrap;
    }

    .tab-icon {
        /* Adjust icon tabs for better mobile experience */
        flex-direction: column;
        gap: 2px;
        padding: 6px 8px;
    }

    .tab-icon span {
        font-size: 12px;
        line-height: 1;
    }

    .lang-pill {
        padding: 8px 10px;
        font-size: 14px;
        min-width: 44px;
        min-height: 44px;
    }
}

.logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.logo-sub {
    font-family: 'Jura', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-ink);
}

/* Tablet and desktop logo styling */
@media (min-width: 768px) {
    .logo-wrap {
        gap: 6px;
    }

    .logo-image {
        width: 48px;
        height: 48px;
    }

    .logo-sub {
        font-size: 13px;
    }
}

@media (min-width: 1200px) {
    .logo-wrap {
        gap: 8px;
    }

    .logo-image {
        width: 56px;
        height: 56px;
    }

    .logo-sub {
        font-size: 14px;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    /* Ensure proper alignment and spacing */
    justify-content: flex-start;
}

/* Mobile navigation improvements */
@media (max-width: 767px) {
    .nav-links {
        /* Ensure proper flexbox layout with wrapping */
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px;
        width: 100%;
        /* Add proper spacing from other elements */
        margin-top: 8px;
        padding: 8px 0;
    }

    .tab {
        /* Ensure all touch targets meet 44px minimum */
        min-height: 44px;
        min-width: 44px;
        padding: 10px 12px;
        /* Better text alignment */
        justify-content: center;
        text-align: center;
        /* Prevent text overflow */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tab-icon {
        /* Stack icon and text vertically on mobile for better space usage */
        flex-direction: column;
        gap: 4px;
        padding: 8px 10px;
        min-width: 60px;
        /* Slightly wider for icon + text */
    }

    .tab-icon span {
        font-size: 12px;
        line-height: 1.2;
    }

    .tab-icon img {
        width: 20px;
        height: 20px;
    }
}

/* Tablet and desktop navigation spacing */
@media (min-width: 768px) {
    .nav-links {
        gap: 24px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        width: auto;
        margin-top: 0;
        padding: 0;
    }
}

@media (min-width: 1200px) {
    .nav-links {
        gap: 48px;
    }
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 12px;
    color: var(--text-ink);
    text-decoration: none;
    font-family: 'Jura', sans-serif;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 44px;
    /* Minimum touch target for mobile */
    min-width: 44px;
    /* Minimum touch target width for mobile */
    box-sizing: border-box;
    /* Ensure proper touch target alignment */
    text-align: center;
}

/* Tablet and desktop tab styling */
@media (min-width: 768px) {
    .tab {
        gap: 8px;
        padding: 4px 18px;
        font-size: 18px;
        min-height: auto;
    }
}

@media (min-width: 1200px) {
    .tab {
        padding: 4px 24px;
        font-size: 20px;
    }
}

.tab-active {
    background: var(--text-ink);
    color: var(--bg-surface);
}

/* Ensure active pill stays dark on hover */
.tab.tab-active:hover {
    background: var(--text-ink);
    color: var(--bg-surface);
}

/* Standard hover for inactive tabs */
.tab:hover {
    background: var(--bg-subtle);
}

/* Focus states for accessibility */
.tab:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    background: var(--bg-subtle);
}

.tab:focus:not(:focus-visible) {
    outline: none;
}

.tab:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    background: var(--bg-subtle);
}

.tab-icon img {
    display: block;
    width: 24px;
    height: 24px;
}

.lang-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 8px;
    font-family: 'Jura', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    line-height: 1;
    border: 1px solid transparent;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
    /* Minimum touch target for mobile */
    min-width: 44px;
}

/* Tablet and desktop language pill styling */
@media (min-width: 768px) {
    .lang-pill {
        padding: 8px 12px;
        font-size: 18px;
        min-height: auto;
        min-width: auto;
    }
}

@media (min-width: 1200px) {
    .lang-pill {
        font-size: 20px;
    }
}

.lang-pill.active {
    background: var(--text-ink);
    color: var(--bg-surface);
    cursor: default;
}

.lang-pill.inactive {
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
}

/* Keep active language pill dark on hover */
.lang-pill.active:hover {
    background: var(--text-ink);
    color: var(--bg-surface);
}

/* Ensure hover doesn't add extra shadow/transform beyond button size */
.lang-pill:hover {
    box-shadow: none;
    transform: none;
}

/* Subtle hover for inactive language: keep transparent, only darken text */
.lang-pill.inactive:hover {
    background: transparent;
    color: var(--text-ink);
}

/* Focus states for language pills */
.lang-pill:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.lang-pill:focus:not(:focus-visible) {
    outline: none;
}

.lang-pill:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.lang-pill.active:focus,
.lang-pill.active:focus-visible {
    outline-color: var(--bg-surface);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Tablet and desktop nav-right spacing */
@media (min-width: 768px) {
    .nav-right {
        gap: 12px;
    }
}

@media (min-width: 1200px) {
    .nav-right {
        gap: 1rem;
    }
}

.steam-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* Tablet and desktop avatar sizing */
@media (min-width: 768px) {
    .steam-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 1200px) {
    .steam-avatar {
        width: 2rem;
        /* 32px */
        height: 2rem;
        /* 32px */
    }
}

.avatar-dropdown {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Invisible hover area extension for better usability */
.avatar-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
    z-index: 1;
    pointer-events: auto;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-normal);
    z-index: 1000;
    /* Add padding to dropdown area for better hover tolerance */
    margin-top: 8px;
}

/* Show dropdown on hover with immediate appearance */
.avatar-dropdown:hover .dropdown-menu,
.avatar-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0ms;
}

/* Hide dropdown with 300ms delay for better user experience */
.dropdown-menu {
    transition-delay: 300ms;
}

/* Override delay when showing dropdown */
.avatar-dropdown:hover .dropdown-menu,
.avatar-dropdown:focus-within .dropdown-menu {
    transition-delay: 0ms;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-ink);
    text-decoration: none;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    transition: background-color var(--transition-fast);
    /* Ensure minimum touch target size */
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
}

.dropdown-menu a:hover {
    background: var(--bg-subtle);
    color: var(--text-ink);
}

.dropdown-menu a:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: -2px;
    background: var(--bg-subtle);
}

/* First and last item border radius */
.dropdown-menu a:first-child {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Single item gets full border radius */
.dropdown-menu a:only-child {
    border-radius: var(--border-radius);
}

/* --- VIP Dropdown Styles --- */
.dropdown {
    position: relative;
    width: 270px !important;
    margin-bottom: 0;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
}

/* Desktop specific width */
@media (min-width: 768px) {
    .dropdown {
        width: 270px !important;
        max-width: 270px;
        min-width: 270px;
    }
}

.dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-colors);
    position: relative;
    min-height: 48px;
    box-sizing: border-box;
    /* Fix for jagged corners - force GPU acceleration and smooth rendering */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Alternative approach: use box-shadow instead of border for smoother rendering */
    border: none;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.dropdown-toggle::after {
    content: '▼';
    color: var(--text-ink);
    font-size: 12px;
    margin-left: var(--spacing-sm);
    transition: transform var(--transition-normal);
    opacity: 0.6;
}

.dropdown-toggle:hover {
    box-shadow: inset 0 0 0 1px var(--brand-primary);
}

.dropdown.open .dropdown-toggle {
    box-shadow: inset 0 0 0 1px var(--brand-primary), inset 0 -1px 0 0 var(--bg-surface);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown.open .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-toggle>span {
    font-weight: var(--font-weight-medium);
    color: var(--text-ink);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    /* Allow flex item to shrink */
}

.dropdown-toggle>div {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 100px;
    justify-content: flex-end;
    height: 20px;
}

.dropdown-content {
    position: absolute;
    top: 55px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border: none;
    box-shadow: inset 0 0 0 1px var(--brand-primary), var(--shadow-md);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
    box-sizing: border-box;
    /* Fix for jagged corners on dropdown content */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.dropdown-content .option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    cursor: pointer;
    transition: var(--transition-colors);
    border-bottom: 1px solid var(--border-subtle);
    min-height: 48px;
    box-sizing: border-box;
    width: 100%;
    background: var(--bg-surface);
}

.dropdown-content .option:hover {
    background: var(--bg-subtle);
}

.dropdown-content .option:last-child {
    border-bottom: none;
}



.dropdown-content .option>span {
    font-weight: var(--font-weight-medium);
    color: var(--text-ink);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: var(--spacing-md);
    min-width: 0;
    /* Allow flex item to shrink */
}

.dropdown-content .option>div {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 100px;
    justify-content: flex-end;
    height: 20px;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    min-width: 45px;
    text-align: right;
    display: inline-block;
    vertical-align: middle;
}

.current-price {
    color: var(--text-ink);
    font-weight: var(--font-weight-semibold);
    min-width: 45px;
    text-align: right;
    display: inline-block;
    vertical-align: middle;
}

/* Desktop specific dropdown positioning */
@media (min-width: 768px) {
    .dropdown-content {
        top: 58px;
    }
}

/* Mobile responsive adjustments for dropdown */
@media (max-width: 767px) {
    .dropdown {
        width: 100%;
        max-width: none;
        min-width: auto;
    }

    .dropdown-toggle,
    .dropdown-content .option {
        min-height: 48px;
        padding: var(--spacing-md);
        width: 100%;
    }

    .dropdown-toggle>span,
    .dropdown-content .option>span {
        font-size: var(--font-size-sm);
        flex: 1;
    }

    .dropdown-toggle>div,
    .dropdown-content .option>div {
        min-width: 60px;
        flex-shrink: 0;
    }

    .old-price {
        font-size: var(--font-size-xs);
        min-width: 30px;
    }

    .current-price {
        font-size: var(--font-size-sm);
        min-width: 30px;
    }

    .dropdown-toggle::after {
        font-size: 10px;
    }

    .dropdown-content {
        width: 100%;
        left: 0;
        right: 0;
    }
}

/* --- Form Styles --- */
.form-input {
    width: 100%;
    max-width: 600px;
    padding: var(--spacing-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-family: inherit;
    background: var(--bg-surface);
    color: var(--text-ink);
    transition: var(--transition-colors);
    box-sizing: border-box;
    min-height: var(--touch-target-min);
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 2px rgba(87, 125, 251, 0.2);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-button {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--brand-primary);
    color: var(--bg-surface);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: var(--transition-colors);
    min-height: var(--touch-target-min);
    box-sizing: border-box;
    margin-top: var(--spacing-lg);
}

.form-button:hover {
    background: var(--brand-primary);
    filter: brightness(0.95);
}

.error-message {
    color: var(--status-danger);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: var(--spacing-md) 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
}

.checkbox-wrapper label {
    font-size: var(--font-size-base);
    color: var(--text-ink);
    cursor: pointer;
}

/* --- Payment Method Selector --- */
.payment-method-selector {
    margin: var(--spacing-xl) 0;
}

.payment-method-selector h3 {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--text-ink);
}

.payment-method-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    cursor: pointer;
    transition: var(--transition-colors);
    background: var(--bg-surface);
}

.payment-method-option:hover {
    border-color: var(--brand-primary);
    background: var(--bg-subtle);
}

.payment-method-option.selected {
    border-color: var(--brand-primary);
    background: var(--bg-subtle);
    box-shadow: 0 0 0 2px rgba(87, 125, 251, 0.2);
}

.method-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
}

.method-icon {
    width: 24px;
    height: 24px;
    color: var(--text-ink);
    flex-shrink: 0;
}

.method-icon svg {
    transition: all 0.2s ease;
}

.method-icon .payment-icon {
    transition: filter 0.2s ease;
}

.payment-method-option.selected .method-icon .payment-icon {
    filter: none;
}

.payment-method-option:hover .method-icon .payment-icon {
    filter: none;
}

.payment-method-option.selected:hover .method-icon .payment-icon {
    filter: none;
}

.method-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.method-name {
    font-weight: var(--font-weight-medium);
    color: var(--text-ink);
}

.method-fee {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.method-total {
    flex-shrink: 0;
}

.total-amount {
    font-weight: var(--font-weight-semibold);
    color: var(--text-ink);
    font-size: var(--font-size-lg);
}

/* Mobile responsive adjustments for payment methods */
@media (max-width: 767px) {
    .payment-method-option {
        min-height: var(--touch-target-min);
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .method-info {
        gap: var(--spacing-sm);
    }

    .method-name {
        font-size: var(--font-size-sm);
    }

    .method-fee {
        font-size: var(--font-size-xs);
    }

    .total-amount {
        font-size: var(--font-size-base);
    }
}

/* --- Alert Styles --- */
.alert {
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-xl);
    border: 1px solid transparent;
}

.alert h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

.alert ul {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.alert li {
    margin-bottom: var(--spacing-xs);
}

.alert-success {
    background: var(--status-success-weak);
    border-color: var(--status-success);
    color: var(--status-success-strong);
}

.alert-error {
    background: var(--status-danger);
    border-color: var(--status-danger-strong);
    color: var(--bg-surface);
}

.alert-error h3 {
    color: var(--bg-surface);
}

.alert-error a {
    color: var(--bg-surface);
    text-decoration: underline;
}

.alert-error a:hover {
    color: var(--bg-surface);
    opacity: 0.8;
}

/* --- Footer --- */
.site-footer {
    /* Black_text background from Figma */
    background: #141414;
    padding: 24px var(--header-padding-desktop);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: auto;
    margin-top: auto;
    /* Ensure footer sticks to bottom */
    position: relative;
    z-index: 1;
}

.footer-content {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 16px;
}

.copyright-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg from Figma */
    text-align: left;
    margin: 0;
}

.version-tag {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 130%;
    color: #7E839C;
    /* Grey_text */
    padding: 4px 8px;
    background: rgba(243, 243, 243, 0.1);
    border-radius: 4px;
}

/* Mobile responsive footer */
@media (max-width: 767px) {
    .site-footer {
        padding: 16px var(--header-padding-mobile);
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }

    .copyright-text {
        font-size: 14px;
    }

    .version-tag {
        font-size: 12px;
    }
}

/* Tablet responsive footer */
@media (min-width: 768px) and (max-width: 1199px) {
    .site-footer {
        padding: 24px var(--header-padding-tablet);
    }
}

/* --- Store Card component --- */
.store-card {
    width: 310px;
    /* Fixed width from Figma design */
    background: var(--bg-subtle);
    /* Light_Blue_Fill from Figma */
    border: 1px solid var(--text-ink);
    /* Black_text border from Figma */
    border-radius: 8px;
    /* Figma border radius */
    box-shadow: none;
    overflow: visible;
    /* Allow badge to extend outside - needed for Figma positioning */
    position: relative;
    /* For badge positioning */
    display: flex;
    flex-direction: column;
}

/* --- Owned Card component (My Skins) --- */
.owned-card {
    width: 310px;
    background: var(--bg-subtle);
    border: 1px solid var(--text-ink);
    border-radius: 8px;
    box-shadow: none;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Inactive cards: gray the border to match subdued content, keep CTA vivid */
.owned-card--inactive {
    border-color: var(--text-muted);
}

/* Intentionally no base styles on the container; scoped grayscale below */
/* Grey-out only non-CTA elements for inactive cards; keep the CTA fully vivid */
.owned-card--inactive .owned-card__media,
.owned-card--inactive .owned-card__title-row,
.owned-card--inactive .owned-card__rule,
.owned-card--inactive .owned-card__meta {
    opacity: 0.6;
    filter: grayscale(0.35);
}

.owned-card__expired-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--error-color, #dc3545);
    color: var(--bg-surface, #ffffff);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.owned-card__expired-text {
    display: block;
    white-space: nowrap;
}

.owned-card__media {
    padding: 16px 16px 0 16px;
    background: var(--bg-subtle);
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.owned-card__img {
    display: block;
    width: 279px;
    height: 209px;
    object-fit: cover;
    border-radius: 4px;
}

.owned-card__content {
    background: var(--bg-subtle);
    padding: 16px;
    position: relative;
    border-radius: 0 0 8px 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.owned-card__title-row {
    position: relative;
    display: block;
    margin-bottom: 16px;
}

.owned-card__title {
    font-family: 'Jura', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
    max-width: 215px;
    line-height: 130%;
    padding-right: 70px;
}

.owned-card__badge {
    position: absolute;
    top: 0;
    left: 232px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--text-ink);
    color: var(--bg-surface);
    padding: 4px;
    border-radius: 4px 0 0 4px;
    font-weight: 400;
    font-size: 13px;
    width: 62px;
    height: 24px;
    box-sizing: border-box;
    justify-content: center;
    z-index: 2;
}

.owned-card__badge .icon {
    background-color: var(--bg-surface);
}

.owned-card__rule {
    height: 1px;
    background: var(--border-subtle);
    margin: 0 0 16px 0;
}

.owned-card__meta {
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.owned-card__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.owned-card__meta-row dt {
    color: var(--text-muted);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 130%;
}

.owned-card__meta-row dd {
    margin: 0;
    color: var(--text-ink);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 130%;
    text-align: right;
}

.owned-card__cta {
    display: flex;
    align-items: stretch;
    padding: 0;
    width: 100%;
    min-height: 27px;
    margin-top: auto;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.owned-card__details {
    background: var(--brand-primary);
    color: var(--bg-surface);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    line-height: 130%;
    padding: 8px;
    gap: 8px;
    flex: 1;
    width: 100%;
    min-height: 27px;
    border: 0;
    box-sizing: border-box;
    border-radius: 8px;
}

.owned-card__details:hover {
    background: var(--brand-primary);
    text-decoration: none;
    color: var(--bg-surface);
    box-shadow: none;
    filter: none;
}

.owned-card--inactive .owned-card__details {
    background: var(--brand-primary);
    color: var(--bg-surface);
}

.owned-card--inactive .owned-card__details:hover {
    background: var(--brand-primary);
    color: var(--bg-surface);
    box-shadow: none;
}

@media (max-width: 719px) {
    .owned-card {
        width: 100%;
        max-width: 310px;
        margin: 0 auto;
    }

    .owned-card__img {
        width: 100%;
        height: 209px;
    }
}

/* Inactive (not-owned) visual state for My Skins page */
.store-card--inactive {
    opacity: 0.55;
    filter: grayscale(0.35);
}
.store-card--inactive .store-card__buy {
    background: var(--bg-muted);
    color: var(--text-muted);
    cursor: pointer;
}
.store-card--inactive .store-card__price {
    color: var(--text-muted);
}

.store-card__media {
    padding: 16px 16px 0 16px;
    /* Figma padding */
    background: var(--bg-subtle);
    /* match content background */
    border-radius: 8px 8px 0 0;
    /* Round top corners to match card */
    flex-shrink: 0;
}

.store-card__img {
    display: block;
    width: 279px;
    /* Figma width */
    height: 209px;
    /* Figma height */
    object-fit: cover;
    border-radius: 4px;
    /* Figma border radius */
    /* Ensure images load immediately and consistently */
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Error state styling for broken images */
.store-card__img[src*="favicon.png"] {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
}

.store-card__content {
    background: var(--bg-subtle);
    padding: 16px;
    /* More breathing room */
    position: relative;
    border-radius: 0 0 8px 8px;
    /* Round bottom corners to match card */
    display: flex;
    flex-direction: column;
    flex: 1;
}

.store-card__title-row {
    position: relative;
    display: block;
    margin-bottom: 16px;
    /* Space before meta section */
}

.store-card__title {
    font-family: 'Jura', sans-serif;
    font-size: 16px;
    /* Figma */
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
    max-width: 215px;
    /* Figma max-width */
    line-height: 130%;
    /* Figma line-height */
    padding-right: 70px;
    /* Space for badge */
    white-space: nowrap;
}

.store-card__badge {
    position: absolute;
    top: 0;
    /* Align with title baseline */
    left: 232px;
    /* Keep original Figma horizontal position */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--text-ink);
    /* Black_text from Figma */
    color: var(--bg-surface);
    padding: 4px;
    /* Figma padding */
    border-radius: 4px 0 0 4px;
    /* Figma border radius */
    font-weight: 400;
    font-size: 13px;
    width: 62px;
    /* Figma width */
    height: 24px;
    /* Figma height */
    box-sizing: border-box;
    justify-content: center;
    z-index: 2;
    /* Above other elements */
}

.store-card__badge-icon {
    font-size: 16px;
}

.store-card__badge .icon {
    background-color: var(--bg-surface);
}

.store-card__badge-icon.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

.store-card__rule {
    height: 1px;
    background: var(--border-subtle);
    /* Light_blue_details from Figma */
    margin: 0 0 16px 0;
    /* Space after rule */
}

.store-card__meta {
    margin: 0 0 16px 0;
    /* Space before CTA */
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Comfortable spacing between rows */
}

.store-card__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    /* Vertical padding for better spacing */
}

.store-card__meta-row:last-child {
    border-bottom: 0;
}

.store-card__meta-row dt {
    color: var(--text-muted);
    /* Grey_text from Figma */
    font-size: 12px;
    /* Figma font size */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 130%;
}

.store-card__meta-row dd {
    margin: 0;
    color: var(--text-ink);
    /* Black_text from Figma */
    font-size: 12px;
    /* Figma font size */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 130%;
    text-align: right;
}

.store-card__cta {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 0;
    width: 100%;
    /* Full width of card content */
    min-height: 27px;
    /* Maintain Figma height while allowing taller content */
    margin-top: auto;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.store-card__price {
    background: var(--bg-surface);
    /* White_bg from Figma */
    border: 1px solid var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    /* Figma font size */
    font-weight: 400;
    /* Figma font weight */
    font-family: 'Inter', sans-serif;
    line-height: 130%;
    padding: 8px;
    /* Consistent padding with buy button */
    gap: 8px;
    flex: 1;
    /* Equal width distribution */
    width: 50%;
    /* Explicit 50% width for equal sizing */
    min-height: 27px;
    /* Allow stretch for taller content */
    box-sizing: border-box;
    border-radius: 8px 0 0 8px;
    /* Figma border radius */
    white-space: nowrap;
}

.store-card__buy {
    /* From Figma CSS: button/buy specifications */
    background: var(--brand-primary);
    /* Blue_select from Figma */
    color: var(--bg-surface);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    /* Figma font size */
    font-weight: 400;
    /* Figma font weight */
    font-family: 'Inter', sans-serif;
    line-height: 130%;
    /* 19px from Figma */
    padding: 8px;
    /* Consistent padding with price */
    gap: 8px;
    flex: 1;
    /* Equal width distribution */
    width: 50%;
    /* Explicit 50% width for equal sizing */
    min-height: 27px;
    /* Allow stretch for taller content */
    border: 0;
    box-sizing: border-box;
    box-shadow: none;
    text-shadow: none;
    filter: none;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    /* Figma border radius */
    white-space: nowrap;
}

.store-card__buy:hover {
    background: var(--brand-primary);
    text-decoration: none;
    color: var(--bg-surface);
    box-shadow: none;
    filter: none;
}

/* Ensure button text elements are properly aligned */
.store-card__buy span,
.store-card__buy .btn-text {
    /* Inter/Inter_15_Regular - PriceCard from Figma */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 130%;
    /* 19px */
    color: var(--bg-surface);
    /* White_bg from Figma */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 719px) {
    .store-card {
        width: 100%;
        /* Full width on mobile */
        max-width: 310px;
        /* But don't exceed Figma width */
        margin: 0 auto;
        /* Center the card */
    }

    .store-card__img {
        width: 100%;
        height: 209px;
        /* Maintain Figma proportions */
    }

    .store-card__meta-row,
    .store-card__cta {
        width: 100%;
        /* Full width on mobile */
    }

    .store-card__price {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .store-card__img {
        height: 180px;
        /* Slightly smaller on very small screens */
    }

    .store-card__title {
        font-size: 14px;
        /* Smaller title on mobile */
    }

    .store-card__meta-row dt,
    .store-card__meta-row dd {
        font-size: 11px;
        /* Smaller meta text */
    }

    .store-card__price {
        font-size: 13px;
        /* Smaller price text */
    }

    .store-card__buy {
        /* Prevent iOS zoom while maintaining readability */
        font-size: max(15px, 16px);
        /* Ensure proper text centering with mobile adjustments */
        line-height: 1.2;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* --- Purchase Modal component --- */
.purchase-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.purchase-modal.open {
    display: flex;
}

/* Slight blur and dim exactly like the reference */
.purchase-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Container matches Figma payment_card specifications */
.purchase-modal__dialog {
    position: relative;
    width: 1360px;
    /* Exact Figma width */
    height: 902px;
    /* Exact Figma height */
    background: #F3F3F3;
    /* White_bg from Figma */
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    /* Exact Figma shadow */
    border-radius: 32px;
    /* Exact Figma border-radius */
    overflow: hidden;
}

/* Mobile responsive modal sizing - 95% width */
@media (max-width: 767px) {
    .purchase-modal__dialog {
        width: 95%;
        height: auto;
        max-height: 95vh;
        overflow-y: auto;
    }
}

.purchase-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    color: var(--text-muted);
    font-size: 26px;
    line-height: 1;
    border: 0;
    cursor: pointer;
    z-index: 2;
}

.purchase-modal__content {
    display: flex;
    /* Change to flex to match Figma layout */
    width: 100%;
    height: 100%;
    gap: 16px;
    padding: 32px;
    /* Figma padding */
    box-sizing: border-box;
}

.purchase-modal__left {
    flex: 0 0 857px;
    /* Exact Figma Frame 14 width */
    height: 800px;
    /* Exact Figma Frame 14 height */
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.purchase-modal__image-frame {
    width: 857px;
    /* Exact Figma Frame 14 width */
    height: 800px;
    /* Exact Figma Frame 14 height */
    border-radius: 40px;
    /* Exact Figma border-radius */
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.purchase-modal__image-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure images load immediately and consistently */
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Error state styling for broken images in modal */
.purchase-modal__image-frame img[src*="favicon.png"] {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
}

.purchase-modal__right {
    flex: 1;
    max-width: 419px;
    /* Exact Figma info width */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    /* Reduced gap to bring elements closer */
    position: relative;
}

/* Pack badge from Figma pack_mark_paymentCard */
.purchase-modal__pack-badge {
    position: absolute;
    top: -7px;
    /* Exact Figma positioning */
    right: 0;
    width: 140px;
    /* Exact Figma width */
    height: 56px;
    /* Exact Figma height */
    background: #141414;
    /* Exact Figma Black_text */
    border-radius: 16px 0px 0px 16px;
    /* Exact Figma border-radius */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    /* Exact Figma padding */
    gap: 16px;
    /* Exact Figma gap */
    box-sizing: border-box;
}

.purchase-modal__title {
    font-family: 'Jura', sans-serif;
    /* Exact Figma font */
    font-weight: 700;
    /* Exact Figma weight */
    font-size: 32px;
    /* Exact Figma Jura_32_Bold size */
    line-height: 130%;
    /* Exact Figma line-height */
    text-align: center;
    color: #141414;
    /* Exact Figma Black_text */
    margin: 0 0 -24px 0;
    /* Larger negative bottom margin to further reduce space below title */
    width: 419px;
    /* Exact Figma width */
}

.purchase-modal__pack-badge .icon {
    width: 24px;
    /* Exact Figma icon size */
    height: 24px;
    background-color: #F3F3F3;
    /* Exact Figma White_bg */
}

.purchase-modal__pack-badge .pack-text {
    font-family: 'Inter', sans-serif;
    /* Exact Figma font */
    font-size: 20px;
    /* Exact Figma size */
    font-weight: 400;
    line-height: 130%;
    color: #F3F3F3;
    /* Exact Figma White_bg */
    margin: 0;
}

.purchase-modal__meta-table {
    width: 419px;
    /* Exact Figma width */
    border-top: 1px solid #C9CCDB;
    /* Exact Figma Light_blue_details */
    padding: 16px 0px 8px;
    /* Exact Figma padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    /* Exact Figma gap */
}

.purchase-modal__meta-table .meta-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    width: 419px;
    /* Exact Figma width */
    height: 12px;
    /* Exact Figma height */
}

.purchase-modal__meta-table .meta-label {
    font-family: 'Inter', sans-serif;
    /* Exact Figma font */
    font-size: 16px;
    /* Exact Figma Inter_16_Regular */
    font-weight: 400;
    line-height: 130%;
    color: #7E839C;
    /* Exact Figma Grey_text */
    flex: none;
    order: 0;
    flex-grow: 0;
}

.purchase-modal__meta-table .meta-value {
    font-family: 'Inter', sans-serif;
    /* Exact Figma font */
    font-size: 16px;
    /* Exact Figma Inter_16_Regular */
    font-weight: 400;
    line-height: 130%;
    text-align: right;
    color: #141414;
    /* Exact Figma Black_text */
    flex: none;
    order: 1;
    flex-grow: 1;
}

.purchase-modal__chips {
    /* Auto layout from Figma middle section */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0px;
    gap: 72px;
    /* Exact Figma gap */
    width: 352px;
    /* Exact Figma width */
    height: 74px;
    /* Exact Figma height */
    margin: 32px 0 0 0;
    /* Add top margin only to maintain consistent spacing */
}

/* Chips - Base styles */
.chip {
    box-sizing: border-box;
}

.chip-dark {
    /* Skins - Auto layout from Figma */
    display: flex;
    flex-direction: column;
    /* Changed to column for vertical layout */
    justify-content: center;
    align-items: center;
    padding: 16px 32px;
    gap: 4px;
    width: 140px;
    height: 74px;

    /* Black_text background from Figma */
    background: #141414;
    border-radius: 16px;

    /* Inside auto layout */
    flex: none;
    order: 0;
    flex-grow: 0;
}

.chip-dark .chip-label {
    /* Inter/Inter_20_Regular - Button */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    text-align: center;
    color: #F3F3F3;
    margin: 0;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.chip-dark .chip-count {
    /* Inter/Inter_20_Regular - Button */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    text-align: center;
    color: #F3F3F3;
    margin: 0;
    flex: none;
    order: 1;
    flex-grow: 0;
}

.chip-dark .chip-count-suffix {
    /* Inter/Inter_20_Regular - Button */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    text-align: center;
    color: #F3F3F3;
    margin: 0;
    display: inline;
}

/* Pack badge chip - from Figma pack_mark_paymentCard */
.chip-dark.pack-badge {
    /* Auto layout from Figma */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
    position: absolute;
    width: 140px;
    height: 56px;
    left: calc(50% - 140px/2 + 610px);
    top: 51px;

    /* Black_text from Figma */
    background: #141414;
    border-radius: 16px 0px 0px 16px;

    /* Typography from Figma */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 20px;
    /* From Figma Inter_20_Regular */
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg */
}

.chip-dark.pack-badge .chip-label,
.chip-dark.pack-badge .chip-count,
.chip-dark.pack-badge .chip-count-suffix {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 20px;
    /* From Figma Inter_20_Regular */
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg */
    margin: 0;
}

/* Frame 17 - Price chip from Figma */
.chip-light {
    box-sizing: border-box;

    /* Auto layout */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 8px;

    width: 140px;
    height: 74px;

    border: 1px solid #000000;
    border-radius: 16px;

    /* Inside auto layout */
    flex: none;
    order: 1;
    flex-grow: 0;

    /* Inter/Inter_36_Regular - Price */
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-size: 36px;
    line-height: 130%;
    /* or 47px */

    /* leading-trim and text-edge are draft CSS properties */
    text-align: center;

    /* Black_text */
    color: #141414;
}

/* Price pill styling handled by .chip-light above */

.btn-block {
    width: 100%;
}

/* Actions section from Figma bottom */
.purchase-modal__actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0px;
    gap: 16px;
    /* Reduced gap to work better with hidden elements */
    width: 419px;
    /* Exact Figma width */
    min-height: 72px;
    /* Minimum height for single button */
    margin-top: 42px;
    /* Add margin to maintain spacing from chips */
}

.purchase-modal__actions .btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px;
    /* Exact Figma padding */
    gap: 8px;
    /* Exact Figma gap */
    width: 419px;
    /* Exact Figma width */
    height: 72px;
    /* Exact Figma height */
    border-radius: 16px;
    /* Exact Figma border-radius */
    font-family: 'Inter', sans-serif;
    /* Exact Figma font */
    font-size: 20px;
    /* Exact Figma Inter_20_Regular */
    font-weight: 400;
    line-height: 130%;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.purchase-modal__actions .btn-primary {
    background: #577DFB;
    /* Exact Figma Blue_select */
    color: #F3F3F3;
    /* Exact Figma White_bg */
}

.purchase-modal__actions .btn-secondary {
    background: #7E839C;
    /* Exact Figma Grey_text */
    color: #F3F3F3;
    /* Exact Figma White_bg */
}

/* Extend button styling - use complementary blue that fits the design */
.purchase-modal__actions .btn-extend {
    background: #4a6de8;
    /* Complementary blue that fits the brand palette */
    color: #F3F3F3;
    /* White text */
    border: none;
    transition: all 0.2s ease;
}

.purchase-modal__actions .btn-extend:hover {
    background: #3d5ce0;
    /* Slightly darker blue on hover */
    transform: none;
    box-shadow: none;
}

.purchase-modal__actions .btn .icon {
    width: 24px;
    /* Exact Figma icon size */
    height: 24px;
    background-color: #F3F3F3;
    /* Exact Figma White_bg */
}

.purchase-modal__actions .btn:hover {
    transform: none;
    box-shadow: none;
}

.purchase-modal__actions .btn:active {
    transform: none;
}

/* Gallery styles */
.purchase-modal__gallery {
    margin-top: 16px;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.gallery-thumbnail:hover {
    border-color: var(--brand-primary);
}

.gallery-thumbnail.active {
    border-color: var(--text-ink);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Description styles */
.purchase-modal__description {
    margin-top: 16px;
}

.purchase-modal__description-title {
    font-family: 'Jura', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-ink);
    margin: 0 0 8px 0;
}

.purchase-modal__description-content {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 8px;
}

.purchase-modal__description-content:empty {
    display: none;
}

/* Enhanced responsive modal adjustments for different screen sizes */
@media (max-width: 1440px) {
    .purchase-modal__dialog {
        width: 95%;
        max-width: 1360px;
        height: auto;
        min-height: 600px;
    }

    .purchase-modal__content {
        flex-direction: column;
        gap: 24px;
        padding: 24px;
    }

    .purchase-modal__left {
        flex: none;
        width: 100%;
        height: auto;
    }

    .purchase-modal__image-frame {
        width: 100%;
        height: 400px;
    }

    .purchase-modal__right {
        max-width: none;
        width: 100%;
        gap: 32px;
    }

    .purchase-modal__title {
        width: 100%;
        max-width: 419px;
    }
}

/* Desktop-only fix for modal title spacing when owned item rows are visible */
@media (min-width: 1200px) {
    /* When owned item rows are visible (my skins modal), add extra top spacing to prevent title from being too close to top */
    .purchase-modal__right.purchase-modal--owned-items {
        padding-top: 32px;
    }

    /* Ensure proper spacing for title when owned items class is applied */
    .purchase-modal__right.purchase-modal--owned-items .purchase-modal__title {
        margin-top: 16px;
    }
}

@media (max-width: 900px) {
    .purchase-modal__image-frame {
        height: 320px;
    }

    .gallery-thumbnail {
        width: 60px;
        height: 45px;
    }

    .purchase-modal__chips {
        width: 100%;
        max-width: 352px;
        margin: 16px 0 0 0;
    }
}

/* Fix scrolling for 770px+ screen sizes */
@media (min-width: 770px) {
    .purchase-modal {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .purchase-modal {
        padding: 16px;
        align-items: flex-start;
    }

    .purchase-modal__dialog {
        width: 98%;
        height: auto;
        max-height: 95vh;
        border-radius: 16px;
        overflow-y: auto;
        margin-top: 2vh;
    }

    .purchase-modal__content {
        padding: 16px;
        gap: 16px;
    }

    .purchase-modal__image-frame {
        height: 280px;
        border-radius: 16px;
    }

    .purchase-modal__title {
        font-size: 24px;
        width: 100%;
    }

    .purchase-modal__right {
        gap: 24px;
    }

    .purchase-modal__meta-table {
        width: 100%;
        max-width: 419px;
    }

    .purchase-modal__meta-table .meta-row {
        width: 100%;
        justify-content: space-between;
    }

    .purchase-modal__actions {
        margin-top: 24px;
        gap: 12px;
        width: 100%;
        max-width: 419px;
        min-height: 64px;
        /* Minimum height for mobile single button */
    }

    .purchase-modal__actions .btn {
        width: 100%;
        max-width: 419px;
    }
}

@media (max-width: 480px) {
    .purchase-modal__dialog {
        width: 95%;
        margin-top: 1vh;
        max-height: 98vh;
    }

    .purchase-modal__content {
        padding: 12px;
    }

    .purchase-modal__image-frame {
        height: 240px;
    }

    .purchase-modal__title {
        font-size: 20px;
    }

    .purchase-modal__chips {
        flex-direction: column;
        gap: 12px;
        height: auto;
        width: 100%;
        max-width: 280px;
        margin: 16px 0 0 0;
    }

    .purchase-modal__meta-table {
        padding: 12px 0px 8px;
        gap: 16px;
    }

    .purchase-modal__actions {
        min-height: 48px;
        /* Minimum height for very small screens */
        gap: 12px;
    }
}


/* Prevent body scroll when modal open */
body.modal-open {
    position: fixed;
    width: 100%;
    left: 0;
    overflow: hidden;
    /* top will be set dynamically by JavaScript to preserve scroll position */
}

/* Ensure modal dialog is scrollable on mobile */
@media (max-width: 768px) {
    .purchase-modal__dialog {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
    }
}
    
    /* Prevent backdrop from interfering with scroll */
    .purchase-modal__backdrop {
        touch-action: none;
    }
    
    /* Ensure modal content is properly contained */
    .purchase-modal__content {
        min-height: 0;
        flex-shrink: 1;
}


/* --- Server Monitoring Section --- */
.server-monitoring-section {
    margin: 0 0 var(--spacing-2xl) 0;
    padding: 0 0 var(--spacing-xl) 0;
    text-align: center;
}

.server-monitoring-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-ink);
}

.server-widgets-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-lg);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.server-widget {
    width: 200px;
    height: 385px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-hover);
}

.server-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.server-widget iframe {
    width: 200px !important;
    height: 385px !important;
    display: block;
    border: 0;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .server-monitoring-section {
        margin: var(--spacing-lg) 0 var(--spacing-xl) 0;
        padding: var(--spacing-lg) 0;
    }

    .server-monitoring-section h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--spacing-xl);
    }

    .server-widgets-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-lg);
        padding: 0 var(--spacing-sm);
    }

    .server-widget {
        width: 200px;
        height: 385px;
    }

    .server-widget iframe {
        width: 200px !important;
        height: 385px !important;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1199px) {
    .server-monitoring-section {
        padding: var(--spacing-xl) 0;
    }

    .server-widgets-grid {
        gap: var(--spacing-lg);
        padding: 0 var(--spacing-lg);
    }
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: var(--spacing-2xl) 0 var(--spacing-xl) 0;
    background: var(--bg-surface);
    margin-bottom: var(--spacing-lg);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-content h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-ink);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-tight);
    text-align: center;
}

.hero-description {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    margin: 0 auto;
    line-height: var(--line-height-relaxed);
    text-align: center;
    max-width: 600px;
}

/* Mobile hero adjustments */
@media (max-width: 767px) {
    .hero-section {
        padding: var(--spacing-xl) 0 var(--spacing-lg) 0;
        margin-bottom: var(--spacing-md);
    }

    .hero-content {
        padding: 0 var(--spacing-sm);
    }

    .hero-content h1 {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--spacing-md);
        line-height: var(--line-height-snug);
    }

    .hero-description {
        font-size: var(--font-size-lg);
    }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1199px) {
    .hero-section {
        padding: var(--spacing-2xl) 0 var(--spacing-xl) 0;
    }

    .hero-content {
        padding: 0 var(--spacing-lg);
    }
}

/* --- Features Section --- */
.features-section {
    margin: var(--spacing-2xl) 0 0 0;
    padding: var(--spacing-xl) 0 var(--spacing-4xl) 0;
    /* Ensure sufficient bottom spacing to prevent footer overlap */
    min-height: fit-content;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    max-width: 800px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-hover);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.feature-card:only-child {
    max-width: 331px;
    justify-self: center;
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.feature-card h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-lg);
    color: var(--text-ink);
}

.feature-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-xl) 0;
    flex: 1;
}

.feature-benefits li {
    padding: var(--spacing-sm) 0;
    color: var(--text-muted);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

.feature-benefits li:before {
    content: "✓";
    color: var(--status-success);
    font-weight: var(--font-weight-bold);
    margin-right: var(--spacing-sm);
}

/* Mobile features adjustments */
@media (max-width: 767px) {
    .features-section {
        margin: var(--spacing-xl) 0 0 0;
        padding: var(--spacing-lg) 0 var(--spacing-3xl) 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: 0 var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-lg);
    }

    .feature-card h3 {
        font-size: var(--font-size-xl);
    }
}

/* Tablet responsive adjustments */
@media (min-width: 768px) and (max-width: 1199px) {
    .features-section {
        padding: var(--spacing-xl) 0 var(--spacing-4xl) 0;
    }

    .features-grid {
        gap: var(--spacing-lg);
        padding: 0 var(--spacing-lg);
    }
}

/*
 --- Page Layout Fixes --- */
/* Ensure proper page structure and prevent footer overlap */
main.container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
}

/* Ensure sections have proper spacing and don't overlap */
.hero-section+.server-monitoring-section {
    margin-top: 0;
}

.server-monitoring-section+.features-section {
    margin-top: var(--spacing-xl);
}

/* Add bottom spacing to the last section to prevent footer overlap */
.features-section:last-child,
.server-monitoring-section:last-child,
.hero-section:last-child {
    margin-bottom: var(--spacing-4xl);
}

/* Responsive layout fixes */
@media (max-width: 767px) {
    main.container {
        min-height: calc(100vh - 150px);
    }

    .features-section:last-child,
    .server-monitoring-section:last-child,
    .hero-section:last-child {
        margin-bottom: var(--spacing-3xl);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    main.container {
        min-height: calc(100vh - 180px);
    }
}

/* Ensure proper visual hierarchy with consistent spacing */
.hero-section,
.server-monitoring-section,
.features-section {
    position: relative;
    z-index: 1;
}

/* Fix any potential margin collapsing issues */
.hero-section::after,
.server-monitoring-section::after,
.features-section::after {
    content: "";
    display: block;
    height: 0;
    clear: both;
}

/* -
-- Store Card Component --- */
.store-card {
    width: 310px;
    /* Fixed width from Figma design */
    background: var(--bg-subtle);
    /* Light_Blue_Fill from Figma */
    border: 1px solid var(--text-ink);
    /* Black_text border from Figma */
    border-radius: 8px;
    /* Figma border radius */
    box-shadow: none;
    overflow: visible;
    /* Allow badge to extend outside - needed for Figma positioning */
    position: relative;
    /* For badge positioning */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.store-card__media {
    padding: 16px 16px 0 16px;
    /* Figma padding */
    background: var(--bg-subtle);
    /* match content background */
    border-radius: 8px 8px 0 0;
    /* Round top corners to match card */
    flex-shrink: 0;
}

.store-card__img {
    display: block;
    width: 279px;
    /* Figma width */
    height: 209px;
    /* Figma height */
    object-fit: cover;
    border-radius: 4px;
    /* Figma border radius */
    /* Ensure images load immediately and consistently */
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Error state styling for broken images */
.store-card__img[src*="favicon.png"] {
    background-color: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
}

.store-card__content {
    background: var(--bg-subtle);
    padding: 16px;
    /* More breathing room */
    position: relative;
    border-radius: 0 0 8px 8px;
    /* Round bottom corners to match card */
    display: flex;
    flex-direction: column;
    flex: 1;
}

.store-card__title-row {
    position: relative;
    display: block;
    margin-bottom: 16px;
    /* Space before meta section */
}

.store-card__title {
    font-family: 'Jura', sans-serif;
    font-size: 16px;
    /* Figma */
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
    max-width: 215px;
    /* Figma max-width */
    line-height: 130%;
    /* Figma line-height */
    padding-right: 70px;
    /* Space for badge */
}

.store-card__badge {
    position: absolute;
    top: 0;
    /* Align with title baseline */
    left: 232px;
    /* Keep original Figma horizontal position */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--text-ink);
    /* Black_text from Figma */
    color: var(--bg-surface);
    padding: 4px;
    /* Figma padding */
    border-radius: 4px 0 0 4px;
    /* Figma border radius */
    font-weight: 400;
    font-size: 13px;
    width: 62px;
    /* Figma width */
    height: 24px;
    /* Figma height */
    box-sizing: border-box;
    justify-content: center;
    z-index: 2;
    /* Above other elements */
}

.store-card__badge-icon {
    font-size: 16px;
}

.store-card__badge .icon {
    background-color: var(--bg-surface);
}

.store-card__rule {
    height: 1px;
    background: var(--border-subtle);
    /* Light_blue_details from Figma */
    margin: 0 0 16px 0;
    /* Space after rule */
}

.store-card__meta {
    margin: 0 0 16px 0;
    /* Space before CTA */
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Comfortable spacing between rows */
}

.store-card__meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    /* Vertical padding for better spacing */
}

.store-card__meta-row:last-child {
    border-bottom: 0;
}

.store-card__meta-row dt {
    color: var(--text-muted);
    /* Grey_text from Figma */
    font-size: 12px;
    /* Figma font size */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 130%;
}

.store-card__meta-row dd {
    margin: 0;
    color: var(--text-ink);
    /* Black_text from Figma */
    font-size: 12px;
    /* Figma font size */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 130%;
    text-align: right;
}

.store-card__cta {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 0;
    width: 100%;
    /* Full width of card content */
    min-height: 27px;
    /* Maintain Figma height while allowing taller content */
    margin-top: auto;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.store-card__price {
    background: var(--bg-surface);
    /* White_bg from Figma */
    border: 1px solid var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    /* Figma font size */
    font-weight: 400;
    /* Figma font weight */
    font-family: 'Inter', sans-serif;
    line-height: 130%;
    padding: 8px;
    /* Consistent padding with buy button */
    gap: 8px;
    flex: 1;
    /* Equal width distribution */
    width: 50%;
    /* Explicit 50% width for equal sizing */
    min-height: 27px;
    /* Allow stretch for taller content */
    box-sizing: border-box;
    border-radius: 8px 0 0 8px;
    /* Figma border radius */
    white-space: nowrap;
}

.store-card__buy {
    /* From Figma CSS: button/buy specifications */
    background: var(--brand-primary);
    /* Blue_select from Figma */
    color: var(--bg-surface);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 15px;
    /* Figma font size */
    font-weight: 400;
    /* Figma font weight */
    font-family: 'Inter', sans-serif;
    line-height: 130%;
    /* 19px from Figma */
    padding: 8px;
    /* Consistent padding with price */
    gap: 8px;
    flex: 1;
    /* Equal width distribution */
    width: 50%;
    /* Explicit 50% width for equal sizing */
    min-height: 27px;
    /* Allow stretch for taller content */
    border: 0;
    box-sizing: border-box;
    box-shadow: none;
    text-shadow: none;
    filter: none;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    /* Figma border radius */
    white-space: nowrap;
}

.store-card__buy:hover {
    background: var(--brand-primary);
    text-decoration: none;
    color: var(--bg-surface);
    box-shadow: none;
    filter: none;
}

/* Ensure button text elements are properly aligned */
.store-card__buy span,
.store-card__buy .btn-text {
    /* Inter/Inter_15_Regular - PriceCard from Figma */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 130%;
    /* 19px */
    color: var(--bg-surface);
    /* White_bg from Figma */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Enhanced button text rendering for better mobile experience */
.store-card__buy span,
.store-card__buy .btn-text {
    /* Ensure text doesn't wrap */
    white-space: nowrap;
    /* Better text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Ensure full width coverage */
    width: 100%;
}

/* Mobile responsive adjustments for store cards */
@media (max-width: 719px) {
    .store-card {
        width: 100%;
        /* Full width on mobile */
        max-width: 310px;
        /* But don't exceed Figma width */
        margin: 0 auto;
        /* Center the card within grid cell */
        box-sizing: border-box;
    }

    .store-card__img {
        width: 100%;
        /* Responsive image width */
        max-width: 279px;
        /* Don't exceed Figma width */
        height: 209px;
        /* Maintain Figma proportions */
        margin: 0 auto;
        /* Center the image */
    }

    .store-card__media {
        padding: 16px;
        /* Consistent padding on mobile */
        display: flex;
        justify-content: center;
        /* Center the image container */
    }

    .store-card__content {
        padding: 16px;
        /* Consistent padding on mobile */
    }

    .store-card__meta-row,
    .store-card__cta {
        width: 100%;
        /* Full width on mobile */
    }

    /* Enhanced mobile button accessibility and interactions - Task 6 */
    .store-card__buy {
        /* Touch-friendly button sizing - minimum 44px height */
        min-height: 44px;
        height: auto;
        /* Enhanced padding for better touch targets */
        padding: 12px 8px;
        /* Font size constraints to prevent iOS zoom */
        font-size: max(15px, 16px);
        /* Ensure proper text centering with increased height */
        display: flex;
        align-items: center;
        justify-content: center;
        /* Enhanced touch interaction feedback */
        transition: background-color 0.2s ease, transform 0.1s ease;
        /* Ensure text remains centered */
        line-height: 1.2;
        /* Better touch target positioning */
        position: relative;
        /* Prevent text selection on touch */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        /* Enhanced touch feedback */
        -webkit-tap-highlight-color: rgba(87, 125, 251, 0.3);
    }

    /* Enhanced button text alignment for mobile */
    .store-card__buy span,
    .store-card__buy .btn-text {
        /* Ensure text stays centered with increased button height */
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        width: 100%;
        /* Font size constraints to prevent iOS zoom */
        font-size: max(15px, 16px);
        line-height: 1.2;
        /* Remove any margin/padding that could affect centering */
        margin: 0;
        padding: 0;
        /* Ensure text doesn't wrap */
        white-space: nowrap;
        /* Better text rendering on mobile */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Enhanced hover/active states for mobile */
    .store-card__buy:hover {
        background: var(--brand-primary);
        /* Subtle scale effect for touch feedback */
        transform: scale(1.02);
    }

    .store-card__buy:active {
        background: var(--brand-primary);
    }

    /* Match price section height with enhanced buy button */
    .store-card__price {
        min-height: 44px;
        height: auto;
        padding: 12px 8px;
        /* Ensure proper alignment with buy button */
        display: flex;
        align-items: center;
        justify-content: center;
        /* Font size consistency */
        font-size: max(15px, 16px);
        line-height: 1.2;
    }

    /* Enhanced CTA container for mobile */
    .store-card__cta {
        height: auto;
        min-height: 44px;
        /* Ensure proper alignment of child elements */
        align-items: stretch;
        /* Better touch target spacing */
        gap: 0;
        /* Ensure no overflow issues */
        overflow: hidden;
    }
}

/* Tablet responsive adjustments */
@media (min-width: 720px) and (max-width: 1079px) {
    .store-card {
        margin: 0 auto;
        /* Center cards in tablet grid */
    }
}

/* Desktop adjustments */
@media (min-width: 1080px) {
    .store-card {
        margin: 0 auto;
        /* Center cards in desktop grid */
    }
}

/* --- Purchase Modal Pack Badge --- */
/* Based on Figma pack_mark_paymentCard specifications */
.purchase-modal__pack-badge {
    /* Position badge at top-right of modal content */
    position: absolute;
    top: -7px;
    /* Offset from Figma specification */
    right: 0;
    z-index: 3;

    /* Auto layout from Figma pack_mark_paymentCard */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    gap: 16px;
    width: 140px;
    height: 56px;

    /* Black_text background */
    background: #141414;
    border-radius: 16px 0px 0px 16px;

    /* Typography from Figma */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg */

    /* Override store card badge styles */
    box-sizing: border-box;
}

.purchase-modal__pack-badge .icon-box {
    width: 24px;
    height: 24px;
    background-color: #F3F3F3;
    /* White_bg */
}

/* Mobile adjustments for pack badge */
@media (max-width: 767px) {
    .purchase-modal__pack-badge {
        /* Adjust positioning for smaller screens */
        top: -5px;
        right: 0;
        width: 120px;
        height: 48px;
        padding: 12px 20px;
        font-size: 18px;
        border-radius: 12px 0px 0px 12px;
    }

    .purchase-modal__pack-badge .icon-box {
        width: 20px;
        height: 20px;
    }
}

/* Tablet adjustments for pack badge */
@media (min-width: 768px) and (max-width: 1199px) {
    .purchase-modal__pack-badge {
        /* Maintain Figma specifications on tablet */
        top: -7px;
        right: 0;
        width: 140px;
        height: 56px;
        padding: 16px 24px;
        font-size: 20px;
        border-radius: 16px 0px 0px 16px;
    }
}

/* Essential positioning for badge - minimal modal container styles */
.purchase-modal__content {
    position: relative;
    /* Essential for badge positioning */
}

.purchase-modal__right {
    position: relative;
    /* Essential for badge positioning */
}

/* --- Purchase Modal Button Styles --- */
/* Primary button - from Figma steam_button_paymentCard */
.btn.btn-primary.btn-block {
    /* Auto layout */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 8px;
    width: 100%;
    height: 72px;
    /* From Figma steam_button_paymentCard */

    /* Blue_select */
    background: #577DFB;
    border-radius: 16px;
    border: none;

    /* Typography */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg */

    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.btn.btn-primary.btn-block:hover {
    background: #4a6de8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(87, 125, 251, 0.3);
}

.btn.btn-primary.btn-block:active {
    background: #3d5ce0;
    box-shadow: 0 2px 6px rgba(87, 125, 251, 0.3);
}

.btn.btn-primary.btn-block:focus {
    outline: none;
}

/* Secondary button - from Figma guest_button_paymentCard */
.btn.btn-secondary.btn-block {
    /* Auto layout */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 8px;
    width: 100%;
    height: 72px;
    /* From Figma guest_button_paymentCard */

    /* Grey_text */
    background: #7E839C;
    border-radius: 16px;
    border: none;

    /* Typography */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg */

    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.btn.btn-secondary.btn-block:hover {
    background: #6b7490;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(126, 131, 156, 0.3);
}

.btn.btn-secondary.btn-block:active {
    background: #5d6682;
    box-shadow: 0 2px 6px rgba(126, 131, 156, 0.3);
}

.btn.btn-secondary.btn-block:focus {
    outline: none;
}

/* Button text elements */
.btn.btn-primary.btn-block span,
.btn.btn-primary.btn-block .btn-text,
.btn.btn-secondary.btn-block span,
.btn.btn-secondary.btn-block .btn-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 20px;
    line-height: 130%;
    color: #F3F3F3;
    /* White_bg */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Mobile responsive adjustments for buttons */
@media (max-width: 767px) {

    .btn.btn-primary.btn-block,
    .btn.btn-secondary.btn-block {
        height: 64px;
        /* Slightly smaller on mobile for better fit */
        padding: 20px;
        font-size: 18px;
    }

    .btn.btn-primary.btn-block span,
    .btn.btn-primary.btn-block .btn-text,
    .btn.btn-secondary.btn-block span,
    .btn.btn-secondary.btn-block .btn-text {
        font-size: 18px;
    }
}

/* Tablet responsive adjustments for buttons */
@media (min-width: 768px) and (max-width: 1199px) {

    .btn.btn-primary.btn-block,
    .btn.btn-secondary.btn-block {
        height: 68px;
        /* Intermediate size for tablet */
        padding: 22px;
        font-size: 19px;
    }

    .btn.btn-primary.btn-block span,
    .btn.btn-primary.btn-block .btn-text,
    .btn.btn-secondary.btn-block span,
    .btn.btn-secondary.btn-block .btn-text {
        font-size: 19px;
    }
}



/* --- Purchase Modal Price Component --- */

/* Price display component - from Figma Frame 17 specifications */
.purchase-modal-price {
    /* Auto layout */
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 8px;
    width: 140px;
    height: 74px;
    /* From Figma Frame 17 */

    /* Border styling */
    border: 1px solid #000000;
    border-radius: 16px;
    background: transparent;

    /* Typography */
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 36px;
    /* From Figma Price typography */
    line-height: 130%;
    color: #141414;
    /* Black_text */

    /* Ensure proper positioning */
    position: relative;

    /* Smooth transitions */
    transition: all 0.2s ease;
}

/* Price text styling */
.purchase-modal-price span,
.purchase-modal-price .price-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 130%;
    color: #141414;
    /* Black_text */
    margin: 0;
    padding: 0;
    text-align: center;
    white-space: nowrap;
}

/* Currency symbol styling */
.purchase-modal-price .currency {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 130%;
    color: #141414;
    /* Black_text */
}

/* Hover state for interactive price elements */
.purchase-modal-price:hover {
    border-color: #333333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Active state for interactive price elements */
.purchase-modal-price:active {
    border-color: #000000;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

/* Focus state for accessibility */
.purchase-modal-price:focus {
    outline: 2px solid #577DFB;
    /* Blue_select */
    outline-offset: 2px;
}

/* Mobile responsive adjustments for price component */
@media (max-width: 767px) {
    .purchase-modal-price {
        width: 120px;
        /* Smaller width on mobile */
        height: 64px;
        /* Smaller height on mobile */
        padding: 20px;
        font-size: 28px;
        /* Smaller font on mobile */
    }

    .purchase-modal-price span,
    .purchase-modal-price .price-text,
    .purchase-modal-price .currency {
        font-size: 28px;
    }
}

/* Tablet responsive adjustments for price component */
@media (min-width: 768px) and (max-width: 1199px) {
    .purchase-modal-price {
        width: 130px;
        /* Intermediate size for tablet */
        height: 68px;
        /* Intermediate height for tablet */
        padding: 22px;
        font-size: 32px;
        /* Intermediate font size for tablet */
    }

    .purchase-modal-price span,
    .purchase-modal-price .price-text,
    .purchase-modal-price .currency {
        font-size: 32px;
    }
}

/* Price component variants */
.purchase-modal-price.large {
    width: 160px;
    height: 84px;
    font-size: 40px;
}

.purchase-modal-price.small {
    width: 100px;
    height: 54px;
    padding: 16px;
    font-size: 24px;
}

.purchase-modal-price.large span,
.purchase-modal-price.large .price-text,
.purchase-modal-price.large .currency {
    font-size: 40px;
}

.purchase-modal-price.small span,
.purchase-modal-price.small .price-text,
.purchase-modal-price.small .currency {
    font-size: 24px;
}

/* 
Utility classes */
.hidden {
    display: none !important;
}



/* Fix pack badge alignment in purchase modal - position relative to modal dialog */
.purchase-modal__dialog {
    position: relative;
    /* Ensure dialog is positioned context */
}

.purchase-modal__pack-badge {
    position: fixed !important;
    /* Position relative to viewport to break out of containers */
    left: calc(50vw + 680px - 140px) !important;
    /* Align to right edge of 1360px modal centered in viewport */
    top: calc(50vh - 451px + 32px) !important;
    /* Align to image frame top (modal top + padding) */
    z-index: 999 !important;
}
