/* ==========================================================================
   TIGADESTD — Digital Font Store Design System & Main Stylesheet
   Fully theme-aware via CSS custom properties
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
    /* Color Scheme */
    --color-scheme: dark;

    /* Color Palette */
    --primary-bg: #0b0c10;
    --surface-bg: #13151b;
    --surface-light: #1c1f28;
    --deep-bg: #08090c;
    --header-bg: rgba(11, 12, 16, 0.85);
    --footer-bg: #08090c;
    --thumb-bg: #14161d;

    --card-bg: rgba(255, 255, 255, 0.035);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(250, 157, 56, 0.4);

    --accent-color: #FA9D38;
    --accent-hover: #E88C24;
    --accent-active: #D67A18;
    --accent-glow: rgba(250, 157, 56, 0.25);
    --accent-glow-strong: rgba(250, 157, 56, 0.45);
    --accent-subtle: rgba(250, 157, 56, 0.15);
    --accent-border: rgba(250, 157, 56, 0.3);
    --accent-selected-bg: rgba(250, 157, 56, 0.08);

    --text-main: #FFFFFF;
    --text-secondary: #C5C6D0;
    --text-muted: #8E90A0;
    --text-dim: #5C5E6E;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Glow & Atmosphere */
    --body-glow: rgba(250, 157, 56, 0.12);
    --hero-glow: rgba(250, 157, 56, 0.14);
    --hero-glow-orb: rgba(250, 157, 56, 0.22);
    --grid-line: rgba(255, 255, 255, 0.02);

    /* Interactive */
    --btn-text: #FFFFFF;
    --scrollbar-thumb: rgba(255, 255, 255, 0.14);
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --shadow-color: rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;

    /* Spacing & Radii */
    --radius-sm: 6px;
    --radius-base: 10px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    /* Layout */
    --max-width: 1320px;
    --header-height: 80px;
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Global Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    color-scheme: var(--color-scheme);
}

body {
    background-color: var(--primary-bg);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--body-glow), transparent 70%),
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
    background-position: 0 0, -1px -1px, -1px -1px;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    background: none;
}

/* Form Controls — Matching Search Bar Aesthetic */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    color: var(--text-main);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-control::placeholder {
    color: var(--text-dim);
}

.form-control:focus {
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238E90A0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    cursor: pointer;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FA9D38' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--btn-text);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 6px 25px var(--accent-glow-strong);
    transform: translateY(-2px);
}

.btn-outline {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* Badges & Pills */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: var(--radius-pill);
}

.badge-orange {
    background: var(--accent-subtle);
    color: var(--accent-color);
    border: 1px solid var(--accent-border);
}

.badge-sale {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: var(--btn-text);
    font-weight: 800;
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-main);
}

.site-logo .logo-dot {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    border-radius: var(--radius-pill);
}

/* Dropdown Sub-navigation */
.nav-item {
    position: relative;
}

.nav-item.has-dropdown .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dropdown-caret {
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.nav-item.has-dropdown:hover .dropdown-caret {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 210px;
    background: var(--surface-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    padding: 8px 0;
    list-style: none;
    box-shadow: 0 14px 35px var(--shadow-color, rgba(0, 0, 0, 0.45));
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.dropdown-link:hover {
    color: var(--text-main);
    background: var(--accent-selected-bg, rgba(250, 157, 56, 0.1));
    padding-left: 22px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Search Bar */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 180px;
    height: 40px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    padding: 0 16px 0 38px;
    font-size: 0.88rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.search-input:focus {
    width: 240px;
    background: var(--card-hover-bg);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Cart Trigger Icon */
.cart-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cart-trigger:hover {
    background: var(--accent-subtle);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-color);
    color: var(--btn-text);
    font-size: 0.72rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    padding: 100px 0 70px 0;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(circle at 50% 20%, var(--hero-glow) 0%, transparent 70%),
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 100% 100%, 48px 48px, 48px 48px;
    background-position: 0 0, -1px -1px, -1px -1px;
}

.hero-glow {
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 750px;
    height: 420px;
    background: radial-gradient(circle, var(--hero-glow-orb) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(24px);
}

.hero-bg-glyphs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-bg-glyphs span {
    position: absolute;
    font-family: var(--font-serif);
    color: var(--text-main);
    opacity: 0.025;
    user-select: none;
    font-weight: 700;
    line-height: 1;
}

.hero-glyph-1 {
    font-size: 380px;
    top: -80px;
    left: 4%;
    transform: rotate(-12deg);
}

.hero-glyph-2 {
    font-size: 420px;
    top: -60px;
    right: 4%;
    transform: rotate(8deg);
}

.hero-glyph-3 {
    font-size: 320px;
    bottom: -90px;
    left: 42%;
    opacity: 0.018 !important;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 860px;
    margin: 0 auto;
}

.hero-tagline {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--text-main) 40%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Product Cards Grid
   ========================================================================== */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 20px;
}

.section-title {
    font-size: 1.8rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px var(--shadow-color);
}

.product-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--thumb-bg);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-thumb img {
    transform: scale(1.05);
}

.product-badge-group {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 6px;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.product-short-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
}

.product-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.product-price .price-from {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-right: 4px;
}

.product-price del {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-left: 6px;
}

/* ==========================================================================
   Product Detail Page (Creatype 2-Column Layout)
   ========================================================================== */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    padding: 40px 0 80px 0;
    align-items: start;
}

/* Left Column: Showcase & Specimen */
.product-showcase {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.main-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--card-border);
    background: var(--surface-bg);
}

.main-gallery img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.gallery-thumb {
    width: 80px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--card-border);
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.65;
    transition: var(--transition-smooth);
}

