/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    color: #2c3e50;
    font-size: 2rem;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 3rem;
}

.stat-content h3 {
    color: #3498db;
    font-size: 2.5rem;
    margin: 0;
}

.stat-content p {
    color: #7f8c8d;
    margin: 0;
    font-size: 1.1rem;
}

.actions-section {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Products List Styles */
.empty-state {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.empty-state p {
    color: #666;
    font-size: 1.1rem;
}

.products-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
    margin-bottom: 2rem;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table thead {
    background-color: #f8f9fa;
}

.products-table th {
    padding: 1rem;
    text-align: left;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.products-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.products-table tbody tr:hover {
    background-color: #f8f9fa;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.no-image {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 1.5rem;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.back-link {
    margin-top: 1rem;
}

/* Form Styles (Create/Edit Product) */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-container h1 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Dashboard */
    .actions-section {
        flex-direction: column;
    }

    .actions-section .btn {
        width: 100%;
    }

    /* Headers */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .header-buttons .btn {
        width: 100%;
    }

    .products-table-container {
        overflow-x: auto;
    }

    .products-table {
        font-size: 0.9rem;
    }

    .products-table th,
    .products-table td {
        padding: 0.5rem;
    }

    .actions-cell {
        flex-direction: column;
    }

    /* Forms */
    .form-container {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }
}

* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
}

.store-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.store-header h1 {
    background: linear-gradient(135deg, #FFD700 0%, #FF6B00 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    text-shadow: 0 2px 20px rgba(255, 215, 0, 0.3);
    letter-spacing: -1px;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.store-header p {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.95;
}

/* Search Form */
.search-container {
    margin-top: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    background: linear-gradient(135deg, #FF9900 0%, #FF6B00 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
    white-space: nowrap;
}

.search-button:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FF9900 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.search-button:active {
    transform: scale(0.98);
}

.search-results-info {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    text-align: center;
    color: #333;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-results-info strong {
    color: #FF6B00;
    font-weight: 700;
}

.clear-search {
    display: inline-block;
    margin-left: 1rem;
    color: #FF6B00;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: #FFD700;
    text-decoration: underline;
}

.empty-state {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.empty-state p {
    color: #666;
    font-size: 1.1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    position: relative;
}

.product-card:nth-child(even) {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFE8E1 100%);
}

.product-card:nth-child(3n) {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF4E0 100%);
}

.product-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #FFD700, #FF6B00, #FFD700);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(255, 107, 0, 0.3), 0 0 0 2px #FFD700;
}

.product-card:hover::before {
    opacity: 1;
}

.product-image,
figure.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    margin: 0;
}

.product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.05) 100%);
}

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

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

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title,
h2.product-title {
    color: #1a1a2e;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Urgency Indicators */
.product-urgency {
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.deal-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #D32F2F;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.timer-icon {
    font-size: 1rem;
}

.timer-label {
    color: #666;
    font-weight: 500;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: #D32F2F;
    letter-spacing: 0.5px;
}

.stock-indicator {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stock-bar {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stock-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.low-stock .stock-fill {
    background: #FF4444;
}

.medium-stock .stock-fill {
    background: #FF9900;
}

.stock-text {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.low-stock .stock-text {
    color: #E63946;
}

.medium-stock .stock-text {
    color: #F77F00;
}

.viewers-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #555;
    font-weight: 500;
}

.viewers-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

.viewers-text {
    font-size: 0.8rem;
    color: #666;
}

/* Price Comparison */
.product-price-section {
    margin-bottom: 0.75rem;
}

.price-comparison {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

.save-badge {
    display: inline-block;
    background: linear-gradient(135deg, #E63946 0%, #C62828 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.3);
}

.product-price {
    background: linear-gradient(135deg, #FF6B00 0%, #FFD700 50%, #FF6B00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    animation: shimmer 2s linear infinite;
    position: relative;
    display: inline-block;
}

.product-card:hover .product-price {
    -webkit-text-fill-color: white;
    color: white;
}

.product-price::after {
    content: '🔥';
    position: absolute;
    margin-left: 0.5rem;
    font-size: 1.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.product-card:hover .product-price::after {
    animation-play-state: paused;
    opacity: 1;
    transform: scale(1);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.trust-badges .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.35rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: default;
    transition: all 0.2s ease;
}

.trust-badges .badge:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.btn-amazon {
    background: linear-gradient(135deg, #FF9900 0%, #FF6B00 100%);
    color: white;
    text-align: center;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.5);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 2px solid transparent;
}

.btn-amazon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.btn-amazon::after {
    content: '⚡';
    position: absolute;
    right: 1.5rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-amazon:hover {
    background: linear-gradient(135deg, #FFD700 0%, #FF9900 100%);
    color: white;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-amazon:hover::before {
    left: 100%;
}

.btn-amazon:hover::after {
    transform: translateX(5px) rotate(15deg);
}

.btn-amazon:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.5);
}

/* Skeleton Loading Animation */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.skeleton-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF9E6 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.skeleton-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmerLoading 1.5s infinite;
}

.skeleton-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-title,
.skeleton-description,
.skeleton-price,
.skeleton-button {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmerLoading 1.5s infinite;
    border-radius: 8px;
}

.skeleton-title {
    height: 24px;
    width: 100%;
}

.skeleton-title-short {
    width: 70%;
}

.skeleton-description {
    height: 16px;
    width: 100%;
}

.skeleton-description-short {
    width: 60%;
}

.skeleton-price {
    height: 32px;
    width: 40%;
    margin-top: 0.5rem;
}

.skeleton-button {
    height: 50px;
    width: 100%;
    margin-top: 1rem;
    border-radius: 25px;
}

@keyframes shimmerLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    letter-spacing: 0.5px;
}

.pagination-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border-color: #FFD700;
    color: #764ba2;
}

.pagination-btn:active {
    transform: translateY(-1px);
}

.pagination-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    font-size: 1.2rem;
}

.page-current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}

.page-separator {
    color: #ccc;
    margin: 0 0.5rem;
}

.page-total {
    color: #888;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .store-header h1 {
        font-size: 1.8rem;
    }

    .store-header p {
        font-size: 1rem;
    }

    .search-container {
        padding: 0 1rem;
    }

    .search-input-wrapper {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .search-input {
        padding: 0.5rem 1rem;
        text-align: center;
    }

    .search-button {
        width: 100%;
        padding: 1rem;
    }

    .search-results-info {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    .clear-search {
        display: block;
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.25rem;
    }

    .pagination {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin: 2rem 0;
    }

    .pagination-btn {
        width: 100%;
        text-align: center;
    }

    .pagination-info {
        font-size: 1rem;
    }

    .page-current {
        font-size: 1.2rem;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .store-header {
        margin-bottom: 1.5rem;
    }

    .store-header h1 {
        font-size: 1.5rem;
    }

    .product-image {
        height: 180px;
    }
}