/* Webshop Főoldal CSS - Modern Design - Kompakt verzió */
/* Kreatívshop.hu színvilág: #7BC4A4, #E8D5B7, #8B4513 */

:root {
   --primary-color: <?php echo PRIMARY_COLOR; ?>;
   --primary-color-dark: <?php echo darkenColor(PRIMARY_COLOR, 15); ?>;
   --secondary-color: <?php echo SECONDARY_COLOR; ?>;
   --secondary-color-dark: <?php echo darkenColor(SECONDARY_COLOR, 15); ?>;
   --accent-color: <?php echo ACCENT_COLOR; ?>;
   --text-color: <?php echo TEXT_COLOR; ?>;
   --text-light: #6c757d;
   --bg-color: <?php echo BACKGROUND_COLOR; ?>;
   --white: #ffffff;
   --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
   --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
   --shadow-lg: 0 8px 30px rgba(0,0,0,0.15);
   --border-radius: 16px;
   --border-radius-sm: 8px;
   --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
   --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
   --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-color-dark) 100%);
}

/* Reset és alapok */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

html {
   scroll-behavior: smooth;
   font-size: 16px;
}

body {
   font-family: var(--font-primary);
   background: var(--bg-color);
   color: var(--text-color);
   line-height: 1.6;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
   font-weight: 700;
   line-height: 1.2;
   color: var(--text-color);
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 2rem); }

p {
   font-size: 1rem;
   line-height: 1.7;
   color: var(--text-light);
}

.back-link {
   background: rgba(255,255,255,0.2);
   color: white;
   padding: 8px 16px;
   border-radius: 6px;
   text-decoration: none;
   transition: background 0.3s;
   font-size: 14px;
}

.back-link:hover {
   background: rgba(255,255,255,0.3);
}

/* Hero Banner */
.hero-banner {
   position: relative;
   height: 50vh;
   min-height: 300px;
   background: var(--gradient-secondary);
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
}

.hero-banner::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff" opacity="0.1"><polygon points="1000,100 1000,0 0,0 0,80"/></svg>');
   background-size: cover;
}

.hero-content {
   text-align: center;
   max-width: 700px;
   padding: 1.5rem;
   position: relative;
   z-index: 2;
}

