body {
    overflow-x: hidden;
}

.sub-head {
    margin-top: 30px;
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: space-between;
}

.types {
    margin-top: 20px;
    justify-content: space-between;
}

.sub-span {
    margin-top: 10px;
    margin-left: 50px;
    font-size: 40px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif !important;
}

.types-group {
    margin-right: 50px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif !important;
    height: 40px;
    width: 150px;
}

.types-btn {
    border: 1px black solid;
    border-radius: 0px;
    width: 130px;
}

.types-ele:hover {
    background-color: rgb(87, 87, 87);
    color: white;
}

.card-container {
    padding: 10px;
}

.sub-category {
    margin-top: 20px;
}

    .sub-category a {
        text-decoration: none;
        color: inherit;
        display: contents;
    }

.sub-item {
    height: 500px;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

.card-img {
    width: 100%;
    height: 80%;
    position: relative;
    overflow: hidden;
}

    .card-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: opacity 0.5s ease;
    }

.img-1 {
    opacity: 1;
    z-index: 1;
}

.img-2 {
    opacity: 0;
    z-index: 2;
    position: absolute;
    top: 0;
    left: 0;
}

.sub-item:hover .img-1 {
    opacity: 0;
}

.sub-item:hover .img-2 {
    opacity: 1;
}

.new {
    width: 60px;
    height: 36px;
    background-color: rgb(226, 59, 59);
    border: none;
    border-radius: 4px;
    z-index: 10;
    position: absolute;
    top: 11.5px;
    left: 45px; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .new p {
        margin: 0;
        font-style: normal;
        font-size: 14px;
        font-weight: 600;
        color: white;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .new:hover {
        background-color: rgb(200, 50, 50);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    }

.delete {
    width: 60px;
    height: 36px;
    background-color: rgb(226, 59, 59);
    border: none;
    border-radius: 4px;
    z-index: 10;
    position: absolute;
    top: 15px;
    left: 225px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .delete:hover {
        background-color: rgb(200, 50, 50);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
        color: white;
    }

.edit {
    width: 60px;
    height: 36px;
    background-color: rgb(59, 176, 176);
    border: none;
    border-radius: 4px;
    z-index: 10;
    position: absolute;
    top: 60px;
    left: 225px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    font-style: normal;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .edit:hover {
        background-color: rgb(50, 150, 150);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
        color: white;
    }

.card-description {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 15px;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

    .card-description .item-name {
        display: block;
        font-size: 1.1rem;
        font-weight: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        margin: 0 0 4px 0;
        line-height: 1.2;
        width: 100%;
    }

    .card-description .price-row {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin: 0;
    }

.price-row {
    display: flex;
    font-size: 1rem;
    align-items: center;
    gap: 8px;
}

    .price-row .old-price {
        color: #000;
        opacity: 1;
        font-weight: normal;
    }

    .price-row del.old-price {
        color: #888;
        opacity: 1;
        text-decoration: line-through;
        text-decoration-color: red;
        font-weight: normal;
    }

    .price-row .new-price {
        color: rgb(226, 59, 59);
        font-weight: 600;
        opacity: 1;
    }

.pagination {
    margin: auto;
    width: 75px;
}

    .pagination .page-link {
        background-color: #3f3f3f;
        color: white;
        border-color: #ffffff;
    }

        .pagination .page-link:hover {
            background-color: #7a7a7a;
            border-color: #ffffff;
            color: white;
        }

    .pagination .page-item.active .page-link {
        background-color: #ffffff;
        border-color: #000000;
        color: rgb(0, 0, 0);
    }

    .pagination .page-link:focus {
        background-color: #ffffff;
        color: black;
        border-color: #000000;
        box-shadow: 0 0 0 0.20rem rgba(39, 39, 39, 0.5);
        outline: none;
    }

@media (max-width: 992px) {
    .types-group {
        margin-right: 20px;
    }

    .sub-span {
        margin-right: 20px;
    }
}

@media (max-width: 768px) {
    .new {
        width: 50px;
        height: 30px;
        top: 16px;
        left: 60px; 
    }

        .new p {
            font-size: 12px;
        }

    .delete {
        width: 50px;
        height: 30px;
        top: 16px;
        left: 300px; 
        font-size: 12px;
    }

    .edit {
        width: 50px;
        height: 30px;
        top: 58px;
        left: 300px; 
        font-size: 12px;
    }

    .types-group {
        margin-right: 20px;
    }

    .sub-item {
        height: 550px;
    }

    .card-description {
        padding: 20px 10px;
    }

        .card-description .item-name {
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .card-description .price-row {
            font-size: 14px;
        }
}

@media (max-width: 520px) {
    .sub-item {
        height: 600px;
        width: 100%;
    }

    .types-group {
        margin-right: 5px;
    }

    .sub-category {
        margin-top: 70px;
    }

    .card-container {
        padding: 5px;
    }

    .card-description {
        padding: 20px 5px;
    }

        .card-description .item-name {
            font-size: 12px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .card-description .price-row {
            font-size: 12px;
        }
}

.out-of-stock {
    width: 120px;
    height: 28px;
    background-color: #212529; /* Matches Bootstrap .btn-dark */
    border: none;
    border-radius: 4px;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0 8px;
}

    .out-of-stock p {
        margin: 0;
        font-style: normal;
        font-size: 12px;
        font-weight: 600;
        color: #ffffff;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .out-of-stock:hover {
        background-color: #343a40;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    }
