/* Základní styly inspirované Nespresso webem */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --nespresso-black: #17171a;
    --nespresso-green: #3d8705;
    --nespresso-dark-green: #2f6604;
    --nespresso-gold: #c9a961;
    --nespresso-light-gray: #f5f5f5;
    /* Restored */
    --nespresso-gray: #4a4a4a;
    /* Restored */
    --white: #ffffff;
    --border-color: #e7e7e7;
    --text-primary: #17171a;
    --text-secondary: #666666;
    --card-bg: #ffffff;
}

body {
    font-family: 'NespressoLucas', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.header {
    background-color: var(--nespresso-black);
    color: var(--white);
    padding: 1.5rem 0;
    text-align: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.subtitle {
    font-size: 0.875rem;
    color: #cccccc;
    font-weight: 400;
}

/* Filters - now inside controls section */
.filters {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--white);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
}

.filter-select:hover {
    border-color: var(--nespresso-gray);
}

.filter-select:focus {
    outline: none;
    border-color: var(--nespresso-green);
    box-shadow: 0 0 0 2px rgba(61, 135, 5, 0.1);
}

/* Main */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Controls */
.controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    /* Standard buttons */
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn-primary:hover {
    background-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
}

/* Add to bag button (Green Circle) */
/* Action buttons container */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Wishlist button */
.btn-wishlist {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #d1d5db; /* Světle šedá */
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
}

.btn-wishlist:hover {
    background-color: #9ca3af;
    transform: scale(1.05);
}

.btn-wishlist.in-wishlist {
    background-color: #dc2626; /* Červená */
    color: var(--white);
}

.btn-wishlist.in-wishlist:hover {
    background-color: #b91c1c;
}

/* Purchased button */
.btn-purchased {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #d1d5db; /* Světle šedá */
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
}

.btn-purchased:hover {
    background-color: #9ca3af;
    transform: scale(1.05);
}

.btn-purchased.purchased {
    background-color: var(--nespresso-green); /* Zelená */
    color: var(--white);
}

.btn-purchased.purchased:hover {
    background-color: var(--nespresso-dark-green);
}

.loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    background-color: #fff1f0;
    color: #d32f2f;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #ffccc7;
    font-size: 0.9rem;
}

/* Capsules Grid */
.capsules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    /* Adjusted width */
    gap: 24px;
    margin-top: 1rem;
}

.capsule-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: none;
    /* Removed hover lift */
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.capsule-card:hover {
    border-color: #d9d9d9;
}

.capsule-image-container {
    width: 100%;
    aspect-ratio: 1;
    /* Square or close to it */
    background-color: transparent;
    /* No gray bg */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.collection-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--nespresso-black);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Barevné odlišení kolekcí */
.collection-badge-ispirazione {
    background-color: #17171a; /* Černá - klasická Nespresso */
    color: #ffffff;
}

.collection-badge-barista-creations {
    background-color: #6b46c1; /* Fialová */
    color: #ffffff;
}

.collection-badge-master-origin {
    background-color: #c9a961; /* Zlatá */
    color: #17171a;
}

.collection-badge-reviving-origins {
    background-color: #3d8705; /* Zelená */
    color: #ffffff;
}

.collection-badge-world-explorations {
    background-color: #0ea5e9; /* Modrá */
    color: #ffffff;
}

.collection-badge-festive-collection {
    background-color: #dc2626; /* Červená - vánoční */
    color: #ffffff;
}

.btn-hide {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0;
}

.btn-hide:hover {
    background-color: rgba(220, 38, 38, 0.9);
    transform: scale(1.1);
}

.btn-hide span {
    display: block;
    margin-top: -2px;
}

.capsule-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.capsule-card:hover .capsule-image {
    transform: scale(1.05);
}

.capsule-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.capsule-name {
    font-size: 1rem;
    /* 16px */
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.capsule-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    min-height: 1.4em;
    /* preserve space */
}

.capsule-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    gap: 0.5rem;
}

.capsule-intensity {
    display: inline-block;
    background-color: var(--nespresso-black);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.capsule-price {
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0;
}

/* Hide or restyle extra details initially to match minimal card */
.capsule-details-extra {
    display: none;
    /* Hide parameters for now to match clean card */
}

.capsule-cup-size {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Rating Stars */
.rating-container {
    margin-bottom: 1.5rem;
}

.rating-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

.stars-container {
    display: flex;
    gap: 2px;
}

.star {
    width: 20px;
    height: 20px;
    fill: #ddd;
}

.star.filled {
    fill: var(--nespresso-gold);
}

.star.half {
    fill: url(#starGradient);
}

.rating-value {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* Parameters */
.parameters {
    margin-bottom: 1.5rem;
}

.parameter {
    margin-bottom: 1rem;
}

.parameter-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 0.25rem;
}

.parameter-name {
    font-weight: 500;
}

.parameter-value {
    color: var(--text-dark);
}

.parameter-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.parameter-fill {
    height: 100%;
    background-color: var(--nespresso-black);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.parameter-fill.low {
    background-color: #d4af37;
}

.parameter-fill.medium {
    background-color: #c9a961;
}

.parameter-fill.high {
    background-color: var(--nespresso-black);
}

/* Description */
.capsule-description {
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background-color: var(--nespresso-light-gray);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 768px) {
    .capsules-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.5rem;
    }
}

/* SVG Gradient pro poloviční hvězdičky */
.defs {
    position: absolute;
    width: 0;
    height: 0;
}

/* Compact Ratings & Parameters for New Design */
.rating-container-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.rating-container-compact .star {
    width: 14px;
    height: 14px;
}

.rating-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.parameters-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: auto;
    /* Push footer down */
    padding-bottom: 16px;
}

.parameters-compact .parameter {
    margin-bottom: 0;
}

.parameters-compact .parameter-label {
    margin-bottom: 2px;
    font-size: 0.7rem;
}

.parameters-compact .parameter-bar {
    height: 4px;
    /* Thinner bars */
    background-color: #f0f0f0;
}

.parameters-compact .parameter-fill {
    background-color: #c9a961;
    /* Gold for parameters */
}