.hero-title {
   font-size: clamp(2rem, 5vw, 3.5rem);
   font-weight: 900;
   color: var(--accent-color);
   margin-bottom: 0.75rem;
   background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   text-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hero-subtitle {
   font-size: clamp(1rem, 2vw, 1.25rem);
   color: var(--text-light);
   margin-bottom: 1.5rem;
   font-weight: 400;
}

.hero-cta {
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   background: var(--gradient-primary);
   color: var(--white);
   padding: 0.875rem 1.75rem;
   border: none;
   border-radius: 50px;
   font-size: 1rem;
   font-weight: 600;
   text-decoration: none;
   cursor: pointer;
   transition: var(--transition);
   box-shadow: var(--shadow-md);
}

.hero-cta:hover {
   transform: translateY(-3px);
   box-shadow: var(--shadow-lg);
}

/* Container */
.container {
   max-width: 1400px;
   margin: 0 auto;
   padding: 0 1rem;
}

/* Search Section - KOMPAKT */
.search-section {
   background: var(--white);
   border-radius: var(--border-radius);
   padding: 1.25rem;
   margin: -0.5rem 0.75rem 1rem;
   position: relative;
   z-index: 10;
   box-shadow: var(--shadow-lg);
   border: 1px solid rgba(255,255,255,0.2);
   backdrop-filter: blur(10px);
}

.search-form {
   display: grid;
   grid-template-columns: 1fr auto;
   gap: 0.75rem;
   margin-bottom: 1.5rem;
}

.search-input {
   padding: 0.875rem 1.25rem;
   border: 2px solid #e9ecef;
   border-radius: 50px;
   font-size: 0.9rem;
   font-family: inherit;
   transition: var(--transition);
   background: var(--white);
   box-shadow: var(--shadow-sm);
}

.search-input:focus {
   outline: none;
   border-color: var(--primary-color);
   box-shadow: 0 0 0 4px rgba(123, 196, 164, 0.1);
   transform: translateY(-2px);
}

.search-btn {
   background: var(--gradient-primary);
   color: var(--white);
   border: none;
   padding: 0.875rem 1.75rem;
   border-radius: 50px;
   font-size: 0.9rem;
   font-weight: 600;
   cursor: pointer;
   transition: var(--transition);
   box-shadow: var(--shadow-sm);
   white-space: nowrap;
}

.search-btn:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

/* Filters */
.filter-toggle {
   display: none;
   background: var(--gradient-primary);
   color: var(--white);
   border: none;
   padding: 0.875rem 1.25rem;
   border-radius: var(--border-radius-sm);
   margin-bottom: 0.75rem;
   width: 100%;
   font-size: 0.9rem;
   font-weight: 600;
   cursor: pointer;
   transition: var(--transition);
}

.filters {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
   gap: 1rem;
   padding-top: 0.75rem;
   border-top: 1px solid #e9ecef;
}

.filter-group {
   display: flex;
   flex-direction: column;
   gap: 0.4rem;
}

.filter-group label {
   font-weight: 600;
   color: var(--accent-color);
   font-size: 0.8rem;
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
   padding: 0.625rem 0.875rem;
   border: 2px solid #e9ecef;
   border-radius: var(--border-radius-sm);
   font-size: 0.8rem;
   font-family: inherit;
   transition: var(--transition);
   background: var(--white);
}

.filter-group select:focus,
.filter-group input:focus {
   outline: none;
   border-color: var(--primary-color);
   box-shadow: 0 0 0 3px rgba(123, 196, 164, 0.1);
}

.price-inputs {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 0.4rem;
}

/* Results Info - KOMPAKT */
.results-info {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin: 1rem 0 0.75rem;
   flex-wrap: wrap;
   gap: 0.75rem;
   padding: 0 0.75rem;
}

.results-count {
   font-size: 1.1rem;
   font-weight: 700;
   color: var(--accent-color);
}

.results-count strong {
   color: var(--primary-color);
}

.sort-options {
   display: flex;
   align-items: center;
   gap: 0.75rem;
   background: var(--white);
   padding: 0.625rem 1.25rem;
   border-radius: 50px;
   box-shadow: var(--shadow-sm);
}

.sort-options label {
   font-weight: 600;
   color: var(--text-light);
   font-size: 0.8rem;
}

.sort-options select {
   padding: 0.4rem 0.875rem;
   border: 1px solid #e9ecef;
   border-radius: var(--border-radius-sm);
   font-size: 0.8rem;
   background: var(--white);
   cursor: pointer;
}

/* Products Grid - KOMPAKT TÁVOLSÁGOK */
.products-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
   gap: 0.75rem;
   margin: 0 0.75rem 1.5rem;
   padding: 0;
}

.product-card {
   background: var(--white);
   border-radius: var(--border-radius);
   overflow: hidden;
   box-shadow: var(--shadow-sm);
   transition: var(--transition);
   cursor: pointer;
   border: 1px solid rgba(255,255,255,0.1);
   position: relative;
}

.product-card::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: var(--gradient-primary);
   opacity: 0;
   transition: var(--transition);
   z-index: 1;
}

.product-card:hover {
   transform: translateY(-6px);
   box-shadow: var(--shadow-lg);
}

.product-card:hover::before {
   opacity: 0.03;
}

.product-image {
   position: relative;
   aspect-ratio: 1;
   overflow: hidden;
   background: #f8f9fa;
}

.product-image img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   transition: var(--transition);
}

.product-card:hover .product-image img {
   transform: scale(1.06);
}

.product-info {
   padding: 1.25rem;
   position: relative;
   z-index: 2;
}

.product-title {
   font-size: 0.95rem;
   font-weight: 600;
   margin-bottom: 0.625rem;
   line-height: 1.4;
   color: var(--text-color);
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   overflow: hidden;
   min-height: 2.6rem;
}

.product-brand {
   color: var(--text-light);
   font-size: 0.8rem;
   margin-bottom: 0.625rem;
   font-weight: 500;
}

.product-price {
   font-size: 1.375rem;
   font-weight: 800;
   color: var(--accent-color);
   margin-bottom: 0.875rem;
}