.gallery-thumb.active, .gallery-thumb:hover {
    border-color: var(--accent-color);
    opacity: 1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Metadata Cards */
.metadata-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.meta-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    padding: 14px;
    text-align: center;
}

.meta-card-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.meta-card-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Interactive Font Tester Widget */
.font-tester-card {
    background: var(--surface-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
}

.font-tester-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.tester-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tester-select {
    background: var(--surface-light);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-pill);
    padding: 8px 36px 8px 16px;
    font-size: 0.88rem;
    color: var(--text-main);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238E90A0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    transition: var(--transition-smooth);
}

.tester-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.tester-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FA9D38' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.font-size-slider {
    accent-color: var(--accent-color);
    cursor: pointer;
}

.tester-input {
    width: 100%;
    background: var(--surface-light);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    padding: 14px 18px;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 20px;
}

.tester-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.font-preview-stage {
    min-height: 120px;
    padding: 24px;
    background: var(--deep-bg);
    border-radius: var(--radius-base);
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    overflow-x: auto;
    word-break: break-word;
    color: var(--text-main);
    transition: font-size 0.1s ease;
}

/* Right Column: Purchase Box */
.product-sidebar {
    position: relative;
    background: var(--surface-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 20px 50px var(--shadow-color);
}

.sidebar-title {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.sidebar-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.sidebar-price-box {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
}

.sidebar-price-active {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
}

.sidebar-price-sale {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* License Selection Radio Options */
.license-selection-group {
    margin-bottom: 28px;
}

.license-selection-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.license-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    background: var(--card-bg);
    cursor: pointer;
    margin-bottom: 10px;
    transition: var(--transition-smooth);
}

.license-option-card:hover {
    background: var(--card-hover-bg);
    border-color: var(--accent-border);
}

.license-option-card.selected {
    border-color: var(--accent-color);
    background: var(--accent-selected-bg);
    box-shadow: 0 0 0 1px var(--accent-color);
}

.license-radio-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.license-option-card.selected .custom-radio {
    border-color: var(--accent-color);
}

.license-option-card.selected .custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.license-opt-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.license-opt-price {
    font-weight: 700;
    color: var(--accent-color);
}

/* ==========================================================================
   Dynamic License Scope Box (Above Add to Cart)
   ========================================================================== */
.license-scope-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    padding: 16px 18px;
    margin-bottom: 20px;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

.license-scope-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-selected-bg));
    opacity: 0.8;
}

.license-scope-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--card-border);
    gap: 8px;
}

.license-scope-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-scope-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--accent-subtle);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.license-scope-tier-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.license-scope-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

.license-scope-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.45;
}

.license-scope-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.license-scope-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.license-scope-check {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.license-scope-check svg {
    width: 10px;
    height: 10px;
}

.scope-content-fade {
    animation: scopeFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scopeFadeIn {
    0% {
        opacity: 0.2;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Offcanvas Cart Drawer
   ========================================================================== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    background: var(--surface-bg);
    border-left: 1px solid var(--card-border);
    z-index: 201;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.cart-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    cursor: pointer;
    color: var(--text-muted);
}

.cart-close-btn:hover {
    color: var(--text-main);
    background: var(--card-hover-bg);
}

.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
}

.cart-item-thumb {
    width: 64px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--primary-bg);
    flex-shrink: 0;
}

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

.cart-item-meta {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.cart-item-lic {
    font-size: 0.8rem;
    color: var(--accent-color);
}

.cart-item-price {
    font-weight: 700;
    font-size: 1rem;
}

.cart-item-remove {
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
}

.cart-item-remove:hover {
    color: var(--danger);
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--card-border);
    background: var(--surface-light);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    margin: 12px 0 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    margin-top: auto;
    background: var(--footer-bg);
    border-top: 1px solid var(--card-border);
    padding: 60px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    margin-top: 12px;
    font-size: 0.9rem;
    max-width: 320px;
}

.footer-col-title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-main);
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-dim);
}

/* ==========================================================================
   Toast Alerts
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    background: var(--surface-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-base);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-main);
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

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

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .metadata-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .search-input {
        width: 140px;
    }
    .search-input:focus {
        width: 180px;
    }
}
