/* Beer Menu Manager Styles */

.beer-menu-container {
    margin: 20px 0;
}

/* Beer Style Section */
.beer-style-section {
    margin-bottom: 40px;
}

.beer-style-name {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #d4a574;
}

.beer-style-beers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* List View */
.beer-menu-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.beer-item-list {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.beer-item-list:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d4a574;
}

.beer-item-list .beer-photo {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.beer-item-list .beer-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.beer-item-list .beer-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Grid View */
.beer-menu-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 20px;
}

.beer-item-grid {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.beer-item-grid:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d4a574;
    transform: translateY(-2px);
}

.beer-item-grid .beer-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.beer-item-grid .beer-photo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.beer-item-grid .beer-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Beer Details */
.beer-name {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.beer-brewery {
    margin: 0 0 8px 0;
    font-size: 0.95em;
    color: #666;
    font-style: italic;
}

.beer-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.beer-style,
.beer-abv {
    display: inline-block;
    background: #f5f5f5;
    color: #333;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    border-left: 3px solid #d4a574;
}

.beer-price {
    margin: 8px 0;
    font-size: 1.3em;
    font-weight: 700;
    color: #d4a574;
}

.beer-description {
    margin: 10px 0 0 0;
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    flex: 1;
}

/* Error State */
.beer-menu-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .beer-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .beer-item-list {
        flex-direction: column;
        padding: 15px;
    }

    .beer-item-list .beer-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .beer-menu-grid {
        grid-template-columns: 1fr;
    }

    .beer-item-grid {
        flex-direction: row;
        gap: 15px;
    }

    .beer-item-grid .beer-photo {
        width: 100px;
        height: 100px;
        margin-bottom: 0;
        flex-shrink: 0;
        position: relative;
    }

    .beer-item-grid .beer-details {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .beer-menu-container {
        margin: 10px 0;
    }

    .beer-item-list,
    .beer-item-grid {
        padding: 10px;
        gap: 10px;
    }

    .beer-name {
        font-size: 1.1em;
    }

    .beer-price {
        font-size: 1.2em;
    }

    .beer-specs {
        gap: 5px;
    }

    .beer-style,
    .beer-abv {
        font-size: 0.8em;
        padding: 3px 8px;
    }
}

/* Print Styles */
@media print {
    .beer-item-list,
    .beer-item-grid {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Lightbox Modal */
.beer-lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-in;
}

.beer-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.beer-lightbox-content {
    position: relative;
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.beer-lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

.beer-lightbox-info {
    margin-top: 20px;
    text-align: center;
}

.beer-lightbox-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.3em;
    color: #1a1a1a;
}

.beer-lightbox-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.95em;
}

.beer-lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.beer-lightbox-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.beer-photo {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.beer-photo::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.beer-photo:hover::after {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Accessibility */
.beer-item-list:focus-within,
.beer-item-grid:focus-within {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}

/* Loading State */
.beer-menu-loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.beer-menu-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d4a574;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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