/**
 * Frontend CSS für Schmuck Plugin
 * Datei: assets/css/jewelry-frontend.css
 */

/* === Produktgrid (Übersichtsseite) === */
.jewelry-products-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.jewelry-products-grid.columns-1 { grid-template-columns: 1fr; }
.jewelry-products-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.jewelry-products-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.jewelry-products-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .jewelry-products-grid.columns-3,
    .jewelry-products-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .jewelry-products-grid {
        grid-template-columns: 1fr !important;
    }
}

/* === Produktkarte === */
.jewelry-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

/* === Produktbild Container === */
.jewelry-product-image {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1 / 1;
}

.jewelry-product-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.jewelry-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.jewelry-product-card:hover .jewelry-product-image img {
    transform: scale(1.05);
}

/* Platzhalter für fehlende Bilder */
.jewelry-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f0f0f0;
    color: #999;
    font-size: 14px;
}

/* Stock Badge */
.jewelry-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.jewelry-stock-badge.out-of-stock {
    background: #DBA348;
}

.jewelry-stock-badge.low-stock {
    background: #ffc107;
    color: #333;
}

/* === Produktdetails === */
.jewelry-product-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.jewelry-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.jewelry-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.jewelry-product-title a:hover {
    color: #0066cc;
}

.jewelry-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 10px 0;
}

.jewelry-product-sku {
    color: #666;
    font-size: 13px;
    margin: 5px 0;
}

.jewelry-product-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
    flex-grow: 1;
}

.jewelry-product-availability {
    font-size: 14px;
    margin: 10px 0;
    font-weight: 500;
}

.jewelry-product-availability.in-stock {
    color: #28a745;
}

.jewelry-product-availability.low-stock {
    color: #ffc107;
}

.jewelry-product-availability.out-of-stock {
    color: #DBA348;
}

/* === Buttons === */
.jewelry-product-actions {
    margin-top: auto;
    padding-top: 15px;
}

.jewelry-button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.jewelry-button-primary {
    background: #0066cc;
    color: white;
}

.jewelry-button-primary:hover {
    background: #0052a3;
    color: white;
}

.jewelry-button-secondary {
    background: #6c757d;
    color: white;
}

.jewelry-button-secondary:hover {
    background: #5a6268;
    color: white;
}

/* === Einzelprodukt-Seite === */
.jewelry-single-product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .jewelry-single-product-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* === Produktgalerie === */
.jewelry-gallery {
    position: sticky;
    top: 20px;
}

.jewelry-main-image {
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.jewelry-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.jewelry-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.jewelry-thumbnail {
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    padding: 0;
    transition: all 0.2s;
}

.jewelry-thumbnail:hover {
    border-color: #ddd;
}

.jewelry-thumbnail.active {
    border-color: #0066cc;
}

.jewelry-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* === Produktinfo === */
.jewelry-product-info {
    padding: 20px 0;
}

.jewelry-product-info .jewelry-product-price {
    font-size: 32px;
    margin: 20px 0;
}

.jewelry-product-meta {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: baseline;
}

.jewelry-product-meta:last-of-type {
    border-bottom: none;
}

.jewelry-meta-label {
    font-weight: 600;
    color: #333;
    min-width: 140px;
    margin-right: 15px;
}

.jewelry-meta-value {
    color: #666;
}

.jewelry-meta-value a {
    color: #0066cc;
    text-decoration: none;
}

.jewelry-meta-value a:hover {
    text-decoration: underline;
}

/* === Produktbeschreibung === */
.jewelry-product-description {
    margin: 30px 0;
    line-height: 1.8;
    color: #444;
}

.jewelry-product-description h2,
.jewelry-product-description h3 {
    color: #333;
    margin: 20px 0 10px 0;
}

.jewelry-product-description ul,
.jewelry-product-description ol {
    margin: 15px 0;
    padding-left: 30px;
}

/* === Call-to-Action Buttons === */
.jewelry-single-product-details .jewelry-product-actions {
    display: flex;
    gap: 10px;
    margin: 30px 0;
}

.jewelry-single-product-details .jewelry-button {
    flex: 1;
}

.jewelry-contact-button {
    background: #28a745;
}

.jewelry-contact-button:hover {
    background: #218838;
}

.jewelry-share-button {
    background: #6c757d;
}

.jewelry-share-button:hover {
    background: #5a6268;
}

/* === Breadcrumbs === */
.jewelry-breadcrumbs {
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.jewelry-breadcrumbs a {
    color: #0066cc;
    text-decoration: none;
}

.jewelry-breadcrumbs a:hover {
    text-decoration: underline;
}

.jewelry-breadcrumbs .current {
    color: #333;
    font-weight: 500;
}

/* === Filter Widget === */
.jewelry-filter-form {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
}

.jewelry-filter-group {
    margin-bottom: 15px;
}

.jewelry-filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.jewelry-filter-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

/* === Animationen === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.jewelry-product-card {
    animation: fadeIn 0.5s ease-out;
}

/* === Loading State === */
.jewelry-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.jewelry-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .jewelry-product-title {
        font-size: 16px;
    }
    
    .jewelry-product-price {
        font-size: 20px;
    }
}

@media print {
    .jewelry-product-actions,
    .jewelry-share-button,
    .jewelry-contact-button {
        display: none !important;
    }
}