.product-btn {
   background: var(--gradient-primary);
   color: var(--white);
   border: none;
   padding: 0.75rem 1.25rem;
   border-radius: 50px;
   width: 100%;
   font-size: 0.8rem;
   font-weight: 600;
   cursor: pointer;
   transition: var(--transition);
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.product-btn:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
}

/* Product Actions - Ha több gomb kell */
.product-actions {
   display: flex;
   gap: 0.5rem;
   margin-top: 0.875rem;
}

.product-btn {
   flex: 1;
   background: linear-gradient(135deg, var(--primary-color));
   color: white;
   border: none;
   padding: 0.75rem 1rem;
   border-radius: var(--border-radius-sm);
   font-size: 0.8rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.3s;
   text-align: center;
}

.product-btn:hover {
   transform: translateY(-2px);
   box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.product-btn-details {
   flex: 1;
   background: transparent;
   color: var(--primary-color);
   border: 2px solid var(--primary-color);
   padding: 0.625rem 1rem;
   border-radius: var(--border-radius-sm);
   font-size: 0.8rem;
   font-weight: 600;
   cursor: pointer;
   transition: all 0.3s;
   text-align: center;
}

.product-btn-details:hover {
   background: var(--primary-color);
   color: white;
   transform: translateY(-1px);
}

.product-btn.single {
   flex: none;
   width: 100%;
   border-radius: 50px;
   padding: 0.75rem 1.25rem;
}

/* No Results */
.no-results {
   text-align: center;
   padding: 3rem 1.5rem;
   background: var(--white);
   border-radius: var(--border-radius);
   box-shadow: var(--shadow-sm);
   margin: 0.75rem;
}

.no-results h3 {
   color: var(--accent-color);
   margin-bottom: 0.875rem;
   font-size: 16px;
}

.no-results p {
   color: var(--text-light);
   font-size: 0.95rem;
   margin-bottom: 0.4rem;
}

/* Pagination */
.pagination {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 0.4rem;
   margin: 2rem 0.75rem;
   flex-wrap: wrap;
}

.page-link {
   padding: 0.625rem 0.875rem;
   background: var(--white);
   color: var(--primary-color);
   text-decoration: none;
   border-radius: var(--border-radius-sm);
   border: 2px solid var(--primary-color);
   transition: var(--transition);
   font-weight: 600;
   font-size: 0.8rem;
   min-width: 40px;
   text-align: center;
}

.page-link:hover,
.page-link.active {
   background: var(--primary-color);
   color: var(--white);
   transform: translateY(-2px);
   box-shadow: var(--shadow-sm);
}

.page-link.disabled {
   opacity: 0.4;
   pointer-events: none;
}

/* Loading Animation */
.loading {
   display: none;
   text-align: center;
   padding: 2.5rem;
   background: var(--white);
   border-radius: var(--border-radius);
   margin: 0.75rem;
}

.spinner {
   border: 4px solid #f3f3f3;
   border-top: 4px solid var(--primary-color);
   border-radius: 50%;
   width: 45px;
   height: 45px;
   animation: spin 1s linear infinite;
   margin: 0 auto 0.875rem;
}

@keyframes spin {
   0% { transform: rotate(0deg); }
   100% { transform: rotate(360deg); }
}

/* Scroll to Top Button */
.scroll-top-btn {
   position: fixed;
   bottom: 1.5rem;
   right: 1.5rem;
   background: var(--gradient-primary);
   color: var(--white);
   border: none;
   border-radius: 50%;
   width: 50px;
   height: 50px;
   cursor: pointer;
   display: none;
   z-index: 1000;
   box-shadow: var(--shadow-lg);
   transition: var(--transition);
   font-size: 1.125rem;
   font-weight: bold;
}

.scroll-top-btn:hover {
   transform: translateY(-3px);
   box-shadow: var(--shadow-lg);
}

/* Main layout grid */
.main-layout {
   display: grid;
   grid-template-columns: 280px 1fr;
   gap: 1rem;
   max-width: 1400px;
   margin: 0 auto;
   padding: 0 1rem;
}

.main-content {
   width: 100%;
}

/* Mobile Responsive - KOMPAKT */
@media (max-width: 1024px) {
   .products-grid {
       grid-template-columns: repeat(3, 1fr);
       gap: 0.625rem;
   }
   
   .main-layout {
       grid-template-columns: 1fr;
       padding: 0;
   }
   
   .main-content {
       width: 100%;
   }
}

@media (max-width: 768px) {
   :root {
       --border-radius: 12px;
   }
   
   .container {
       padding: 0 0.75rem;
   }
   
   .hero-banner {
       height: 40vh;
       min-height: 250px;
   }
   
   .hero-content {
       padding: 0.875rem;
   }
   
   .search-section {
       margin: -2rem 0.5rem 0.75rem;
       padding: 1rem;
   }
   
   .search-form {
       grid-template-columns: 1fr;
       gap: 0.75rem;
       margin-bottom: 1rem;
   }
   
   .filter-toggle {
       display: block;
   }
   
   .filters {
       display: none;
       grid-template-columns: 1fr;
       gap: 0.75rem;
   }
   
   .filters.show {
       display: grid;
       margin-top: 0.75rem;
   }
   
   .products-grid {
       grid-template-columns: repeat(2, 1fr);
       gap: 0.5rem;
       margin: 0 0.5rem 1.25rem;
   }
   
   .product-info {
       padding: 0.875rem;
   }
   
   .product-title {
       font-size: 0.8rem;
       min-height: 2.2rem;
   }
   
   .product-price {
       font-size: 1.125rem;
   }
   
   .product-btn {
       padding: 0.625rem 1rem;
       font-size: 0.75rem;
   }
   
   .product-actions {
       flex-direction: column;
       gap: 0.4rem;
   }
   
   .product-btn, .product-btn-details {
       flex: none;
       padding: 0.625rem;
       font-size: 0.75rem;
   }
   
   .results-info {
       flex-direction: column;
       align-items: flex-start;
       gap: 0.75rem;
       padding: 0 0.5rem;
       margin: 0.75rem 0 0.5rem;
   }
   
   .sort-options {
       align-self: stretch;
       justify-content: space-between;
       padding: 0.5rem 1rem;
   }
   
   .pagination {
       margin: 1.5rem 0.5rem;
       gap: 0.2rem;
   }
   
   .page-link {
       padding: 0.4rem 0.625rem;
       font-size: 0.7rem;
       min-width: 36px;
   }
}

@media (max-width: 480px) {
   .hero-title {
       font-size: 1.75rem;
   }
   
   .search-section {
       margin: -1.5rem 0.25rem 0.5rem;
       padding: 0.75rem;
   }
   
   .products-grid {
       margin: 0 0.25rem 1rem;
       gap: 0.375rem;
   }
   
   .product-info {
       padding: 0.625rem;
   }
   
   .product-title {
       font-size: 0.75rem;
   }
   
   .product-price {
       font-size: 1rem;
   }
   
   .scroll-top-btn {
       bottom: 1rem;
       right: 1rem;
       width: 44px;
       height: 44px;
       font-size: 1rem;
   }
   
   .results-info {
       padding: 0 0.25rem;
   }
   
   .pagination {
       margin: 1rem 0.25rem;
   }
}


/* Animációk */
@keyframes fadeInUp {
   from {
       opacity: 0;
       transform: translateY(25px);
   }
   to {
       opacity: 1;
       transform: translateY(0);
   }
}

.product-card {
   animation: fadeInUp 0.5s ease-out;
}

.product-card:nth-child(even) {
   animation-delay: 0.08s;
}

.product-card:nth-child(3n) {
   animation-delay: 0.16s;
}

/* Focus states for accessibility */
.search-input:focus,
.filter-group select:focus,
.filter-group input:focus,
.product-btn:focus,
.page-link:focus,
.search-btn:focus {
   outline: 3px solid rgba(123, 196, 164, 0.3);
   outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
   :root {
       --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
       --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
       --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
   }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
   *,
   *::before,
   *::after {
       animation-duration: 0.01ms !important;
       animation-iteration-count: 1 !important;
       transition-duration: 0.01ms !important;
   }
}