/* Product Detail Styles */

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(25, 118, 210, 0.1);
}

.back-link:hover {
  background: rgba(25, 118, 210, 0.2);
  transform: translateX(-2px);
}

/* Product Detail Container */
.product-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.product-detail-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafd;
  border-radius: 12px;
  padding: 1rem;
  min-height: 300px;
}

.product-detail-image img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-detail-image img:hover {
  transform: scale(1.02);
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  margin: 0;
}

.product-price {
  font-size: 1.75rem;
  color: var(--color-danger);
  font-weight: 600;
  margin: 0;
}

.product-description {
  font-size: 1.1rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0;
}

.product-meta {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin: 0;
}

.product-meta strong {
  color: var(--gray-800);
}

/* Buy Button */
.product-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--color-danger) 0%, #c62828 100%);
  color: white;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  border: none;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  max-width: fit-content;
}

.product-buy-btn:hover {
  background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

.product-buy-btn:active {
  transform: translateY(0);
}

.product-buy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Error Message */
#productError {
  color: var(--color-danger);
  font-weight: 600;
  margin-top: 2rem;
  text-align: center;
  padding: 1rem;
  background: rgba(211, 47, 47, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--color-danger);
}

/* Orders Container */
.orders-container {
  max-width: 900px;
  margin: 2rem auto;
}

/* Order Items - kompatibel mit shop-old.js */
.order-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--color-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}

.order-date {
  color: var(--gray-600);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.order-card-body {
  margin: 1rem 0;
}

.order-card-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.order-card-body ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.order-card-body ul li:last-child {
  border-bottom: none;
}

.order-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

/* Order Input Styling */
.order-qty-input {
  width: 4.5em !important;
  text-align: center !important;
  font-size: 1.1em !important;
  padding: 0.4em 0.5em !important;
  margin-right: 0.5em !important;
  background: #fff !important;
  border: 2px solid var(--color-primary) !important;
  border-radius: 8px !important;
  transition: border-color 0.2s ease !important;
}

.order-qty-input:focus {
  outline: none;
  border-color: var(--color-primary-dark) !important;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1) !important;
}

.order-remove-btn {
  margin-left: 0.5em !important;
  color: var(--color-danger) !important;
  background: none !important;
  border: none !important;
  font-weight: bold !important;
  cursor: pointer !important;
  font-size: 1.2em !important;
  padding: 0.2em 0.4em !important;
  border-radius: 4px !important;
  transition: all 0.2s ease !important;
}

.order-remove-btn:hover {
  background: rgba(211, 47, 47, 0.1) !important;
  transform: scale(1.1) !important;
}

/* No Orders Message */
.no-orders {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #f8fafd 0%, #e3f2fd 100%);
  border-radius: 16px;
  border: 2px dashed #bbdefb;
  margin: 2rem 0;
}

.no-orders h3 {
  color: #1976d2;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.no-orders p {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .product-detail-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .product-title {
    font-size: 1.75rem;
  }
  
  .product-price {
    font-size: 1.5rem;
  }
  
  .back-link {
    margin: 1rem;
  }
}

@media (max-width: 700px) {
  .free-download-btn {
    padding: 0.8rem !important;
    font-size: 0.98rem !important;
    border-radius: 7px !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
}
@media (min-width: 701px) {
  .free-download-btn {
    display: block;
    text-align: center;
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  }
}
/* Globale Styles für kostenlosen Download-Button – identisch zu Kaufen-Button */
.free-download-btn {
  
  padding: 1.2rem;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: block;
  transition: background 0.3s, transform 0.2s;
  font-size: 1.1rem;
  background: #28a745;
  color: white;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  margin-left: auto;
  margin-right: auto;
}

.free-download-btn:hover {
  background: #1e7e34;
  transform: translateY(-1px);
}
@media (min-width: 769px) {
  .cart-item-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: auto;
  }
  .cart-item-controls-row,
  .cart-item-controls-bottom {
    display: contents;
  }
  .cart-item-controls .cart-item-price {
    display: inline-block;
    min-width: 80px;
    text-align: right;
    font-size: 1rem;
    margin: 0;
  }
  .cart-item-controls .remove-item {
    width: 30px;
    margin-left: 0.2rem;
    margin-top: 0;
  }
}
/* Unterstreichung für Produktnamen-Links im Shop entfernen */
.product-link,
.product-link:visited,
.product-link:hover,
.product-link:active {
  text-decoration: none !important;
}
@media (max-width: 700px) {
  .tools-section-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .shop-buy-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #007acc;
    color: white;
    text-decoration: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
  }
  .tool-card {
    max-width: calc(100vw - 1.4rem) !important;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
    margin-bottom: 0.7rem !important;
  }
  .tool-card img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 7px !important;
    display: block;
    margin: 0.1rem auto 0.7rem auto;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    box-sizing: border-box;
  }
}

