/* Standalone Granny Squares Stylesheet - Full Width Design */

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #252525;
    background: #f2f2f3;
    line-height: 1.4;
}

/* Site Header Styles */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    flex-shrink: 0;
}

.site-logo {
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.auth-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-text {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.admin-badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-link {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link:hover {
    background: #f5f5f5;
    color: #fcb040;
}

.nav-link.register {
    background: #fcb040;
    color: white;
}

.nav-link.register:hover {
    background: #e09f36;
    color: white;
}

.nav-link.logout {
    color: #666;
}

.nav-link.logout:hover {
    background: #f0f0f0;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-header-content {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    
    .site-logo {
        max-height: 200px;
    }
    
    .user-menu,
    .auth-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .welcome-text {
        text-align: center;
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 10px 0;
    }
    
  
    .nav-link {
        padding: 6px 12px;
        font-size: 15px;
    }
    
    .welcome-text {
        font-size: 15px;
    }
}
/* Typography */
@font-face {
	/*
    font-family: 'BebasNeueRegular';
    src: url('BebasNeue-webfont.eot');
    src: url('BebasNeue-webfont.eot?#iefix') format('embedded-opentype'),
         url('BebasNeue-webfont.woff') format('woff'),
         url('BebasNeue-webfont.ttf') format('truetype'),
         url('BebasNeue-webfont.svg#BebasNeueRegular') format('svg');
	*/
    font-weight: normal;
    font-style: normal;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

p {
    margin: 0 0 15px 0;
}

a {
    color: #171717;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout Container */
#content {
    width: 100%;
    min-height: 100vh;
    background: #f2f2f3;
    padding: 20px;
}

/* Variant Creator Styles */
.variant-creator {
    background: #FFF;
    border: 1px solid #DFDFDF;
    border-radius: 12px;
    margin: 20px auto 40px;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.variant-header {
    padding: 20px 0 15px 0;
	width: 100%;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
	text-align:center;
}

.variant-header h2 {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 28px;
    margin: 0 0 8px 0;
    color: #333;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}


.variant-header-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

.dimension-badge {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    color: #495057;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #e9ecef;
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #90caf9;
}

.difficulty-badge::before {
    content: "📊 ";
    margin-right: 4px;
}

.designer-info {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.designer-info::before {
    content: "by ";
    opacity: 0.7;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .variant-header {
        padding: 15px 0 12px 0;
        margin-bottom: 20px;
    }
    
    .variant-header h2 {
        font-size: 24px;
        gap: 10px;
    }
    
    .variant-header-info {
        gap: 12px;
        font-size: 13px;
    }
    
    .dimension-badge,
    .difficulty-badge {
        font-size: 12px;
        padding: 3px 10px;
    }
    
    .designer-info {
        font-size: 13px;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .variant-header {
        padding: 12px 0 10px 0;
        margin-bottom: 15px;
    }
    
    .variant-header h2 {
        font-size: 20px;
        gap: 8px;
    }
    
    .variant-header-info {
        gap: 10px;
        font-size: 12px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dimension-badge,
    .difficulty-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}
/* User Info Bar */
.user-info-bar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
}

.user-info-bar.admin {
    background: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.user-info-bar.low-credits {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Warning Messages */
.credits-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #856404;
    display: none;
    font-size: 14px;
}

.credits-warning.show {
    display: block;
}

.credits-warning.critical {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.auth-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    color: #721c24;
    text-align: center;
    font-size: 14px;
}

.no-login-message {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

/* Variant Sections */
.variant-section {
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.variant-section h3 {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    color: #333;
    margin: 0 0 20px 0;
    font-size: 20px;
    text-transform: uppercase;
}

/* Current Image Display */
.current-image {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.current-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.current-image h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

/* Tab System */
.option-tabs {
    display: flex;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: #e9ecef;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-button:hover:not(.active) {
    background: #dee2e6;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form Controls */
.color-input, .theme-input {
    width: 100%;
	max-width:500px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
}

.color-input:focus, .theme-input:focus {
    outline: none;
    border-color: #fcb040;
    box-shadow: 0 0 0 3px rgba(252, 176, 64, 0.1);
}

/* Buttons */
.variant-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
}

.variant-btn-primary {
    background: #fcb040;
    color: white;
	margin-bottom:12px;
}

.variant-btn-primary:hover:not(:disabled) {
    background: #DE9200;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 12px rgba(252, 176, 64, 0.3);
}

.variant-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.variant-btn-secondary {
    background: #6c757d;
    color: white;
}

.variant-btn-secondary:hover {
    background: #5a6268;
    text-decoration: none;
    color: white;
}

.variant-btn-back {
    background: #fcb040;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    padding: 8px 16px;
}

.variant-btn-back:hover {
    background: #DE9200;
    text-decoration: none;
    color: white;
}

/* Color Mapping Rows */
.color-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.color-row span {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: left;
}

/* Variant Count Selector */
.variant-count-selector {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.variant-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.variant-option:hover {
    border-color: #fcb040;
    background: rgba(252, 176, 64, 0.1);
}

.variant-option.selected {
    border-color: #fcb040;
    background: rgba(252, 176, 64, 0.15);
    color: #d68910;
}

.variant-option input[type="radio"] {
    margin-right: 8px;
}

/* Yarn Upload Styles */
.yarn-upload-area {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    margin-bottom: 20px;
}

.yarn-upload-area:hover {
    border-color: #fcb040;
    background: rgba(252, 176, 64, 0.05);
}

.yarn-upload-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    font-size: 60px;
    color: #666;
}

.upload-text strong {
    display: block;
    color: #333;
    margin-bottom: 8px;
    font-size: 18px;
}

.upload-text small {
    color: #666;
    font-size: 14px;
}

.yarn-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.yarn-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.yarn-preview-info {
    flex: 1;
}

.yarn-tips {
    margin-top: 10px;
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
}

.yarn-tips h4 {
    margin: 0 0 15px 0;
    color: #0c5460;
    font-size: 16px;
}

.yarn-tips ul {
    margin: 0;
    padding-left: 25px;
}

.yarn-tips li {
    margin-bottom: 8px;
    color: #0c5460;
}

/* Results Display */
.result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    display: none;
    font-size: 14px;
}

.result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.result.loading {
    background: #cce5ff;
    border: 1px solid #99d3ff;
    color: #0056b3;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Loading Animations */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #fcb040;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Variants Grid Display */
.variants-container {
    display: grid;
    gap: 20px;
    justify-content: center;
    margin: 20px auto;
    max-width: 800px;
}

.variants-grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
}

.variants-grid-3x3 {
    grid-template-columns: repeat(3, 1fr);
}

.variant-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    transition: transform 0.3s ease;
}

.variant-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.variant-item h5 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

.variant-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
}

.download-btn {
    background: #fcb040;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #DE9200;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
}

/* Granny Grid Styles */
.granny-grid-container {
    background: #FFF;
    margin: 0 auto 40px;
    overflow: hidden;
    max-width: 1400px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #DFDFDF;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.granny-header {
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.granny-header h2 {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 36px;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    text-transform: uppercase;
}

.granny-header p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.granny-content {
    padding: 30px;
}

/* Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.square-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.square-card {
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 100%;
    border: 3px solid transparent;
}

.square-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    border-color: #fcb040;
}

.square-card.active {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 30px rgba(252, 176, 64, 0.4);
    border-color: #fcb040;
}

.square-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #f8f9fa;
}

.square-dimension {
	display:none;
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.8em;
    background: rgba(255,255,255,0.95);
    color: #333;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.square-name {
    font-weight: 600;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
    color: #333;
    line-height: 1.3;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

/* Variants Section */
.variants-section {
    grid-column: 1 / -1;
    background: #f8f9fa;
    border: 3px solid #fcb040;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
        padding: 0 20px;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
        padding: 20px;
    }
}

.variants-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    gap: 15px;
}

.variants-title {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 20px;
    color: #333;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    flex: 1;
    min-width: 0; /* Allow text to shrink if needed */
    word-wrap: break-word;
    line-height: 1.2;
}

.variants-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-shrink: 0; /* Prevent close button from shrinking */
}

.close-variants {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    min-width: 30px; /* Ensure button doesn't shrink */
    min-height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent shrinking */
}

.close-variants:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Variants Grid - Only 2, 3, 4, or 6 columns (never 5) */
.variants-grid {
    display: grid;
    gap: 20px;
    padding: 20px;
    width: 100%;
}

/* Mobile: 2 columns */
@media (max-width: 480px) {
    .variants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet: 3 columns */
@media (min-width: 481px) and (max-width: 600px) {
    .variants-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop small: 4 columns */
@media (min-width: 601px) and (max-width: 900px) {
    .variants-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop large: 6 columns */
@media (min-width: 901px) {
    .variants-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
/* Desktop large: 6 columns */
@media (min-width: 1400px) {
    .variants-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}
/* Individual Variant Cards in Grid */
.variant-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.variant-card {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #f5f5f5;
}

.variant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.variant-image-grid {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.variant-name {
    font-size: 0.8em;
    font-weight: 500;
    margin-top: 6px;
    text-align: center;
    color: #555;
    line-height: 1.3;
}

/* Color Palette Styles */
.color-palette {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    min-height: 20px;
}

.color-swatch-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    position: relative;
}

.color-swatch-small:hover {
    transform: scale(1.3);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-swatch-small.clickable-color {
    cursor: pointer;
}

.color-swatch-small.clickable-color:hover {
    transform: scale(1.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 2px solid #fcb040;
}

/* Larger color swatches for detailed view */
.color-swatch-large {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: help;
    transition: all 0.2s ease;
    margin: 2px;
}

.color-swatch-large:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

/* Color info tooltips - these would need JavaScript to implement properly */
.color-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Enhanced no-colors state */
.no-colors {
    color: #999;
    font-style: italic;
    font-size: 11px;
    text-align: center;
    padding: 4px 0;
}

/* Create Your Own Variant */
.variant-card.create-your-own {
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    border: 3px dashed rgba(255,255,255,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.variant-card.create-your-own:hover {
    background: linear-gradient(135deg, #DE9200 0%, #fcb040 100%);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-4px) scale(1.05);
}

.create-your-own-content {
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 2;
}

.create-plus-icon {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.create-plus-icon { font-size:1em;}
.create-your-own-text {
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
@media (max-width: 800px) {

.create-plus-icon {
    font-size: 1.5em;
    margin-bottom: 0px;
}

.create-your-own-text {
    font-size: 0.6em;
}
}
.variant-name.create-your-own {
    color: #fcb040;
    font-weight: 600;
}
/* Style the vote buttons */
.vote-button {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 3px;
    transition: all 0.2s ease;
    color: #666;
}

.vote-button:hover {
    background-color: #f0f0f0;
    color: #333;
}

.vote-button.voted {
    color: #fcb040;
    background-color: rgba(252, 176, 64, 0.1);
}

.vote-button.vote-up.voted {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.vote-button.vote-down.voted {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Style the total score */
.total-score {
    font-weight: 600;
    font-size: 14px;
    min-width: 24px;
    text-align: center;
    padding: 2px 4px;
    border-radius: 3px;
}

.total-score.positive {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.total-score.negative {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.total-score.neutral {
    color: #666;
    background-color: #f8f9fa;
}

/* Loading state */
.variant-vote-container.vote-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation for vote feedback */
.vote-button.vote-animation {
    transform: scale(1.1);
    transition: transform 0.1s ease;
}

/* Remove old vote-row styles if they exist */
.vote-row {
    display: none;
}


/* Admin Features */
.admin-id-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    z-index: 10;
    pointer-events: none;
    font-family: monospace;
}

.admin-id {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    font-family: monospace;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    grid-column: 1 / -1;
    font-style: italic;
    font-size: 16px;
}

.variant-vote-container.vote-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media screen and (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
   
    .granny-header h2 {
        font-size: 28px;
    }
    
    .variant-header h2 {
        font-size: 28px;
    }

    .color-swatch-small {
        width: 14px;
        height: 14px;
    }
    
    .color-palette {
        gap: 1px;
        margin: 4px 0;
    }
}

@media screen and (max-width: 768px) {
    #content {
        padding: 15px;
    }
    
    .variant-content, .granny-content {
        padding: 20px;
    }
    
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    
    .color-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .user-info-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .option-tabs {
        flex-direction: column;
    }
    
    .variants-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .variants-title {
        text-align: center;
        font-size: 18px;
    }
    
    .variants-actions {
        justify-content: center;
    }
    
    .yarn-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .variants-grid-2x2,
    .variants-grid-3x3 {
        grid-template-columns: 1fr;
    }

    .color-swatch-small {
        width: 12px;
        height: 12px;
    }
}

@media screen and (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    

    
    .variant-count-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .variant-option {
        width: 100%;
        justify-content: center;
    }
    
    .granny-header h2, .variant-header h2 {
        font-size: 24px;
    }
    
    .granny-header, .variant-header {
        padding: 20px;
    }


    
    .color-swatch-small {
        width: 10px;
        height: 10px;
    }
}


/* Additional CSS for Variants Sorting - Add to your existing granny.css */

/* Sort Controls Integration with existing variants-section */
.variants-sort-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px 0;
    padding: 15px;
    background: rgba(252, 176, 64, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(252, 176, 64, 0.3);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
	display:none;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-right: 8px;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

.sort-button {
    padding: 8px 15px;
    border: 1px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
}

.sort-button:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sort-button.active {
    background: #fcb040;
    color: white;
    border-color: #fcb040;
}

.sort-button.active:hover {
    background: #DE9200;
    border-color: #DE9200;
    color: white;
}

.variants-count {
	display:none;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Loading state for variants */
.variants-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.variants-loading .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #fcb040;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Error state */
.variants-error {
    text-align: center;
    padding: 30px 20px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
    grid-column: 1 / -1;
}

/* Enhanced variant info for date display */
.variant-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}


.vote-button {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #666;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 2px;
}

.vote-button:hover {
    background-color: rgba(252, 176, 64, 0.1);
    color: #333;
}

.vote-button.voted {
    background-color: rgba(252, 176, 64, 0.15);
    color: #fcb040;
    font-weight: 600;
}

.vote-button.vote-up.voted {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.15);
}

.vote-button.vote-down.voted {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.15);
}

.total-score {
    font-weight: 600;
    font-size: 13px;
    min-width: 20px;
    text-align: center;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    background: white;
}

.total-score.positive {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
}

.total-score.negative {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
}

.total-score.neutral {
    color: #666;
    background-color: #f8f9fa;
}

/* Loading animation for voting */
.variant-vote-container.vote-loading {
    opacity: 0.6;
    pointer-events: none;
}

.vote-button.vote-animation {
    transform: scale(1.1);
    transition: transform 0.1s ease;
}

/* Sort icons */
.sort-icon {
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive adjustments for sort controls */
@media screen and (max-width: 768px) {
   .variants-sort-controls {
        flex-direction: row; /* Keep horizontal instead of column */
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        margin-bottom: 15px;
        gap: 8px;
        flex-wrap: wrap; /* Allow wrapping if absolutely necessary */
    }
    
     .sort-options {
        justify-content: flex-start;
        gap: 6px;
        flex-wrap: nowrap; /* Prevent buttons from wrapping */
        flex-shrink: 0; /* Prevent shrinking */
    }
    
    .sort-button {
        padding: 8px 12px; /* Slightly reduce padding */
        font-size: 11px; /* Slightly smaller font */
        gap: 4px;
        white-space: nowrap;
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }
    
    .variants-count {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .sort-options {
        gap: 8px;
    }
    
    .sort-button {
       padding: 6px 10px; justify-content: center;
        padding: 12px;
    }
    
    .variant-vote-container {
        gap: 4px;
    }
    
    .vote-button {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .total-score {
        font-size: 12px;
        min-width: 18px;
        padding: 2px 4px;
    }
}

/* Enhanced no-variants state */
.no-variants {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #ddd;
}
/* Additional CSS for Variant-Based Color Organization */

/* Multi-variant mode container */
.multi-variant-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Single variant mode container */
.single-variant-mode {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Individual variant section */
.variant-section {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.variant-section:hover {
    border-color: #fcb040;
    box-shadow: 0 4px 12px rgba(252, 176, 64, 0.1);
}



/* Color rows within variants */
.variant-colors {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.variant-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.variant-color-row:hover {
    background: rgba(252, 176, 64, 0.05);
    border-color: rgba(252, 176, 64, 0.3);
}

.variant-color-row .from-color-container {
    flex: 2;
    position: relative;
}

.variant-color-row .to-color-container {
    flex: 2;
}

.variant-color-row .arrow {
    color: #fcb040;
    font-weight: bold;
    font-size: 16px;
}

/* From color input styling */
.from-color-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.from-color-input:focus {
    outline: none;
    border-color: #fcb040;
    box-shadow: 0 0 0 3px rgba(252, 176, 64, 0.1);
    background: rgba(252, 176, 64, 0.02);
}

/* To color input styling */
.to-color-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.to-color-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

/* Add color button within variant */
.add-color-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.add-color-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-color-btn::before {
    content: '+';
    font-size: 16px;
    font-weight: bold;
}

/* Remove button styling */
.remove-color-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.remove-color-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

/* Variant numbering */
.variant-section:nth-child(1) {
    border-left: 4px solid #007bff;
}

.variant-section:nth-child(2) {
    border-left: 4px solid #28a745;
}

.variant-section:nth-child(3) {
    border-left: 4px solid #ffc107;
}

.variant-section:nth-child(4) {
    border-left: 4px solid #dc3545;
}

.variant-section:nth-child(5) {
    border-left: 4px solid #6f42c1;
}

.variant-section:nth-child(6) {
    border-left: 4px solid #fd7e14;
}

.variant-section:nth-child(7) {
    border-left: 4px solid #20c997;
}

.variant-section:nth-child(8) {
    border-left: 4px solid #e83e8c;
}

.variant-section:nth-child(9) {
    border-left: 4px solid #6c757d;
}

/* Empty state */
.variant-colors:empty::after {
    content: "No color mappings yet. Click 'Add Color Mapping' to get started.";
    display: block;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 13px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #ddd;
}

/* Mode transition animation */
.color-mappings-container {
    transition: all 0.4s ease;
}

.color-mappings-container.transitioning {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .variant-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .variant-color-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }
    
    .variant-color-row .arrow {
        align-self: center;
        transform: rotate(90deg);
        margin: 5px 0;
    }
    
    .variant-title {
        font-size: 16px;
    }
    
    .variant-title::before {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .add-color-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .multi-variant-mode {
        gap: 15px;
    }
    
    .variant-section {
        padding: 12px;
    }
    
    .variant-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .variant-colors {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .variant-color-row {
        padding: 12px;
        gap: 8px;
    }
    
    .from-color-input,
    .to-color-input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .remove-color-btn {
        padding: 6px 10px;
        font-size: 10px;
        width: 100%;
        margin-top: 8px;
    }
}

/* Visual feedback for synchronized inputs */
.from-color-input.syncing {
    background: linear-gradient(90deg, rgba(252, 176, 64, 0.1) 0%, rgba(252, 176, 64, 0.05) 100%);
    border-color: rgba(252, 176, 64, 0.5);
    animation: syncPulse 0.3s ease;
}

@keyframes syncPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Enhanced focus states */
.variant-section:focus-within {
    border-color: #fcb040;
    box-shadow: 0 0 0 3px rgba(252, 176, 64, 0.1);
}

/* Loading state for mode transitions */
.color-mappings-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.color-mappings-loading .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #fcb040;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

/* Improved add color mapping button for single variant mode */
.single-variant-mode .add-color-btn {
    background: #fcb040;
    margin-top: 15px;
}

.single-variant-mode .add-color-btn:hover {
    background: #DE9200;
}

/* Color index indicators for debugging (admin only) */
.variant-color-row[data-color-index]::before {
    content: attr(data-color-index);
    position: absolute;
    top: -8px;
    left: -8px;
    background: #666;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-family: monospace;
    display: none; /* Show only for admin/debug */
}

/* Show color indices in debug mode */
.debug-mode .variant-color-row[data-color-index]::before {
    display: block;
}/* Enhanced styles for multi-variant color mapping with optimized CSS for v1-v9 */
.color-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 8px;
}

.from-color-container {
    flex: 1;
}

.to-color-container {
    flex: 2;
}

.multi-to-colors {
    display: grid;
    gap: 5px;
}

.multi-to-colors.variants-4 {
    grid-template-columns: 1fr 1fr;
}

.multi-to-colors.variants-9 {
    grid-template-columns: 1fr 1fr 1fr;
}

.multi-to-colors .variant-input {
    position: relative;
}

.multi-to-colors .variant-input input {
    width: 100%;
    font-size: 11px;
    padding: 6px 8px;
}

.multi-to-colors .variant-label {
    font-size: 9px;
    color: #666;
    position: absolute;
    top: -15px;
    left: 2px;
    font-weight: bold;
}

.arrow {
    align-self: flex-start;
    margin-top: 8px;
    color: #666;
    font-weight: bold;
}

/* Upload loading styles */
.yarn-upload-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.upload-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-loading-text {
    text-align: center;
}

.upload-loading-text strong {
    display: block;
    color: #495057;
    font-size: 14px;
    margin-bottom: 2px;
}

.upload-loading-text small {
    color: #6c757d;
    font-size: 12px;
}

/* Variant count explanations */
.variant-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.variant-explanation {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    line-height: 1.2;
    max-width: 80px;
}

/* New auth styles */
.user-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e1e5e9;
}

.user-info-bar.admin {
    background: #e8f5e8;
    border-color: #28a745;
}

.user-info-bar.low-credits {
    background: #fff3cd;
    border-color: #ffc107;
}

.user-info-bar.critical {
    background: #f8d7da;
    border-color: #dc3545;
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.auth-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.auth-btn-primary {
    background: #007bff;
    color: white;
}

.auth-btn-primary:hover {
    background: #0056b3;
}

.auth-btn-secondary {
    background: #6c757d;
    color: white;
}

.auth-btn-secondary:hover {
    background: #5a6268;
}

.auth-btn-logout {
    background: #dc3545;
    color: white;
}

.auth-btn-logout:hover {
    background: #c82333;
}

/* NEW VARIANT-BASED COLOR CSS */
/* Multi-variant mode container */
.multi-variant-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Single variant mode container */
.single-variant-mode {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Individual variant section */
.variant-section {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.variant-section:hover {
    border-color: #fcb040;
    box-shadow: 0 4px 12px rgba(252, 176, 64, 0.1);
}


.variant-title {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 18px;
    color: #333;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.variant-title::before {
    content: attr(data-variant-number);
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.variant-subtitle {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

/* Color rows within variants */
.variant-colors {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.variant-color-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.variant-color-row:hover {
    background: rgba(252, 176, 64, 0.05);
    border-color: rgba(252, 176, 64, 0.3);
}

.variant-color-row .from-color-container {
    flex: 2;
    position: relative;
}

.variant-color-row .to-color-container {
    flex: 2;
}

.variant-color-row .arrow {
    color: #fcb040;
    font-weight: bold;
    font-size: 16px;
}

/* From color input styling */
.from-color-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.from-color-input:focus {
    outline: none;
    border-color: #fcb040;
    box-shadow: 0 0 0 3px rgba(252, 176, 64, 0.1);
    background: rgba(252, 176, 64, 0.02);
}

/* To color input styling */
.to-color-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.to-color-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

/* Add color button within variant */
.add-color-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.add-color-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-color-btn::before {
    content: '+';
    font-size: 16px;
    font-weight: bold;
}

/* Remove button styling */
.remove-color-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}

.remove-color-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

/* Variant numbering */
.variant-section:nth-child(1) {
    border-left: 4px solid #007bff;
}

.variant-section:nth-child(2) {
    border-left: 4px solid #28a745;
}

.variant-section:nth-child(3) {
    border-left: 4px solid #ffc107;
}

.variant-section:nth-child(4) {
    border-left: 4px solid #dc3545;
}

.variant-section:nth-child(5) {
    border-left: 4px solid #6f42c1;
}

.variant-section:nth-child(6) {
    border-left: 4px solid #fd7e14;
}

.variant-section:nth-child(7) {
    border-left: 4px solid #20c997;
}

.variant-section:nth-child(8) {
    border-left: 4px solid #e83e8c;
}

.variant-section:nth-child(9) {
    border-left: 4px solid #6c757d;
}

/* Alternative base image notification styles */
.alternative-base-notice {
    background: #e3f2fd;
    border: 2px solid #1976d2;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.alternative-base-notice h4 {
    color: #1976d2;
    margin: 0 0 10px 0;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 16px;
    text-transform: uppercase;
}

.alternative-base-notice p {
    color: #1565c0;
    margin: 0 0 12px 0;
    font-size: 13px;
    line-height: 1.4;
}

.base-comparison {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
}

.base-image-container {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.base-image-container h5 {
    margin: 0 0 8px 0;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.base-image-container img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.base-image-container.alternative img {
    border-color: #1976d2;
}

@media screen and (max-width: 768px) {
    .variant-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .variant-color-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }
    
    .variant-color-row .arrow {
        align-self: center;
        transform: rotate(90deg);
        margin: 5px 0;
    }
    
    .variant-title {
        font-size: 16px;
    }
    
    .variant-title::before {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .add-color-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .base-comparison {
        flex-direction: column;
    }
    
    .base-image-container {
        min-width: auto;
    }
}
/* social media sharing */
.share-container {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.share-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.share-icon {
    font-size: 16px;
}

.share-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.share-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.share-option:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.share-option:last-child {
    margin-bottom: 0;
}

.platform-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: bold;
}

.facebook { background: #1877F2; }
.twitter { background: #1DA1F2; }
.pinterest { background: #E60023; }
.whatsapp { background: #25D366; }
.copy-link { background: #6c757d; }
.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.platform-name {
    font-weight: 500;
}

.copy-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}
.main-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.main-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
#mainImage { max-width:500px;    width: 100%;
height:auto; }
/* Main Image Color Palette Styles */
.main-color-palette {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: opacity 0.15s ease;
}

.main-color-palette.fade-out {
    opacity: 0;
}

.color-palette-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    text-align: center;
}

.main-color-swatches {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch-main {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.color-swatch-main:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}



.no-colors-message {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .color-swatch-main {
        width: 40px;
        height: 40px;
    }

    
    .main-color-swatches {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .color-swatch-main {
        width: 35px;
        height: 35px;
    }
    
    .main-color-palette {
        margin: 15px 0;
        padding: 12px;
    }
    
    .color-palette-label {
        font-size: 1em;
        margin-bottom: 10px;
    }
}
#predefinedMatchesInfopredefined {margin: 0 0 15px 0; padding: 8px 12px; background: #e3f2fd; border: 1px solid #90caf9; border-radius: 4px; font-size: 12px; color: #1565c0; }
/* Pagination Controls Styles */
.pagination-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 10px;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    font-family: Arial, Helvetica, sans-serif;
}

.pagination-btn:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #fcb040;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    color: white;
    border-color: #fcb040;
    font-weight: 600;
}

.pagination-btn.active:hover {
    background: linear-gradient(135deg, #DE9200 0%, #fcb040 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(252, 176, 64, 0.3);
}

.pagination-btn.disabled {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.pagination-prev,
.pagination-next {
    padding: 8px 16px;
    font-weight: 600;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #6c757d;
    font-weight: 500;
    user-select: none;
}

/* Loading state for pagination */
.pagination-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Enhanced variants count display */
.variants-count {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    text-align: center;
    padding: 4px 8px;
    background: rgba(252, 176, 64, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(252, 176, 64, 0.2);
}

/* Responsive pagination */
@media screen and (max-width: 768px) {
    .pagination-controls {
        gap: 6px;
    }
    
    .pagination-numbers {
        margin: 0 6px;
        gap: 2px;
    }
    
    .pagination-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 36px;
    }
    
    .pagination-number {
        min-width: 36px;
        height: 36px;
    }
    
    .pagination-prev,
    .pagination-next {
        padding: 6px 12px;
    }
    
    .variants-count {
        font-size: 12px;
        margin-bottom: 10px;
    }
}

@media screen and (max-width: 480px) {
    .pagination-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-numbers {
        margin: 0;
        order: 1;
    }
    
    .pagination-prev {
        order: 0;
        width: 100%;
        max-width: 150px;
    }
    
    .pagination-next {
        order: 2;
        width: 100%;
        max-width: 150px;
    }
    
    .pagination-btn {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .pagination-number {
        min-width: 40px;
        height: 40px;
    }
    
    /* Hide some page numbers on very small screens */
    .pagination-numbers .pagination-number:not(.active) {
        display: none;
    }
    
    .pagination-numbers .pagination-number.active,
    .pagination-numbers .pagination-number:nth-child(-n+3),
    .pagination-numbers .pagination-number:nth-last-child(-n+3) {
        display: inline-flex;
    }
}

/* Animation for page changes */
.variants-grid.page-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Enhanced loading states */
.loading.pagination-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: #666;
    background: rgba(252, 176, 64, 0.05);
    border-radius: 8px;
    margin: 20px 0;
}

.loading.pagination-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #fcb040;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Smooth transitions for pagination */
.variants-section {
    transition: all 0.3s ease;
}

.variants-section.updating {
    opacity: 0.8;
}

/* Page info for accessibility */
.pagination-info {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

/* Focus states for better accessibility */
.pagination-btn:focus {
    outline: 2px solid #fcb040;
    outline-offset: 2px;
}

.pagination-btn:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .pagination-btn {
        border-width: 2px;
        font-weight: 600;
    }
    
    .pagination-btn.active {
        background: #333;
        color: white;
        border-color: #333;
    }
    
    .pagination-btn:hover:not(.disabled) {
        background: #f0f0f0;
        border-color: #333;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pagination-btn {
        transition: none;
    }
    
    .pagination-btn:hover:not(.disabled) {
        transform: none;
    }
    
    .variants-grid.page-loading {
        transition: none;
    }
}
/* Admin overlay styles */
.admin-id-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 100;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
    font-family: monospace;
    line-height: 1;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.admin-id {
    color: #dc3545;
    font-weight: bold;
    font-size: 0.85em;
    font-family: monospace;
    background: rgba(220, 53, 69, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
}

/* Make sure variant cards have relative positioning for overlay */
.variant-card {
    position: relative;
}

/* Admin overlay hover effects */
.variant-card:hover .admin-id-overlay {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Ensure overlay is visible on different background colors */
.variant-card.create-your-own .admin-id-overlay {
    background: rgba(255, 255, 255, 0.9);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.5);
    text-shadow: none;
}

.variant-card.create-your-own:hover .admin-id-overlay {
    background: white;
    color: #dc3545;
    border-color: #dc3545;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .admin-id-overlay {
        font-size: 10px;
        padding: 3px 6px;
        top: 4px;
        right: 4px;
    }
    
    .admin-id {
        font-size: 0.8em;
        padding: 1px 4px;
    }
}

@media screen and (max-width: 480px) {
    .admin-id-overlay {
        font-size: 9px;
        padding: 2px 4px;
        top: 2px;
        right: 2px;
    }
}
/* Condensed Color Mapping Table Styles */
.color-mapping-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.color-mapping-table th {
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
}

.color-mapping-table th:first-child {
    text-align: left;
    padding-left: 15px;
}

.color-mapping-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.color-mapping-table td:first-child {
    padding-left: 15px;
    font-weight: 500;
    background: #f8f9fa;
    width: 200px;
    min-width: 200px;
}

.color-mapping-table tr:hover {
    background: rgba(252, 176, 64, 0.05);
}

.color-mapping-table tr:hover td:first-child {
    background: rgba(252, 176, 64, 0.1);
}

.from-color-table-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.from-color-table-input:focus {
    outline: none;
    border-color: #fcb040;
    box-shadow: 0 0 0 2px rgba(252, 176, 64, 0.1);
    background: rgba(252, 176, 64, 0.02);
}

.to-color-table-input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.to-color-table-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

.remove-row-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    text-transform: uppercase;
}

.remove-row-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.add-color-table-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 10px;
}

.add-color-table-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-color-table-btn::before {
    content: '+ ';
    font-size: 14px;
    font-weight: bold;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.table-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #1565c0;
}

.table-info strong {
    color: #1976d2;
}

/* Responsive design for table */
@media screen and (max-width: 768px) {
    .color-mapping-table {
        font-size: 12px;
    }
    
    .color-mapping-table th,
    .color-mapping-table td {
        padding: 8px 6px;
    }
    
    .color-mapping-table td:first-child {
        width: 150px;
        min-width: 150px;
        padding-left: 10px;
    }
    
    .color-mapping-table th:first-child {
        padding-left: 10px;
    }
    
    .from-color-table-input,
    .to-color-table-input {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .remove-row-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media screen and (max-width: 480px) {
    .table-container {
        margin: 0 -15px 15px -15px;
        border-radius: 0;
    }
    
    .color-mapping-table {
        border-radius: 0;
    }
    
    .color-mapping-table th,
    .color-mapping-table td {
        padding: 6px 4px;
    }
    
    .color-mapping-table td:first-child {
        width: 120px;
        min-width: 120px;
        padding-left: 8px;
    }
    
    .color-mapping-table th:first-child {
        padding-left: 8px;
    }
    
    .from-color-table-input,
    .to-color-table-input {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .remove-row-btn {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .add-color-table-btn {
        width: 100%;
        margin: 15px 0;
    }
}
/* Tab-Based Color Mapping Styles */
.variant-tabs-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 15px 0;
}

.variant-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.variant-tabs::-webkit-scrollbar {
    display: none;
}

.variant-tab {
    flex: 1;
    min-width: 80px;
    padding: 12px 16px;
    background: #f8f9fa;
    color: #666;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-right: 1px solid #e9ecef;
}

.variant-tab:last-child {
    border-right: none;
}

.variant-tab:hover {
    background: rgba(252, 176, 64, 0.1);
    color: #fcb040;
}

.variant-tab.active {
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    color: white;
    position: relative;
}

.variant-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
}

.variant-tab.completed::before {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.variant-tab.completed.active::before {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.2);
}

.variant-tab-content {
    display: none;
    padding: 20px;
}

.variant-tab-content.active {
    display: block;
}

.variant-tab-header {
    margin-bottom: 15px;
    text-align: center;
}

.variant-tab-title {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 18px;
    color: #333;
    margin: 0 0 5px 0;
    text-transform: uppercase;
}

.variant-tab-subtitle {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin: 0;
}

.simple-color-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 15px;
}

.simple-color-table thead th {
    background: #f8f9fa;
    color: #495057;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    border-bottom: 2px solid #e9ecef;
}

.simple-color-table thead th:first-child {
    border-top-left-radius: 6px;
}

.simple-color-table thead th:last-child {
    border-top-right-radius: 6px;
    text-align: center;
}

.simple-color-table tbody tr {
    transition: all 0.2s ease;
}

.simple-color-table tbody tr:hover {
    background: rgba(252, 176, 64, 0.05);
}

.simple-color-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.simple-color-table tbody tr:last-child td {
    border-bottom: none;
}

.simple-color-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 6px;
}

.simple-color-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 6px;
}

.tab-from-color-input,
.tab-to-color-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.tab-from-color-input:focus {
    outline: none;
    border-color: #fcb040;
    box-shadow: 0 0 0 3px rgba(252, 176, 64, 0.1);
    background: rgba(252, 176, 64, 0.02);
}

.tab-to-color-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

.tab-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    text-transform: uppercase;
}

.tab-remove-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.add-color-tab-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-color-tab-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-color-tab-btn::before {
    content: '+';
    font-size: 16px;
    font-weight: bold;
}

.empty-tab-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin-bottom: 15px;
}

.empty-tab-state-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 12px;
}

.empty-tab-state-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

.empty-tab-state-subtext {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
}

.variant-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px 20px;
    background: rgba(252, 176, 64, 0.1);
    border-top: 1px solid rgba(252, 176, 64, 0.2);
    font-size: 13px;
    color: #856404;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.progress-icon {
    font-size: 14px;
    color: #28a745;
}

/* Responsive design for tabs */
@media screen and (max-width: 768px) {
    .variant-tab {
        min-width: 70px;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .variant-tab-content {
        padding: 15px;
    }
    
    .variant-tab-title {
        font-size: 16px;
    }
    
    .simple-color-table thead th,
    .simple-color-table tbody td {
        padding: 8px 10px;
    }
    
    .tab-from-color-input,
    .tab-to-color-input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .add-color-tab-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .variant-progress {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .variant-tab {
        min-width: 60px;
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .variant-tab.completed::before {
        width: 14px;
        height: 14px;
        font-size: 9px;
        top: 2px;
        right: 2px;
    }
    
    .variant-tab-content {
        padding: 12px;
    }
    
    .simple-color-table thead th,
    .simple-color-table tbody td {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .tab-from-color-input,
    .tab-to-color-input {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .tab-remove-btn {
        padding: 6px 8px;
        font-size: 10px;
    }
    
    .empty-tab-state {
        padding: 30px 15px;
    }
    
    .empty-tab-state-icon {
        font-size: 36px;
    }
    
    .empty-tab-state-text {
        font-size: 14px;
    }
    
    .empty-tab-state-subtext {
        font-size: 12px;
    }
}

/* Animation for tab switching */
.variant-tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Focus states for accessibility */
.variant-tab:focus {
    outline: 2px solid #fcb040;
    outline-offset: -2px;
}

.variant-tab:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .variant-tab {
        border: 2px solid transparent;
    }
    
    .variant-tab.active {
        background: #333;
        color: white;
        border-color: #333;
    }
    
    .variant-tab:hover {
        border-color: #fcb040;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .variant-tab,
    .tab-remove-btn,
    .add-color-tab-btn {
        transition: none;
    }
    
    .variant-tab-content {
        animation: none;
    }
    
    .add-color-tab-btn:hover {
        transform: none;
    }
}
/* Yarn Gallery Styles */

/* Yarn Method Selection Tabs */
.yarn-method-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.yarn-method-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.yarn-method-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.yarn-method-tab:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

.yarn-method-tab .tab-icon {
    font-size: 16px;
}

.yarn-method-tab .tab-text {
    font-size: 14px;
}

.gallery-count {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 6px;
}

.yarn-method-tab.active .gallery-count {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Yarn Method Sections */
.yarn-method-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.yarn-method-section.active {
    display: block;
}

/* Gallery Container */
.yarn-gallery-container {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
}

/* Gallery Grid - FIXED IMAGE SIZING */
.yarn-gallery {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}



/* FIXED Gallery Photo Items with Proper Image Constraints */
.gallery-photo-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 220px; /* Increased from 150px */
    height: auto;
}

.gallery-photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.gallery-photo-item.selected {
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transform: translateY(-2px);
}

.gallery-photo-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1; /* Keep square aspect ratio */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    min-height: 0;
}

/* FIXED Image Sizing - Larger */
.gallery-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-photo-item:hover .gallery-photo-thumb img {
    transform: scale(1.05);
}
.gallery-photo-overlay {
    display: none;
}


.selection-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #28a745;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}
.gallery-photo-info {
    padding: 12px;
    background: white;
    border-top: 1px solid #f1f3f4;
    flex-shrink: 0;
    min-height: 80px; /* Increased to accommodate delete button */
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gallery-photo-name {
    font-weight: 600;
    font-size: 12px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gallery-photo-date {
    font-size: 10px;
    color: #666;
    margin-bottom: 6px;
}

.gallery-photo-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #999;
}

.usage-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}
.gallery-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    text-transform: uppercase;
    width: 100%;
    margin-top: auto;
}

.gallery-delete-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}
.file-size {
    color: #666;
}

/* Gallery States */
.gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    font-size: 14px;
    gap: 12px;
}

.gallery-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-gallery-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-gallery-title {
    font-size: 18px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

.empty-gallery-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 20px;
}

.gallery-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.error-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.error-message {
    font-size: 14px;
    margin-bottom: 20px;
    color: #721c24;
}

/* Load More Button */
.gallery-load-more {
    text-align: center;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* Selected Gallery Photo Preview */
.selected-gallery-photo {
    margin-top: 20px;
    background: white;
    border: 2px solid #28a745;
    border-radius: 12px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

.selected-photo-container {
    display: flex;
    padding: 20px;
    gap: 20px;
    align-items: flex-start;
}

.selected-photo-container img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.selected-photo-info {
    flex: 1;
}

.selected-photo-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

.selected-photo-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.selected-photo-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-weight: 600;
}

.selected-photo-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.variant-btn-danger {
    background: #dc3545;
    color: white;
}

.variant-btn-danger:hover {
    background: #c82333;
}

/* Upload loading styles */
.yarn-upload-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.upload-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.upload-loading-text {
    text-align: center;
}

.upload-loading-text strong {
    display: block;
    color: #495057;
    font-size: 14px;
    margin-bottom: 2px;
}

.upload-loading-text small {
    color: #6c757d;
    font-size: 12px;
}

/* Variant count explanations */
.variant-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.variant-explanation {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    line-height: 1.2;
    max-width: 80px;
}

/* Enhanced styles for multi-variant color mapping */
.color-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 8px;
}

.from-color-container {
    flex: 1;
}

.to-color-container {
    flex: 2;
}

.multi-to-colors {
    display: grid;
    gap: 5px;
}

.multi-to-colors.variants-4 {
    grid-template-columns: 1fr 1fr;
}

.multi-to-colors.variants-9 {
    grid-template-columns: 1fr 1fr 1fr;
}

.multi-to-colors .variant-input {
    position: relative;
}

.multi-to-colors .variant-input input {
    width: 100%;
    font-size: 11px;
    padding: 6px 8px;
}

.multi-to-colors .variant-label {
    font-size: 9px;
    color: #666;
    position: absolute;
    top: -15px;
    left: 2px;
    font-weight: bold;
}

.arrow {
    align-self: flex-start;
    margin-top: 8px;
    color: #666;
    font-weight: bold;
}

#predefinedMatchesInfopredefined {
    margin: 0 0 15px 0; 
    padding: 8px 12px; 
    background: #e3f2fd; 
    border: 1px solid #90caf9; 
    border-radius: 4px; 
    font-size: 12px; 
    color: #1565c0;
}

/* Main Image Color Palette Styles */
.main-color-palette {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: opacity 0.15s ease;
}

.main-color-palette.fade-out {
    opacity: 0;
}

.color-palette-label {
    font-size: 1.1em;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    text-align: center;
}

.main-color-swatches {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch-main {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.color-swatch-main:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}



.no-colors-message {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
}

.main-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.main-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media screen and (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    

    .granny-header h2 {
        font-size: 28px;
    }
    
    .variant-header h2 {
        font-size: 28px;
    }

    .color-swatch-small {
        width: 14px;
        height: 14px;
    }
    
    .color-palette {
        gap: 1px;
        margin: 4px 0;
    }
}

@media screen and (max-width: 768px) {
    #content {
        padding: 15px;
    }
    
    .variant-content, .granny-content {
        padding: 20px;
    }
    
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    

    .color-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .user-info-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .option-tabs {
        flex-direction: column;
    }
    
    .variants-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .variants-title {
        text-align: center;
        font-size: 18px;
    }
    
    .variants-actions {
        justify-content: center;
    }
    
    .yarn-preview {
        flex-direction: column;
        text-align: center;
    }
    
    .variants-grid-2x2,
    .variants-grid-3x3 {
        grid-template-columns: 1fr;
    }

    .color-swatch-small {
        width: 12px;
        height: 12px;
    }
    
    .base-comparison {
        flex-direction: column;
    }
    
    .base-image-container {
        min-width: auto;
    }
    
    .yarn-method-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .yarn-method-tab .tab-icon {
        font-size: 14px;
    }
    

 
    
    .selected-photo-container {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    
    .selected-photo-container img {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }
    
    .selected-photo-actions {
        justify-content: center;
    }
    
    .gallery-photo-info {
        padding: 8px;
    }
    
    .gallery-photo-name {
        font-size: 11px;
    }
    
    .gallery-photo-date {
        font-size: 9px;
    }

    .color-swatch-main {
        width: 40px;
        height: 40px;
    }
    
 
    
    .main-color-swatches {
        gap: 6px;
    }
    
    .admin-id-overlay {
        font-size: 10px;
        padding: 3px 6px;
        top: 4px;
        right: 4px;
    }
    
    .admin-id {
        font-size: 0.8em;
        padding: 1px 4px;
    }
}

@media screen and (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    

    
    .variant-count-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .variant-option {
        width: 100%;
        justify-content: center;
    }
    
    .granny-header h2, .variant-header h2 {
        font-size: 24px;
    }
    
    .granny-header, .variant-header {
        padding: 20px;
    }

    .color-palette {
        flex-wrap: wrap;
        justify-content: center;
        margin: 4px auto;
    }
    
    .color-swatch-small {
        width: 10px;
        height: 10px;
    }
    
    .yarn-method-tabs {
        margin-bottom: 15px;
    }
    
    .yarn-method-tab {
        padding: 10px 12px;
        font-size: 12px;
        flex-direction: column;
        gap: 4px;
    }

    
    .gallery-photo-info {
        padding: 6px;
    }
    
    .gallery-photo-name {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .gallery-photo-date {
        font-size: 8px;
    }
    
    .selected-photo-container {
        padding: 12px;
    }
    
    .selected-photo-container img {
        width: 80px;
        height: 80px;
    }
    
    .selected-photo-name {
        font-size: 14px;
    }
    
    .selected-photo-actions {
        flex-direction: column;
        gap: 8px;
    }

    .color-swatch-main {
        width: 35px;
        height: 35px;
    }
    
    .main-color-palette {
        margin: 15px 0;
        padding: 12px;
    }
    
    .color-palette-label {
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .admin-id-overlay {
        font-size: 9px;
        padding: 2px 4px;
        top: 2px;
        right: 2px;
    }
}



/* Animation for fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.yarn-method-tab:focus,
.gallery-photo-item:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .gallery-photo-item {
        border-width: 3px;
    }
    
    .gallery-photo-item.selected {
        border-color: #000;
        background: #fff;
    }
    
    .selection-indicator {
        background: #000;
    }
}
@media screen and (max-width: 768px) {
    .gallery-photo-item {
        max-width: 180px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-photo-item {
        max-width: 150px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    
    .gallery-photo-info {
        padding: 10px;
        min-height: 75px;
    }
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .yarn-method-tab,
    .gallery-photo-item {
        transition: none; 
    }
    
    .gallery-photo-item:hover {
        transform: none;
    }
    
    .gallery-photo-item:hover .gallery-photo-thumb img {
        transform: none;
    }
}
/* Add this CSS to your granny.css file to display gallery photos in a grid */

/* Gallery Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Updated from 140px */
    gap: 20px; /* Increased gap */
    padding: 0;
    width: 100%;
}

/* Ensure gallery container allows for grid layout */
.yarn-gallery {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

/* Update gallery photo items for better grid display */
.gallery-photo-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
}

.gallery-photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.gallery-photo-item.selected {
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transform: translateY(-2px);
}

/* Fixed aspect ratio for consistent grid layout */
.gallery-photo-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1; /* This ensures square images */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.gallery-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery-photo-info {
    padding: 10px;
    background: white;
    border-top: 1px solid #f1f3f4;
    flex-shrink: 0;
    min-height: 60px;
}

/* Responsive grid adjustments */
@media screen and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .yarn-gallery {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .yarn-gallery {
        padding: 12px;
    }
    
    .gallery-photo-info {
        padding: 8px;
        min-height: 50px;
    }
}
/* Gallery Modal Styles */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.gallery-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.gallery-modal-content {
    position: relative;
    background: white;
    margin: 2% auto;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gallery-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.gallery-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.gallery-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.gallery-modal-close:hover {
    background: #e9ecef;
    color: #333;
}

.gallery-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    text-align: center;
}

.gallery-modal-body img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.modal-photo-details {
    margin-top: 16px;
    text-align: left;
}

.modal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.modal-detail-row:last-child {
    border-bottom: none;
}

.modal-detail-label {
    font-weight: 600;
    color: #555;
}

.modal-detail-value {
    color: #777;
}

.gallery-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f8f9fa;
}

.gallery-modal-footer .variant-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.gallery-modal-footer .variant-btn-secondary {
    background: #6c757d;
    color: white;
}

.gallery-modal-footer .variant-btn-secondary:hover {
    background: #5a6268;
}

.gallery-modal-footer .variant-btn-primary {
    background: #007bff;
    color: white;
}

.gallery-modal-footer .variant-btn-primary:hover {
    background: #0056b3;
}

.gallery-modal-footer .variant-btn-danger {
    background: #dc3545;
    color: white;
}

.gallery-modal-footer .variant-btn-danger:hover {
    background: #c82333;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .gallery-modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh;
    }
    
    .gallery-modal-header,
    .gallery-modal-body,
    .gallery-modal-footer {
        padding: 12px 16px;
    }
    
    .gallery-modal-footer {
        flex-direction: column;
    }
    
    .gallery-modal-footer .variant-btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .gallery-modal-body img {
        max-height: 300px;
    }
}
/* E-book Promotion Section */
.ebook-promotion-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.ebook-promotion-content {
    display: grid;
    grid-template-columns: 3fr 5fr 2fr;
    gap: 30px;
    align-items: center;
    margin-top: 20px;
}

.ebook-promotion-image {
    text-align: center;
}

.ebook-promotion-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.ebook-promotion-image img:hover {
    transform: scale(1.05);
}

.ebook-promotion-details h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

.ebook-promotion-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 15px 0;
}

.ebook-promotion-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ebook-promotion-features li {
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
}

.ebook-promotion-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.ebook-promotion-pricing {
    text-align: center;
}

.ebook-promotion-price {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.ebook-promotion-bonus {
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
}

.ebook-buy-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.ebook-buy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.ebook-buy-button:hover::before {
    left: 100%;
}
.ebook-buy-button:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea87a 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

/* Responsive design for e-book section */
@media screen and (max-width: 768px) {
    .ebook-promotion-content {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .ebook-promotion-section {
        padding: 20px;
        margin: 20px 0;
    }
}

@media screen and (max-width: 480px) {
    .ebook-promotion-content {
        gap: 15px;
    }
    
    .ebook-promotion-details h3 {
        font-size: 20px;
    }
    
    .ebook-promotion-price {
        font-size: 28px;
    }
}
/* Mobile Compact Variants Section Updates */

/* Update mobile breakpoints for more compact layout */
@media screen and (max-width: 768px) {
    /* Variants section overall padding reduction */
    .variants-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    /* Header with close button positioned top right */
     .variants-header {
        flex-direction: row; /* Keep horizontal, not column */
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 15px;
        gap: 10px;
        flex-wrap: nowrap; /* Force no wrapping */
    }
    
    .variants-title {
        text-align: left; /* Keep left aligned, not center */
        font-size: 16px;
        flex: 1;
        min-width: 0;
        padding-right: 5px; /* Add small padding */
    }
    
    .variants-actions {
        justify-content: flex-end;
        flex-shrink: 0;
    }
    
    .close-variants {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        font-size: 14px;
    }
    
    /* Sort controls - keep horizontal layout */
    .variants-sort-controls {
        flex-direction: row; /* Keep horizontal instead of column */
        justify-content: space-between;
        align-items: center;
        padding: 12px; /* Reduced from 15px */
        margin-bottom: 15px; /* Reduced from 20px */
        gap: 10px; /* Reduced gap */
    }
    
    .sort-options {
        justify-content: flex-start; /* Align left */
        gap: 8px; /* Reduced from 10px */
        flex-wrap: nowrap; /* Prevent wrapping */
    }
    
    .sort-label {
        font-size: 12px; /* Reduced */
        margin-right: 6px; /* Reduced from 8px */
    }
    
    .sort-button {
        padding: 6px 12px; /* Reduced from 8px 15px */
        font-size: 12px; /* Reduced from 13px */
        gap: 4px; /* Reduced from 6px */
        white-space: nowrap;
    }
    
    .sort-icon {
        font-size: 10px; /* Reduced from 12px */
    }
    
    .variants-count {
        font-size: 11px; /* Reduced from 12px */
        padding: 3px 6px; /* Reduced padding */
        text-align: right;
        flex-shrink: 0;
    }
  

    
    /* Color palette more compact */
    .color-palette {
        gap: 1px;
        margin: 2px 0; /* Reduced from 4px 0 */
        padding: 2px 0; /* Reduced from 4px 0 */
        min-height: 16px; /* Reduced from 20px */
    }
    
    .color-swatch-small {
        width: 12px; /* Reduced from 14px */
        height: 12px; /* Reduced from 14px */
    }
    
    /* Pagination more compact */
    .pagination-container {
        margin-top: 15px; /* Reduced from 25px */
        padding-top: 15px; /* Reduced from 20px */
    }
}

@media screen and (max-width: 480px) {
    /* Extra compact for very small screens */
    .variants-section {
        padding: 12px; /* Further reduced */
        margin: 10px 0; /* Further reduced */
    }
    
    .variants-header {
        margin-bottom: 12px;
        gap: 4px;
    }
    

    
    .close-variants {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
        font-size: 12px;
    }
    
       .variants-sort-controls {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .sort-label {
        font-size: 11px;
        margin-right: 4px;
    }
    
    .sort-button {
        padding: 6px 10px; /* Further reduce on very small screens */
        font-size: 10px;
        gap: 3px;
    }
    
    .variants-count {
        font-size: 10px;
    }
    

    .variant-vote-container {
        gap: 3px;
    }
    
    .vote-button {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .total-score {
        font-size: 10px;
        min-width: 16px;
        padding: 1px 3px;
    }
    
    .color-swatch-small {
        width: 10px;
        height: 10px;
    }
    
    .color-palette {
        margin: 1px 0;
        min-height: 12px;
    }
}
/* Add these styles to granny.css for the returning highlight effect */

.square-card.returning-highlight {
    animation: returnHighlight 3s ease-in-out;
    position: relative;
    z-index: 10;
}

.square-card.pulse-once {
    animation: pulseOnce 1s ease-in-out;
}

@keyframes returnHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
        transform: scale(1);
    }
    20% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0.4), 
                    0 0 20px rgba(102, 126, 234, 0.3);
        transform: scale(1.05);
    }
    40% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0.2), 
                    0 0 30px rgba(102, 126, 234, 0.2);
        transform: scale(1.02);
    }
    60% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0.1), 
                    0 0 20px rgba(102, 126, 234, 0.1);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
        transform: scale(1);
    }
}

@keyframes pulseOnce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* Ensure the highlight works well with existing hover effects */
.square-card.returning-highlight:hover {
    transform: scale(1.08) !important;
}

/* Make sure the highlight is visible on mobile devices */
@media (max-width: 768px) {
    .square-card.returning-highlight {
        animation: returnHighlightMobile 3s ease-in-out;
    }
    
    @keyframes returnHighlightMobile {
        0% {
            box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
            transform: scale(1);
        }
        20% {
            box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.5), 
                        0 0 15px rgba(102, 126, 234, 0.3);
            transform: scale(1.03);
        }
        40% {
            box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.3), 
                        0 0 20px rgba(102, 126, 234, 0.2);
            transform: scale(1.02);
        }
        60% {
            box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.1), 
                        0 0 15px rgba(102, 126, 234, 0.1);
            transform: scale(1.01);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
            transform: scale(1);
        }
    }
}
/* Killswitch Warning Styles */
.killswitch-warning {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: 2px solid #ff5722;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    animation: pulseWarning 2s ease-in-out infinite;
}

.killswitch-icon {
    font-size: 32px;
    flex-shrink: 0;
    animation: bounce 2s infinite;
}

.killswitch-content {
    flex: 1;
}

.killswitch-content strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.killswitch-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.95;
}

/* Admin killswitch notice in user bar */
.admin-killswitch-notice {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
    text-transform: uppercase;
}

/* Animations */
@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Disabled state for process button when killswitch is active */
.variant-btn-primary:disabled.killswitch-disabled {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
}

.variant-btn-primary:disabled.killswitch-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .killswitch-warning {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 10px;
    }
    
    .killswitch-icon {
        font-size: 28px;
        align-self: center;
    }
    
    .killswitch-content strong {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .killswitch-content p {
        font-size: 13px;
    }
    
    .admin-killswitch-notice {
        display: block;
        margin: 5px 0 0 0;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .killswitch-warning {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .killswitch-icon {
        font-size: 24px;
    }
    
    .killswitch-content strong {
        font-size: 14px;
    }
    
    .killswitch-content p {
        font-size: 12px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .killswitch-warning {
        background: #dc143c;
        border: 3px solid #8b0000;
        color: white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .killswitch-warning {
        animation: none;
    }
    
    .killswitch-icon {
        animation: none;
    }
}

/* Dark mode support (if you implement it later) */
@media (prefers-color-scheme: dark) {
    .killswitch-warning {
        background: linear-gradient(135deg, #d73a49 0%, #cb2431 100%);
        border-color: #d73a49;
    }
}
/* E-book Gallery/Carousel Styles */

/* Gallery Container */
.ebook-gallery-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Main Display Image */
.ebook-main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2; /* Wider than tall ratio */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 15px;
}

.ebook-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ebook-main-image img:hover {
    transform: scale(1.02);
}

/* Image Indicator */
.ebook-image-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation Arrows */
.ebook-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ebook-navigation:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ebook-nav-prev {
    left: 10px;
}

.ebook-nav-next {
    right: 10px;
}

/* Full-Size Modal */
.ebook-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.ebook-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebook-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.ebook-modal-close {
    position: absolute;
    top: -40px;
    right: -10px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ebook-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

/* Animation for image transitions */
.ebook-main-image img {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ebook-gallery-container {
        max-width: 250px;
    }
    
    .ebook-navigation {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .ebook-nav-prev {
        left: 5px;
    }
    
    .ebook-nav-next {
        right: 5px;
    }
    
    .ebook-image-indicator {
        font-size: 11px;
        padding: 3px 10px;
        bottom: 8px;
    }
    
    .ebook-modal-close {
        top: -35px;
        right: -5px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .ebook-gallery-container {
        max-width: 200px;
    }
    
    .ebook-navigation {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .ebook-image-indicator {
        font-size: 10px;
        padding: 2px 8px;
    }
    
    .ebook-modal-close {
        top: -30px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .ebook-navigation {
        opacity: 0.8;
        background: rgba(255, 255, 255, 0.95);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ebook-navigation {
        background: white;
        border: 2px solid #333;
    }
    
    .ebook-modal-close {
        background: white;
        border: 2px solid #333;
    }
    
    .ebook-image-indicator {
        background: #000;
        border: 1px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ebook-main-image img,
    .ebook-navigation {
        transition: none;
    }
    
    .ebook-main-image img {
        animation: none;
    }
    
    .ebook-navigation:hover {
        transform: none;
    }
}

/* Focus states for accessibility */
.ebook-navigation:focus {
    outline: 2px solid #fcb040;
    outline-offset: 2px;
}

.ebook-modal-close:focus {
    outline: 2px solid #fcb040;
    outline-offset: 2px;
}

/* Loading state for images */
.ebook-main-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
/* Enhanced Checkbox Styles */
.checkbox-group {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    margin-bottom: 0;
    font-weight: normal;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    background-color: #fff;
    display: inline-block;
    margin-top: 2px;
}

.checkbox-label:hover .checkmark {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    display: block;
    left: 4px;
    top: 0px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:focus + .checkmark {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.checkbox-text {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}
/* Tab-Based Multi-Variant Color Mapping Styles */

/* Main container for tab-based mode */
.tab-based-mode {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 15px 0;
}

/* Tab navigation header */
.variant-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.variant-tabs::-webkit-scrollbar {
    display: none;
}

/* Individual tab buttons */
.variant-tab {
    flex: 1;
    min-width: 100px;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #666;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    border-right: 1px solid #e9ecef;
}

.variant-tab:last-child {
    border-right: none;
}

.variant-tab:hover:not(.active) {
    background: rgba(252, 176, 64, 0.1);
    color: #fcb040;
}

.variant-tab.active {
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
    color: white;
    position: relative;
}

.variant-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #fcb040 0%, #DE9200 100%);
}

/* Completed tab indicator */
.variant-tab.completed::before {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 12px;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.variant-tab.completed.active::before {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Tab content areas */
.variant-tab-content {
    display: none;
    padding: 25px;
    min-height: 300px;
    animation: fadeIn 0.3s ease-in-out;
}

.variant-tab-content.active {
    display: block;
}

/* Tab content header */
.variant-tab-header {
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.variant-tab-title {
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    font-size: 20px;
    color: #333;
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.variant-tab-subtitle {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

/* Table container */
.variant-tab-table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

/* Simple color table for each tab */
.simple-color-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.simple-color-table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.simple-color-table thead th:first-child {
    border-top-left-radius: 8px;
    width: 40%;
}

.simple-color-table thead th:nth-child(2) {
    width: 40%;
}

.simple-color-table thead th:last-child {
    border-top-right-radius: 8px;
    text-align: center;
    width: 20%;
}

.simple-color-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.simple-color-table tbody tr:hover {
    background: rgba(252, 176, 64, 0.05);
}

.simple-color-table tbody tr:last-child {
    border-bottom: none;
}

.simple-color-table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
}

/* Input fields in tabs */
.tab-from-color-input,
.tab-to-color-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    transition: all 0.3s ease;
    background: white;
    line-height: 1.4;
}

.tab-from-color-input:focus {
    outline: none;
    border-color: #fcb040;
    box-shadow: 0 0 0 3px rgba(252, 176, 64, 0.1);
    background: rgba(252, 176, 64, 0.02);
}

.tab-to-color-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: rgba(102, 126, 234, 0.02);
}

/* Remove button in tabs */
.tab-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    text-transform: uppercase;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

.tab-remove-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* Add color button for tabs */
.add-color-tab-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.add-color-tab-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.add-color-tab-btn::before {
    content: '+';
    font-size: 18px;
    font-weight: bold;
}

/* Empty state for tabs */
.empty-tab-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.empty-tab-state-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 15px;
}

.empty-tab-state-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-family: 'BebasNeueRegular', Arial, sans-serif;
    text-transform: uppercase;
}

.empty-tab-state-subtext {
    font-size: 14px;
    color: #6c757d;
    font-style: italic;
    line-height: 1.4;
}

/* Progress indicator */
.variant-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px 25px;
    background: rgba(252, 176, 64, 0.1);
    border-top: 1px solid rgba(252, 176, 64, 0.2);
    font-size: 13px;
    color: #856404;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.progress-icon {
    font-size: 16px;
}

/* Animation for tab switching */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design for tabs */
@media screen and (max-width: 768px) {
    .variant-tab {
        min-width: 80px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .variant-tab.completed::before {
        width: 16px;
        height: 16px;
        font-size: 10px;
        top: 4px;
        right: 6px;
    }
    
    .variant-tab-content {
        padding: 20px;
    }
    
    .variant-tab-title {
        font-size: 18px;
    }
    
    .simple-color-table thead th,
    .simple-color-table tbody td {
        padding: 12px 15px;
    }
    
    .tab-from-color-input,
    .tab-to-color-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .add-color-tab-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .variant-progress {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 12px 20px;
    }
}

@media screen and (max-width: 480px) {
    .variant-tab {
        min-width: 70px;
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .variant-tab.completed::before {
        width: 14px;
        height: 14px;
        font-size: 9px;
        top: 3px;
        right: 4px;
    }
    
    .variant-tab-content {
        padding: 15px;
    }
    
    .variant-tab-title {
        font-size: 16px;
    }
    
    .variant-tab-subtitle {
        font-size: 13px;
    }
    
    .simple-color-table thead th,
    .simple-color-table tbody td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .tab-from-color-input,
    .tab-to-color-input {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .tab-remove-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .empty-tab-state {
        padding: 30px 15px;
    }
    
    .empty-tab-state-icon {
        font-size: 36px;
    }
    
    .empty-tab-state-text {
        font-size: 14px;
    }
    
    .empty-tab-state-subtext {
        font-size: 12px;
    }
}

/* Focus states for accessibility */
.variant-tab:focus {
    outline: 2px solid #fcb040;
    outline-offset: -2px;
}

.variant-tab:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .variant-tab {
        border: 2px solid transparent;
    }
    
    .variant-tab.active {
        background: #333;
        color: white;
        border-color: #333;
    }
    
    .variant-tab:hover {
        border-color: #fcb040;
    }
    
    .variant-tab.completed::before {
        background: #28a745;
        color: white;
        border-color: #28a745;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .variant-tab,
    .tab-remove-btn,
    .add-color-tab-btn {
        transition: none;
    }
    
    .variant-tab-content {
        animation: none;
    }
    
    .add-color-tab-btn:hover,
    .tab-remove-btn:hover {
        transform: none;
    }
}

/* Update to override existing table styles */
.tab-based-mode .color-mapping-table {
    display: none; /* Hide the old table when in tab mode */
}

.tab-based-mode .add-color-table-btn {
    display: none; /* Hide the old add button when in tab mode */
}
/* Add this CSS to your granny.css to visually indicate synced from colors */

/* Synced from color styling */
.tab-from-color-input {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 3px solid #fcb040;
    position: relative;
}

.tab-from-color-input:focus {
    background: rgba(252, 176, 64, 0.05);
    border-left-color: #DE9200;
}

/* Add a small sync indicator */
.tab-from-color-input::before {
    content: '🔗';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.6;
    pointer-events: none;
}

/* Update table header to indicate syncing */
.simple-color-table thead th:first-child::after {
    content: ' (synced across all variants)';
    font-size: 10px;
    font-weight: normal;
    opacity: 0.7;
    font-style: italic;
    text-transform: none;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .tab-from-color-input::before {
        left: -20px;
        font-size: 10px;
    }
    
    .simple-color-table thead th:first-child::after {
        display: block;
        margin-top: 2px;
        font-size: 9px;
    }
}

@media screen and (max-width: 480px) {
    .tab-from-color-input::before {
        display: none;
    }
}
/* Designer name below variants title */
.variants-designer {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    font-style: italic;
    margin-top: 4px;
    text-transform: none;
    font-family: Arial, Helvetica, sans-serif;
}

.variants-designer::before {
    content: "Pattern by ";
    opacity: 0.7;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .variants-designer {
        font-size: 12px;
        margin-top: 3px;
    }
}

@media screen and (max-width: 480px) {
    .variants-designer {
        font-size: 11px;
        margin-top: 2px;
    }
}
/* Drag and drop styling */
.yarn-upload-button {
    transition: all 0.3s ease;
}

.yarn-upload-button.drag-over {
    background: #e3f2fd !important;
    border-color: #2196F3 !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.yarn-upload-button.drag-over .upload-icon {
    animation: bounce 0.6s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
/* Collection name below designer */
.variants-collection {
    font-size: 12px;
    color: #888;
    font-weight: 400;
    font-style: italic;
    margin-top: 3px;
    text-transform: none;
    font-family: Arial, Helvetica, sans-serif;
}

.variants-collection::before {
    content: "Published in ";
    opacity: 0.8;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .variants-collection, .variants-designer {
        font-size: 13px;
    }
} 

  
/* Heart Vote System - Enhanced with Green Hearts */
.variant-vote-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.heart-button {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.heart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #28a745;
    color: #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.heart-button.loved {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    animation: heartPop 0.3s ease;
}

.heart-button.loved:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea87a 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    border-color: #1e7e34;
    color: white;
}

.heart-count {
    font-weight: 600;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
}

.heart-button.loved .heart-count {
    color: white;
}

/* Loading state */
.variant-vote-container.vote-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Heart pop animation */
@keyframes heartPop {
    0% { 
        transform: scale(1); 
    }
    30% { 
        transform: scale(1.2) rotate(-5deg); 
    }
    50% { 
        transform: scale(1.3) rotate(5deg); 
    }
    70% { 
        transform: scale(1.2) rotate(-3deg); 
    }
    100% { 
        transform: scale(1) rotate(0deg); 
    }
}

/* Pulse effect on hover when not loved */
.heart-button:not(.loved):hover {
    animation: heartPulse 1s ease infinite;
}

@keyframes heartPulse {
    0%, 100% { 
        transform: translateY(-2px) scale(1); 
    }
    50% { 
        transform: translateY(-2px) scale(1.05); 
    }
}

/* Active/click state */
.heart-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .heart-button {
        font-size: 16px;
        padding: 5px 10px;
        gap: 5px;
    }
    
    .heart-count {
        font-size: 13px;
        min-width: 18px;
    }
}

@media screen and (max-width: 480px) {
    .heart-button {
        font-size: 14px;
        padding: 4px 8px;
        gap: 4px;
        border-radius: 16px;
    }
    
    .heart-count {
        font-size: 12px;
        min-width: 16px;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .heart-button {
        border-width: 3px;
    }
    
    .heart-button.loved {
        background: #28a745;
        color: white;
        border-color: #1e7e34;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .heart-button,
    .heart-button:hover,
    .heart-button.loved {
        transition: none;
        animation: none;
    }
    
    .heart-button:hover {
        transform: none;
    }
}
/* Footer Styles */
.site-footer {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-link {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #fcb040;
    text-decoration: none;
}

.footer-separator {
    color: #ccc;
    margin: 0 5px;
}

.footer-copyright {
    color: #666;
    font-size: 13px;
    margin-top: 10px;
}

/* Responsive Footer */
@media (max-width: 480px) {
    .site-footer {
        padding: 20px 0;
        margin-top: 30px;
    }
    
    .footer-links {
        margin-bottom: 12px;
    }
    
    .footer-link {
        display: block;
        padding: 6px 0;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
}
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.invite-hero-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: slideInFromTop 0.5s ease-out;
}

.invite-hero-compact h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.invite-hero-compact .invite-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 15px;
}



.invite-actions-compact {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.invite-actions-compact h3 {
    color: #495057;
    margin: 0 0 20px 0;
    font-size: 20px;
}

.invite-action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.invite-btn-compact {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: Arial, Helvetica, sans-serif;
}

.invite-btn-primary-compact {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.invite-btn-primary-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.invite-btn-secondary-compact {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.invite-btn-secondary-compact:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.invite-terms-compact {
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    margin-top: 15px;
    line-height: 1.4;
}

.invite-error-compact {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .invite-hero-compact h2 { font-size: 24px; }

    .invite-actions-compact { padding: 20px; }
    .invite-action-buttons { flex-direction: column; }
    .invite-btn-compact { width: 100%; }
}
.admin-collection-filter {
    background: #f5c6cb;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.collection-filter-header {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-icon {
    font-size: 24px;
}

.collection-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.collection-btn {
    background: white;
    color: #f5576c;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.collection-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.collection-btn.active {
    background: #f5576c;
    color: white;
    border-color: white;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

@media (max-width: 768px) {
    .collection-buttons {
        flex-direction: column;
    }
    
    .collection-btn {
        width: 100%;
        text-align: center;
    }
}

.report-button {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 8px;
    margin-left: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.report-button:hover { 
    opacity: 1;
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.report-button:active {
    transform: scale(0.95);
}

.report-button:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}
/* temporary color palette removal */
.color-palette, #mainColorPalette { display:none !important; }
.save-image-btn { margin-top:18px; }
/* temporary color palette removal */
/* Designer Link Styles - Add to granny.css */

.variants-designer {
    color: #666;
    font-weight: normal;
}

.designer-link {
    color: #666;
    text-decoration: none;
    font-weight: normal;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.designer-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.designer-link:hover::after {
    opacity: 1;
    transform: translate(2px, -2px);
}



.designer-link::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 3px;
    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='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.designer-link:hover::after {
    opacity: 1;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .variants-designer,
    .designer-link {
        font-size: 13px;
    }
    
    .designer-link::after {
        font-size: 10px;
    }
}
#themeInput {
    -webkit-appearance: none;
    -webkit-user-select: text;
    user-select: text;
    touch-action: manipulation;
}

/* Ensure textarea is above other elements */
#themeTab.active #themeInput {
    position: relative;
    z-index: 10;
	resize:vertical;
}
.modal-overlay {
    display: none;
    pointer-events: none;
}

.modal-overlay.active {
    display: block;
    pointer-events: auto;
}
.char-counter {
    pointer-events: none; /* Allow clicks to pass through */
    position: relative;
    z-index: 1;
}
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Ensure inactive tabs don't block interaction */
.tab-content:not(.active) {
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}