/* ==========================================================================
   FileDownload Store — Google Chrome Web Store Design System
   Exact Google Material Design 3 (Material You) Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Text:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Google Material 3 Theme Tokens */
    --cws-bg: #ffffff;
    --cws-surface-low: #f8fafd;
    --cws-surface-container: #f0f4f9;
    --cws-surface-high: #e9eef6;
    --cws-surface-highest: #dde3ea;
    
    --cws-border: #e3e3e3;
    --cws-border-subtle: #f1f3f4;
    
    /* Google Brand Colors */
    --google-blue: #0b57d0;
    --google-blue-hover: #0842a0;
    --google-blue-container: #d3e3fd;
    --google-blue-text: #041e49;
    
    --google-green: #146c2e;
    --google-green-container: #c4eed0;
    --google-yellow: #e37400;
    --google-red: #b3261e;
    
    /* Text Hierarchy */
    --text-primary: #1f1f1f;
    --text-secondary: #444746;
    --text-muted: #747775;
    
    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);

    /* Fonts */
    --font-heading: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Google Sans Text', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--cws-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.15s ease;
}

.cws-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1024px) {
    .cws-container { padding: 0 32px; }
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f8fafd; }
::-webkit-scrollbar-thumb { background: #c4c7c5; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #8e918f; }

.hide-sb::-webkit-scrollbar { display: none; }
.hide-sb { -ms-overflow-style: none; scrollbar-width: none; }

/* ==========================================================================
   Header & Search (Exact Chrome Web Store Bar)
   ========================================================================== */
.cws-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--cws-border);
    transition: box-shadow 0.2s ease;
}

.cws-header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cws-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    white-space: nowrap;
    text-decoration: none;
}

.cws-brand-logo {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cws-search-wrap {
    flex: 1;
    max-width: 680px;
    position: relative;
}

.cws-search-bar {
    width: 100%;
    height: 46px;
    background: var(--cws-surface-container);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.cws-search-bar:focus-within {
    background: #ffffff;
    border-color: var(--google-blue);
    box-shadow: 0 2px 8px rgba(11, 87, 208, 0.15);
}

.cws-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-primary);
}

.cws-search-input::placeholder {
    color: var(--text-muted);
}

/* Header Sub-Navigation (Tabs) */
.cws-nav-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    border-top: 1px solid var(--cws-border-subtle);
    padding: 0;
    overflow-x: auto;
}

.cws-nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 4px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cws-nav-tab:hover {
    color: var(--google-blue);
}

.cws-nav-tab.active {
    color: var(--google-blue);
    border-bottom-color: var(--google-blue);
    font-weight: 700;
}

/* Search Dropdown / Live Results */
.cws-live-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--cws-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 200;
    max-height: 400px;
    overflow-y: auto;
}

.cws-live-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    transition: background 0.15s ease;
}
.cws-live-item:hover {
    background: var(--cws-surface-container);
}

/* ==========================================================================
   Hero Spotlight Banner Carousel (Chrome Web Store Spotlight)
   ========================================================================== */
.spotlight-carousel-wrap {
    position: relative;
    margin: 24px 0 36px;
}

.spotlight-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.spotlight-card {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 100%;
    max-width: 880px;
    min-height: 280px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.spotlight-content {
    flex: 1;
    max-width: 480px;
    z-index: 2;
}

.spotlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--google-blue);
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 12px;
}

.spotlight-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 8px;
}

.spotlight-tagline {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.spotlight-preview {
    width: 240px;
    height: 180px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-md);
    object-fit: cover;
    z-index: 2;
}

/* Chrome Material Blue CTA Button */
.cws-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--google-blue);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.cws-btn-primary:hover {
    background: var(--google-blue-hover);
    box-shadow: 0 2px 6px rgba(11, 87, 208, 0.3);
}

.cws-btn-tonal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cws-surface-container);
    color: var(--google-blue-text);
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--cws-border);
    cursor: pointer;
}
.cws-btn-tonal:hover {
    background: var(--cws-surface-high);
}

/* ==========================================================================
   Chrome Web Store Section Rows & Cards
   ========================================================================== */
.cws-section {
    margin-bottom: 40px;
}

.cws-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cws-section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
}

.cws-see-all {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--google-blue);
    display: flex;
    align-items: center;
    gap: 4px;
}
.cws-see-all:hover { text-decoration: underline; }

/* Horizontal Cards Slider */
.cws-cards-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 2px 12px;
}

.cws-card {
    flex-shrink: 0;
    width: 250px;
    background: var(--cws-surface-low);
    border: 1px solid var(--cws-border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.cws-card:hover {
    background: #ffffff;
    border-color: var(--cws-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cws-card-top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.cws-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--cws-border);
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
}

.cws-card-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cws-card-developer {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cws-card-tagline {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cws-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 8px;
    border-top: 1px solid var(--cws-border-subtle);
}

.cws-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
    font-weight: 500;
}

.cws-star-gold {
    color: var(--google-yellow);
    font-size: 14px;
}

/* Category Chips Strip */
.cws-chips-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 0 24px;
}

.cws-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cws-surface-container);
    border: 1px solid var(--cws-border);
    border-radius: var(--radius-pill);
    padding: 8px 18px;
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all 0.15s ease;
}

.cws-chip:hover, .cws-chip.active {
    background: var(--google-blue-container);
    border-color: var(--google-blue-container);
    color: var(--google-blue-text);
}

/* ==========================================================================
   Product Detail Page (Exact Chrome Web Store Detail View)
   ========================================================================== */
.cws-detail-header {
    background: #ffffff;
    border-bottom: 1px solid var(--cws-border);
    padding: 28px 0 20px;
    margin-bottom: 24px;
}

.cws-detail-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.cws-detail-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 280px;
}

.cws-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: var(--cws-surface-low);
    border: 1px solid var(--cws-border);
    padding: 10px;
    object-fit: contain;
}

.cws-detail-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cws-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.badge-featured {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f0fe;
    color: var(--google-blue);
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

/* Detail Main Layout: Left Tabs & Overview + Right Specs Sidebar */
.cws-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 60px;
}

@media (min-width: 960px) {
    .cws-detail-grid {
        grid-template-columns: 1fr 320px;
    }
}

.cws-specs-sidebar {
    background: var(--cws-surface-low);
    border: 1px solid var(--cws-border);
    border-radius: var(--radius-xl);
    padding: 24px;
    height: fit-content;
}

.cws-spec-row {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--cws-border-subtle);
    font-size: 13.5px;
}
.cws-spec-row:last-child { border-bottom: none; }

.cws-spec-label {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

.cws-spec-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Screenshots Gallery Lightbox Slider */
.cws-gallery {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 12px 0 20px;
}

.cws-gallery-item {
    height: 240px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--cws-border);
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.cws-footer {
    background: var(--cws-surface-low);
    border-top: 1px solid var(--cws-border);
    padding: 40px 0 28px;
    margin-top: 60px;
    color: var(--text-secondary);
    font-size: 13px;
}

.cws-footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin-bottom: 16px;
    font-weight: 500;
    flex-wrap: wrap;
}
