﻿.product-container {
    padding: 2rem;
    color: white;
    background-color: #000;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #fff;
    padding-bottom: 1rem;
}

    .product-header h1 {
        font-size: 2.5rem;
        font-weight: bold;
        margin: 0;
    }

.add-btn {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

    .add-btn:hover {
        background-color: #333;
    }

.product-table-container {
    border: 1px solid #fff;
}

/* --- MODIFIED SECTION --- */
.product-container .table {
    width: 100% !important;
    margin: 0 auto !important;
    border-collapse: collapse;
    color: white;
    background-color: #000 !important;
}

    .product-container .table thead th {
        background-color: #000 !important;
        font-weight: 600;
    }

    .product-container .table th, .product-container .table td {
        border: 1px solid #444;
        padding: 0.75rem 1rem;
        text-align: left;
        vertical-align: middle;
        background-color: #000 !important;
    }
/* --- END OF MODIFIED SECTION --- */


.action-buttons button {
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: white;
    border-radius: 4px;
    margin-right: 5px;
    font-size: 14px;
}

.edit-btn {
    background-color: #28a745; /* Green */
}

.delete-btn {
    background-color: #dc3545; /* Red */
}

.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: start;
    gap: 5px;
}

    .pagination button {
        background-color: transparent;
        border: 1px solid white;
        color: white;
        min-width: 35px;
        height: 35px;
        padding: 5px 10px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

        .pagination button:hover {
            background-color: #333;
        }

        .pagination button.active {
            background-color: white;
            color: black;
            font-weight: bold;
        }

/* =========================================
   MOBILE VIEW ADJUSTMENTS (Product Cards)
   ========================================= */
@media (max-width: 576px) {

    /* 1. Reduce Container Padding & Grid Gaps */
    .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .row.g-4 {
        --bs-gutter-x: 0.5rem !important; /* Tiny horizontal gap */
        --bs-gutter-y: 0.5rem !important; /* Tiny vertical gap */
        margin-left: -0.25rem !important;
        margin-right: -0.25rem !important;
    }

    .col-6 {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    /* 2. Fixed Card Dimensions & Layout */
    .product-card {
        height: 320px !important; /* Fixed height to support percentages */
        display: flex;
        flex-direction: column;
        border: 1px solid #333;
        overflow: hidden;
        border-radius: 4px; /* Optional rounded corners */
    }

    /* 3. Image Section (65%) */
    .product-image-container {
        height: 65% !important;
        width: 100%;
        overflow: hidden;
        background-color: #fff; /* White background for transparent images */
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .product-image-container a {
            display: block;
            width: 100%;
            height: 100%;
        }

        .product-image-container img.card-img-top {
            width: 100%;
            height: 100%;
            object-fit: contain !important; /* Ensure full image is visible */
            border-radius: 0 !important;
        }

    /* 4. Info Section (35%) */
    .card-body {
        height: 35% !important;
        padding: 0.5rem !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background-color: #000; /* Match theme */
        color: white;
    }

        /* Compact Text Styles */
        .card-body .card-title {
            font-size: 0.9rem !important;
            margin-bottom: 0.1rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis; /* ... if name is too long */
        }

        .card-body .card-price {
            font-size: 0.9rem !important;
            margin-bottom: 0.1rem;
            font-weight: bold;
        }

        .card-body .card-season {
            font-size: 0.75rem !important;
            margin-bottom: 0.2rem;
            color: #ccc;
        }

        /* Compact Buttons */
        .card-body .btn-product-action {
            font-size: 0.7rem !important;
            padding: 0.25rem 0.2rem !important;
        }

        .card-body .d-grid {
            display: flex !important;
            gap: 0.25rem !important;
        }
}
