/* ============================================
   NOVOCHEM RESOURCES PVT LTD - Price List
   Modern, Clean Design
============================================ */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   HEADER SECTION
============================================ */
.header {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.company-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.company-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-print,
.btn-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-print {
    background: #3498db;
    color: white;
}

.btn-print:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-admin {
    background: #95a5a6;
    color: white;
    padding: 10px 12px;
}

.btn-admin:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* ============================================
   PRICE LIST HEADER
============================================ */
.price-list-header {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.price-list-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.date-time {
    font-size: 0.95rem;
    color: #7f8c8d;
    font-weight: 500;
}

.date-time span {
    color: #2c3e50;
    font-weight: 600;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

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

.search-box input::placeholder {
    color: #95a5a6;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    pointer-events: none;
}

/* ============================================
   PRODUCTS TABLE
============================================ */
.main-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e6ed;
    font-weight: 600;
    font-size: 1rem;
    color: #2c3e50;
}

.products-list {
    padding: 0;
}

.product-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    align-items: center;
}

.product-row:hover {
    background: #f8f9fa;
}

.product-row:last-child {
    border-bottom: none;
}

/* Item Column */
.product-item {
    display: flex;
    gap: 15px;
    align-items: center;
}

.product-image-wrapper {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    flex: 1;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    line-height: 1.4;
}

.product-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0.5rem 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-height: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Packing Column */
.product-packing {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* Product Links */
.product-image-link {
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
}

.product-image-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-name-link:hover .product-name {
    color: #3498db;
    text-decoration: underline;
}

.product-image {
    transition: transform 0.3s ease;
}

.product-image-link:hover .product-image {
    transform: scale(1.03);
}

/* Price Column */
.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

/* ============================================
   LOADING & EMPTY STATES
============================================ */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: #7f8c8d;
    font-size: 1rem;
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.error {
    background: #fee;
    color: #c33;
    padding: 20px;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
}

/* ============================================
   FOOTER
============================================ */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* ============================================
   PRINT STYLES
============================================ */
@media print {
    body {
        background: white;
    }

    .header-actions,
    .search-box,
    .btn-print,
    .btn-admin {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .header,
    .price-list-header,
    .main-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .product-row {
        page-break-inside: avoid;
    }
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 15px 20px;
    }

    .company-name {
        font-size: 1.3rem;
    }

    .company-logo {
        height: 45px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .price-list-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .price-list-title h2 {
        font-size: 1.8rem;
    }

    .search-box {
        width: 100%;
    }

    .table-header {
        display: none;
    }

    .product-row {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .product-item {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .product-image-wrapper {
        width: 100%;
        height: 150px;
    }

    .product-packing,
    .product-price {
        width: 100%;
    }

    .product-packing::before {
        content: 'Packing: ';
        font-weight: 600;
        color: #7f8c8d;
    }

    .product-price::before {
        content: 'Price: ';
        font-weight: 600;
        color: #7f8c8d;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .company-name {
        font-size: 1.1rem;
    }

    .price-list-title h2 {
        font-size: 1.5rem;
    }

    .btn-print span {
        display: none;
    }

    .btn-print {
        padding: 10px 12px;
    }
}
