/* Sandsøya og Voksa Sogelag Nettbutikk - Hovudstiling */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header styling */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.header-content {
    padding: 20px 0;
    border-bottom: 3px solid #4a7c59;
}

.header h1 {
    font-size: 2.2em;
    color: #4a7c59;
    margin-bottom: 10px;
    font-weight: 600;
}

.header .tagline {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Navigation */
.nav {
    background: #4a7c59;
    padding: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav-list li {
    margin: 0;
}

.nav-list a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    font-weight: 500;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: #3d6348;
}

/* Main content */
.main-content {
    background: white;
    margin: 0 auto 40px;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.intro-text {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #555;
    line-height: 1.7;
}

.section-title {
    font-size: 1.8em;
    color: #4a7c59;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Product cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.product-card h3 {
    color: #4a7c59;
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-card h3 a {
    text-decoration: none;
    color: inherit;
}

.product-card h3 a:hover {
    color: #3d6348;
}

.product-card .author {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.product-card .description {
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-card .price {
    font-size: 1.3em;
    font-weight: bold;
    color: #4a7c59;
    margin-bottom: auto;
}

.product-cover {
    margin-bottom: 20px;
}

.product-cover img {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 6px;
}

.product-card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
}

.product-card h2 {
    color: #4a7c59;
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Buttons */
.buy-button {
    background: linear-gradient(135deg, #4a7c59 0%, #3d6348 100%);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    margin-top: 20px;
}

.buy-button:hover {
    background: linear-gradient(135deg, #3d6348 0%, #4a7c59 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

/* Back link */
.back-link {
    margin-bottom: 30px;
}

.back-link a {
    color: #4a7c59;
    text-decoration: none;
    font-weight: 500;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #4a7c59;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer h4 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer p, .footer a {
    color: #b8c5d1;
    text-decoration: none;
    line-height: 1.6;
}

.footer a:hover {
    color: white;
}

/* Fallback notice */
.fallback-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container { 
        padding: 0 15px; 
    }
    
    .main-content { 
        padding: 20px 15px; 
    }
    
    .header h1 { 
        font-size: 1.8em; 
    }
    
    .nav-list { 
        flex-direction: column;
        gap: 10px;
    }
    
    .products-grid { 
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        padding: 20px;
    }
    
    .product-card h3 {
        font-size: 1.3em;
    }
    
    .intro-content {
        padding: 30px 20px;
        margin: 0 auto 30px;
    }
    
    .intro-text {
        font-size: 1em;
        margin-bottom: 30px;
    }
    
    .section-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
}