/* Produktname im Shop und auf Tools-Seite einheitlich stylen */
.product-name {
  color: #155724;
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  font-weight: bold;
}

@media (max-width: 700px) {
  .shop-products-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
    padding: 0 0.2rem;
  }
  .shop-product-card {
    padding: 1rem !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10) !important;
    margin-bottom: 0.7rem !important;
  }
  .shop-product-card .product-image {
    height: 110px !important;
    border-radius: 6px !important;
    margin-bottom: 0.7rem !important;
  }
  .shop-product-card .product-name {
    font-size: 1.05rem !important;
    margin-bottom: 0.5rem !important;
  }
  .shop-product-card .product-description {
    font-size: 0.92rem !important;
    margin-bottom: 0.7rem !important;
  }
  .shop-product-card .product-price {
    font-size: 1.1rem !important;
    margin: 0.7rem 0 !important;
  }
  .shop-product-card .add-to-cart-btn,
  .shop-product-card .free-download-btn {
    padding: 0.8rem !important;
    font-size: 0.98rem !important;
    border-radius: 7px !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
}
@media (min-width: 701px) {
  .shop-buy-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #007acc;
    color: white;
    text-decoration: none;
    padding: 1.2rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 122, 204, 0.3);
  }
}
/* Shop-Produktlisten-Container mittig und vollbreit */
#shop-products-list {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  display: block;
}
/* --- Neue Shop-Elemente für modernes Layout (2025) --- */
.shop-products-header {
  background: #f8f9fa;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  border-radius: 12px;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: block;
  box-sizing: border-box;
  border: none;
}
.shop-title {
  margin: 0 0 1rem 0;
  color: #007acc;
  font-size: 1.6rem;
  font-weight: 800;
}
.shop-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.shop-stat {
  text-align: center;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.shop-stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #ffc107;
  margin-bottom: 0.5rem;
}
.shop-stat-label {
  color: #666;
  font-weight: 500;
}
.shop-stat-desc {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.25rem;
}
.shop-tip {
  text-align: center;
  padding: 0.75rem;
  background: #e7f3ff;
  border-radius: 6px;
}
.shop-tip a {
  color: #007acc;
  font-weight: bold;
}
.premium-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffc107;
  color: #333;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  z-index: 1;
  box-shadow: 0 2px 8px #ffc10733;
}
.premium-features {
  background: rgba(255, 193, 7, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid #ffc107;
}
.premium-features-title {
  font-weight: bold;
  color: #856404;
  margin-bottom: 0.5rem;
}
.premium-features-list {
  font-size: 0.95rem;
  color: #856404;
}
.login-required {
  text-align: center;
  padding: 0.75rem;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  margin-top: 1rem;
}
.login-required-title {
  color: #856404;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.login-required a {
  color: #007acc;
  text-decoration: underline;
  font-weight: 500;
}
/* shop.css: Nur Shop-spezifische Styles (z. B. Produktliste, Warenkorb, Shop-Grid) */
/* shop.css: Nur Shop-spezifische Styles (z. B. Produktliste, Warenkorb, Shop-Grid) */
.shop-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.shop-product-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.shop-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.shop-product-card.free-product {
  border: 2px solid #28a745;
  background: linear-gradient(135deg, #f8fff8 0%, #e8f8e8 100%);
}

.shop-product-card.premium-product {
  border: 2px solid #ffc107;
  background: linear-gradient(135deg, #fffdf5 0%, #fff9e6 100%);
}

.shop-product-card .product-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.shop-product-card .product-name {
  color: #856404;
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1.3;
  text-decoration: none;
}

.shop-product-card .product-description {
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.shop-product-card .product-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #007acc;
  margin: 1rem 0;
}



.shop-product-card .free-download-btn {
  background: #28a745;
  color: white;
}

.shop-product-card .free-download-btn:hover {
  background: #1e7e34;
  transform: translateY(-1px);
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.cart-item-name {
  font-weight: 500;
  flex: 1;
  margin-right: 1rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-item-controls button {
  background: #007acc;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-controls button:hover {
  background: #005a99;
}

.cart-item-controls .remove-item {
  background: #dc3545;
  width: 30px;
  height: 30px;
}

.cart-item-controls .remove-item:hover {
  background: #c82333;
}

.cart-item-quantity {
  min-width: 30px;
  text-align: center;
  font-weight: bold;
}

.cart-item-price {
  min-width: 80px;
  text-align: right;
  font-weight: bold;
  color: #007acc;
}
#cart {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

#checkout-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  margin-top: 1rem;
  transition: background 0.3s;
}

#checkout-btn:hover {
  background: #1e7e34;
}

/* Responsive Design für Shop */
@media (max-width: 768px) {
  .shop-products-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .cart-item {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .cart-item-controls {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
  }
  .cart-item-controls-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.2rem;
  }
  .cart-item-controls-bottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
  }
  .cart-item-controls .cart-item-price {
    display: inline-block;
    text-align: center;
    width: auto;
    font-size: 1.1rem;
    margin: 0.2rem 0 0.2rem 0;
  }
  .cart-item-controls .remove-item {
    /* display: inline-block; */
    width: 36px;
    margin-top: 0;
    margin-left: 0.2rem;
  }
  
  .cart-item-name {
    margin-right: 0;
    text-align: center;
    margin-bottom: 0.5rem;
  }
}
.orders-table-saastable {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.7em;
  background: none;
  font-size: 1.08em;
  margin-top: 2em;
  box-shadow: none;
}
.orders-table-saastable th {
  background: #f8fafc;
  color: #1565c0;
  font-weight: 700;
  padding: 1em 1.2em;
  border: none;
  text-align: left;
  letter-spacing: 0.01em;
  font-size: 1.08em;
}
.orders-table-saastable tr.order-row-main {
  background: #fff;
  box-shadow: 0 2px 10px #003c7e0a;
  border-radius: 14px 14px 0 0;
  transition: box-shadow 0.18s, transform 0.13s;
}
.orders-table-saastable tr.order-row-main:hover {
  box-shadow: 0 8px 32px #007acc22, 0 2.5px 12px #0002;
  transform: translateY(-2px) scale(1.012);
}
.orders-table-saastable tr.order-row-main td {
  padding: 1.2em 1.2em 0.7em 1.2em;
  border: none !important;
  font-weight: 500;
  vertical-align: middle;
  background: #fff;
}
.orders-table-saastable tr.order-row-products {
  background: #f8fafc;
}
.orders-table-saastable tr.order-row-products td {
  padding: 0.7em 1.5em 1.2em 3.5em;
  border: none !important;
  background: #f8fafc;
}
.order-products-list {
  list-style: none;
  margin: 0 0 0.2em 0;
  padding: 0;
}
.order-products-list li {
  margin-bottom: 0.18em;
  font-size: 1em;
  display: flex;
  gap: 0.7em;
  align-items: center;
  background: none;
  border: none;
}
.order-row-products .order-discount {
  color: #217a21;
  font-weight: 500;
  margin-top: 0.3em;
  font-size: 0.97em;
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.orders-table-saastable .order-status {
  font-weight: 600;
  padding: 0.18em 1.1em;
  border-radius: 9px;
  background: #f7f7f7;
  color: #666;
  font-size: 1em;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  box-shadow: 0 1px 4px #003c7e11;
  letter-spacing: 0.01em;
}
.orders-table-saastable .order-status.bezahlt {
  background: #e8ffe8;
  color: #217a21;
}
.orders-table-saastable .order-status.storniert {
  background: #ffeaea;
  color: #b30000;
}
.orders-table-saastable .order-status.offen {
  background: #eaf3ff;
  color: #1565c0;
}
.orders-table-saastable .order-total {
  font-weight: 700;
  color: #1565c0;
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: 1.12em;
}
.orders-table-saastable .order-status .fa-check-circle {
  color: #217a21;
  font-size: 1.1em;
}
.orders-table-saastable .order-status .fa-clock {
  color: #1565c0;
  font-size: 1.1em;
}
.orders-table-saastable .order-status .fa-ban {
  color: #b30000;
  font-size: 1.1em;
}
