/*
 * Jultomtens Verkstad - Components CSS File
 * Reusable component styles with Fira Sans typography
 */

/* Import Fira Sans and Lilita One for brand headings */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@100..900&family=Lilita+One&display=swap');

:root {
    --brand-red: #B02314;
    --brand-orange: #E4570A;
    --brand-gold: #F1B33B;
}

/* Product Components */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card-enhanced {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.product-card-enhanced .product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-card-enhanced .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-enhanced:hover .product-image {
    transform: scale(1.05);
}

.product-card-enhanced .product-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-enhanced .product-title {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.4;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-enhanced .product-description {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-card-enhanced .product-price-section {
    margin-top: auto;
}

.product-card-enhanced .product-price {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 700;
    font-size: 1.375rem;
    color: #48bb78;
    margin-bottom: 0.25rem;
}

.product-card-enhanced .product-original-price {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: #a0aec0;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.product-card-enhanced .product-discount {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-red));
    color: white;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Shop Components */
.shop-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    text-decoration: none;
    color: inherit;
}

.shop-card .shop-logo {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.shop-card .shop-name {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.shop-card .shop-description {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 300;
    font-size: 0.875rem;
    color: #718096;
    text-align: center;
}

/* Search Components */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    width: 100%;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(176, 35, 20, 0.1);
}

.search-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 15px rgba(176, 35, 20, 0.3);
}

/* Category Components */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-item {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
}

.category-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--brand-red);
    color: inherit;
    text-decoration: none;
}

.category-item .category-icon {
    font-size: 3rem;
    color: var(--brand-red);
    margin-bottom: 1rem;
}

.category-item .category-name {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.category-item .category-count {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: #718096;
}

/* Alert Components */
.alert-modern {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.alert-modern.alert-success {
    background: linear-gradient(135deg, #c6f6d5, #9ae6b4);
    color: #22543d;
}

.alert-modern.alert-danger {
    background: linear-gradient(135deg, #fed7d7, #fc8181);
    color: #742a2a;
}

.alert-modern.alert-warning {
    background: linear-gradient(135deg, #fefcbf, #f6e05e);
    color: #744210;
}

.alert-modern.alert-info {
    background: linear-gradient(135deg, #cce7ff, #90cdf4);
    color: #2c5282;
}

/* Loading Components */
.loading-spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--brand-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    color: #718096;
    text-align: center;
    margin-top: 1rem;
}

/* Badge Components */
.badge-modern {
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

/* Icon Size Utilities */
.icon-md {
    font-size: 2rem !important;
}

.icon-lg {
    font-size: 3rem !important;
}

.icon-xl {
    font-size: 4rem !important;
}

.icon-xxl {
    font-size: 6rem !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .product-card-enhanced .product-content {
        padding: 1rem;
    }
    
    .search-input {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-button {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 0.5rem;
        border-radius: 8px;
    }
    
    .search-box {
        display: flex;
        flex-direction: column;
    }
}

/* Brand heading utility for components */
.brand-heading { font-family: 'Lilita One', 'Cooper Black', Impact, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; }
