/**
 * Product Releases Calendar - Main Styles
 */

/* Calendar Container */
.product-releases-calendar {
    width: 100%;
    margin: 2rem 0;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

/* Tabs Navigation */
.calendar-tabs {
    margin-bottom: 2rem;
    border-bottom: 2px solid #dee2e6;
}

.calendar-tabs .nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: none;
    margin-bottom: -2px;
}

.calendar-tabs .nav-item {
    margin: 0;
}

.calendar-tabs .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-bottom: none;
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
}

.calendar-tabs .nav-link:hover {
    background: #e9ecef;
    color: #212529;
    transform: translateY(-2px);
}

.calendar-tabs .nav-link.active {
    background: #fff;
    color: var(--primary-color, #2c3e50);
    border-color: #dee2e6;
    border-bottom-color: #fff;
}

.calendar-tabs .month-name {
    font-size: 1.1rem;
    text-transform: capitalize;
}

.calendar-tabs .month-year {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.7;
}

.calendar-tabs .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
}

/* Calendar Content */
.calendar-content {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Month Calendar */
.month-calendar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Calendar Day */
.calendar-day {
    border-left: 4px solid var(--primary-color, #2c3e50);
    padding-left: 1.5rem;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.day-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color, #2c3e50);
    min-width: 3rem;
}

.day-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: capitalize;
}

/* Day Products */
.day-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .day-products {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.product-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color, #2c3e50);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: #f8f9fa;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.release-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(4px);
}

.release-badge .material-icons {
    font-size: 1rem;
}

/* Product Info */
.product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color, #2c3e50);
}

.stock-label {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
}

.stock-label.in-stock {
    background: #d4edda;
    color: #155724;
}

.stock-label.out-of-stock {
    background: #fff3cd;
    color: #856404;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.product-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.product-actions .btn .material-icons {
    font-size: 1.25rem;
}

.product-actions .btn-primary {
    background: var(--primary-color, #2c3e50);
    color: #fff;
}

.product-actions .btn-primary:hover {
    background: var(--primary-color-dark, #1a252f);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.product-actions .btn-outline-primary {
    background: transparent;
    color: var(--primary-color, #2c3e50);
    border: 2px solid var(--primary-color, #2c3e50);
}

.product-actions .btn-outline-primary:hover {
    background: var(--primary-color, #2c3e50);
    color: #fff;
}

.product-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
    opacity: 0.6;
    cursor: not-allowed;
}

.product-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading State */
.product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color, #2c3e50);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 992px) {
    .calendar-tabs .nav-link {
        padding: 0.75rem 1rem;
    }

    .calendar-tabs .month-name {
        font-size: 1rem;
    }

    .calendar-content {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .calendar-tabs .nav-tabs {
        flex-direction: column;
    }

    .calendar-tabs .nav-link {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .day-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeIn 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
