/*
Theme Name: Kosttilskudd Pro
Theme URI: https://example.com
Author: Ditt Navn
Author URI: https://example.com
Description: WordPress-tema for affiliate-nettsteder for kosttilskudd
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kosttilskudd
*/

/* VARIABLES */
:root {
  --primary-green: #4A7C59;
  --accent-lime: #7CB342;
  --secondary-sage: #8BA888;
  --light-bg: #F9FAF7;
  --white: #FFFFFF;
  --text-dark: #2C3E2F;
  --text-medium: #5A6B5D;
  --text-light: #8B9A8E;
  --border-color: #E4EBE6;
  --success: #66BB6A;
  --font-display: 'Crimson Pro', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-accent: 'Space Grotesk', sans-serif;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
  --shadow-sm: 0 2px 8px rgba(74, 124, 89, 0.08);
  --shadow-md: 0 4px 16px rgba(74, 124, 89, 0.12);
  --transition: all 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--light-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-lime);
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--spacing-xl) 0;
}

/* HEADER */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-main {
  padding: 1rem 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-lime));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 10px;
  overflow: hidden;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-navigation {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-navigation a {
  font-family: var(--font-accent);
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.main-navigation a:hover {
  background: var(--light-bg);
  color: var(--primary-green);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* HERO */
.hero-section {
  background: linear-gradient(135deg, rgba(74, 124, 89, 0.95), rgba(124, 179, 66, 0.95)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23F9FAF7" width="1200" height="600"/></svg>');
  background-size: cover;
  color: var(--white);
  padding: 5rem 0;
  text-align: center;
}

.hero-title {
  color: var(--white);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-accent);
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--white);
  color: var(--primary-green);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary-green);
}

.btn-secondary {
  background: var(--primary-green);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--accent-lime);
  transform: translateY(-2px);
}

/* TRUST BADGES */
.trust-section {
  background: var(--white);
  padding: 3rem 0;
}

.trust-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-badge {
  padding: 2rem 1rem;
}

.badge-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.badge-title {
  font-family: var(--font-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

/* PRODUCTS */
.products-section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-lime));
  border-radius: 2px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.product-image {
  height: 220px;
  overflow: hidden;
  background: var(--light-bg);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--success);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.813rem;
  font-weight: 600;
}

.product-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: 0.875rem;
  color: var(--accent-lime);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-family: var(--font-accent);
}

.product-description {
  color: var(--text-medium);
  font-size: 0.938rem;
  margin-bottom: 1rem;
  flex: 1;
}

.product-features {
  list-style: none;
  margin-bottom: 1rem;
}

.product-features li {
  padding: 0.4rem 0;
  color: var(--text-medium);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-features li::before {
  content: '✓';
  color: var(--success);
  font-weight: bold;
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--primary-green);
  font-weight: 700;
}

.product-cta {
  padding: 0.75rem 1.5rem;
  font-size: 0.938rem;
}

/* FOOTER */
.site-footer {
  background: var(--text-dark);
  color: rgba(255, 255, 255, 0.85);
  padding-top: 5rem;
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
  padding-bottom: 0;
}

.footer-widget h3 {
  color: var(--white);
  font-family: var(--font-accent);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.footer-widget p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  font-size: 0.938rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.938rem;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--white);
  transform: translateX(3px);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  max-width: 450px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-green);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-disclaimer {
  margin-top: 0;
}

.footer-disclaimer h4 {
  font-weight: 600;
}

.footer-disclaimer strong {
  color: #1a1a1a !important;
}

.footer-disclaimer p {
  color: #1a1a1a !important;
}

.footer-disclaimer div[style*="background: #ffffff"] p {
  color: #1a1a1a !important;
}

.footer-bottom {
  padding-bottom: 2rem;
}

/* CONTACT FORM */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.contact-info,
.contact-form-wrapper {
  background: var(--white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* LEGAL CONTENT */
.legal-content {
  background: var(--white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin: 3rem 0;
}

.legal-content h2 {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.legal-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  
  .main-navigation.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* UTILITIES */
.text-center { text-align: center; }

/* CTA DESCRIPTION BUTTONS */
.cta-description-button {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-description-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(74, 124, 89, 0.4) !important;
}

.cta-description-button:hover span:last-child {
  opacity: 1;
}

.cta-description-button:active {
  transform: translateY(-1px);
}

.description-cta {
  animation: fadeInUp 0.6s ease-out;
}

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

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

.description-cta:hover {
  animation: pulse 2s ease-in-out infinite;
}

/* KK STAR RATINGS STYLING */
.kk-star-ratings {
  display: inline-block;
}

/* BACK TO TOP BUTTON */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-lime));
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: var(--transition);
  font-size: 1.5rem;
  font-weight: bold;
}

#back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(74, 124, 89, 0.3);
}

@media (max-width: 768px) {
  #back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
  
  /* Full width container on mobile */
  .container {
    padding: 0 0.5rem !important;
    max-width: 100% !important;
  }
  
  /* Product page responsive */
  .product-detail-section .container > div[style*="grid-template-columns"] {
    display: block !important;
  }
  
  .product-image-detail,
  .product-info-detail {
    margin-bottom: 2rem;
  }
  
  /* Remove extra padding on mobile */
  .tab-content > div[style*="padding: 0 2rem"] {
    padding: 0 0.5rem !important;
  }
  
  .product-tabs-section .container {
    padding: 0 !important;
  }
  
  /* Full width description text */
  .tab-content p,
  .tab-content ul,
  .tab-content ol,
  .tab-content h2,
  .tab-content h3 {
    max-width: 100% !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* CTA buttons in description */
  .description-cta {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .description-cta > div {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
  
  /* Product info sections */
  .product-info-detail > div[style*="background"] {
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
  }
  
  /* Breadcrumb */
  .breadcrumb {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Product tabs */
  .product-tabs-nav {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.25rem !important;
  }
  
  .tab-content p,
  .tab-content ul,
  .tab-content ol {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}

/* PAGE PRODUIT - Largeur réduite avec marges */
.single-product .container {
  max-width: 1000px;
  padding: 0 4rem;
}

@media (max-width: 1200px) {
  .single-product .container {
    max-width: 100%;
    padding: 0 2.5rem;
  }
}

@media (max-width: 768px) {
  .single-product .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 480px) {
  .single-product .container {
    padding: 0 1rem;
  }
}
