html,
body {
    height: 100%;
    margin: 0;
}

body {
    background-image: url('images/background.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    margin: 0px 20px 0px 20px;
}

span {
    display: inline-block;
    margin-right: -3px;

}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style-type: none;
    margin: 0;
    padding: 10px 20px;
    display: flex;
    gap: 15px;
}


ul li a {
    display: block;
    color: black;
    text-align: center;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 24px;
}

ul li a:hover {
    background-color: rgb(0, 0, 0, 0.1);
    border-radius: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 60px 0px 60px;
    /*top, right, bottom, left*/
    box-sizing: border-box;
}

.navigationBar {
    background-color: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    border-radius: 30px;
}

.signin {
    background-color: #F57203;
    border: 0px;
    border-radius: 20px;
    padding: 10px 30px;
    position: absolute;
    top: 15px;
    right: 60px;
    cursor: pointer;
    color: white;
    font-size: 24px;
}

.top {
    position: relative;
}


.listing {
    background-color: #F57203;
    color: white;
    border: 0px;
    border-radius: 20px;
    padding: 10px 30px;
    cursor: pointer;
    top: 15px;
    right: 220px;
    position: absolute;
    font-size: 24px;
}

.listing:hover {
    background-color: #d46202;
}

.signin:hover {
    background-color: #d46202;
}

.site-footer {
    background-color: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    color: black;
    padding: 10px 20px 0px 20px;
    height: auto;
    font-size: 24px;
}


.footer-content {
    display: flex;
    justify-content: space-between;
}

.footer-section h4 {
    color: #F06808;
    margin-bottom: 5px;
    font-size: 16px;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.footer-section p {
    font-size: 16px;
}

.footer-section a {
    font-size: 16px;
    padding: 0px 15px 0px 0px;
}


.catalog-container {
    width: 100%;
    max-width: 1100px;
    margin: 0px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: sans-serif;
}

.category-block {
    margin-bottom: 50px;
    text-align: center;
}

.category-title {
    font-size: 36px;
    font-weight: bold;
    color: #111;
    margin-bottom: 20px;
}

.products-grid {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 35px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px 35px;
    margin-top: 25px;
}

.index-product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 180px;
    text-align: center;
    margin: auto;
}

.page-title-background {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 5px;
    text-align: center;
    font-size: 20px;
    margin-top: 25px;
    font-weight: bold;
}

/*White Box for the Images on the main page*/
.index-product-card .img-box {
    background-color: white;
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    margin-bottom: 12px;
    padding: 10px;
    box-sizing: border-box;
}

.index-product-card .img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/*Product names under icons on main page*/
.product-name {
    font-size: 15px;
    font-weight: bold;
    color: #111;
    margin: 0;
    line-height: 1.3;
}

/*---------For About Us---------*/

.about-us-logo {
    border-radius: 10px;
    width: 600px;
    height: 350px;
}

.about-us {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.intro,
.intrest {
    background-color: white;
    padding: 0px 10px;
    border-radius: 10px;
    width: fit-content;
    height: fit-content;
    margin-top: 50px;
}

.intrest {
    margin-bottom: 15px;
}

.top-about {
    display: flex;
    flex-direction: row;
    gap: 65px;
    flex-wrap: wrap;
}

.about-us p {
    font-size: 20px;
    text-wrap: wrap;
}

/*Profile page*/

.profile-main {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 5px;
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
}

.profile-content img {
    border-radius: 50%;
    height: auto;
    width: 300px;
}



/*Create Listings page*/
.listing-container {
    max-width: 650px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

.listing-container h2 {
    color: #013F76;
    margin-bottom: 25px;
    border-bottom: 2px solid #F06808;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.row {
    display: flex;
    gap: 20px;
}

.form-group.row .inputItem {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #013F76;
    box-shadow: 0 0 5px rgba(1, 63, 118, 0.2);
}

.image-preview-box {
    margin-top: 10px;
    width: 150px;
    height: 150px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border-radius: 4px;
    overflow: hidden;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.submit-btn {
    background-color: #F06808;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.submit-btn:hover {
    background-color: #d05704;
}

/*------------------Listings-----------------------*/

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 20px;
    max-width: 1400px;
    margin: 15px auto;
}

.product-card {
    background: white;
    padding: 35px 25px;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 380px;
    box-sizing: border-box;
}

.product-card img {
    max-width: 100%;
    height: 160px;
    object-fit: contain;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 18px;
    margin: 10px 0;
    color: #333;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.product-card .price-tag {
    color: #F57203;
    font-weight: bold;
    font-size: 20px;
    margin: 5px 0 15px 0;
}

.product-card .view-button {
    background: #013F76;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

.product-card .view-button:hover {
    background: #002d54;
}

/*-------Pagination for listings ------------*/
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px auto;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #013F76;
    border-radius: 5px;
    color: #013F76;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: #013F76;
    color: white;
}

.pagination-btn.active {
    background-color: #F06808;
    border-color: #F06808;
    color: white;
    cursor: default;
}

.pagination-disabled {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    color: #ccc;
    font-weight: bold;
    font-size: 14px;
    cursor: not-allowed;
}

/*-----------------Cart Styles------------------*/

.cart-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cart-title {
    color: #013F76;
    margin-bottom: 25px;
    font-size: 28px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-bottom: 30px;
}

.cart-table th {
    background-color: #f8f9fa;
    color: #013F76;
    padding: 15px;
    font-weight: bold;
    border-bottom: 2px solid #eee;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.product-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    transition: color 0.2s;
}

.product-link:hover {
    color: #F06808;
}

.cart-img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
}

.remove-btn {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #dc3545;
    color: white;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.summary-total {
    font-size: 22px;
    font-weight: bold;
    color: #F06808;
}

.checkout-btn {
    background: #F06808;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.checkout-btn:hover {
    background: #d45b05;
}

.empty-message {
    text-align: center;
    padding: 50px 20px;
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/*---------Profile----------*/
.profile-container {
    display: flex;
    margin: 10px auto;
    padding: 20px;
}

.profile-content {
    width: 500px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: fit-content;
    margin: auto;
}

.profile-content img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #013F76;
    margin-bottom: 15px;
}

.purchase-history,
.current_listings_container {
    max-width: auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
}

.current_listings_container {
    margin-top: 30px;
}

.history-title,
.current_listings {
    color: #013F76;
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.history-table,
.listings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th,
.history-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.history-table th {
    background-color: #fafafa;
    color: #333;
}

.empty-history,
.empty-listings {
    text-align: center;
    color: #777;
    padding: 40px 0;
    font-style: italic;
}

/*---------Terms and Policy page--------*/
.PolicyMain,
.TermsMain {
    padding: 15px 30px 0px 30px;
}

.backBtn {
    background-color: #F57203;
    border: 0px;
    border-radius: 20px;
    padding: 10px 30px;
    position: absolute;
    top: 15px;
    right: 60px;
    cursor: pointer;
    color: white;
    font-size: 24px;
}

.backBtn:hover {
    background-color: #d46202;
}


/*--------Product listings page--------*/

.backBtn-product {
    background-color: #F57203;
    border: 0px;
    border-radius: 20px;
    padding: 8px 20px;
    position: absolute;
    top: 15px;
    left: 60px;
    cursor: pointer;
    color: white;
    font-size: 24px;
}

.backBtn:hover {
    background-color: #d46202;
}

.product-container {
    display: flex;
    gap: 40px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-image-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 20px;
}

.product-image-side img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.product-details-side {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-category {
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 5px;
}

.item-title {
    font-size: 28px;
    color: #013F76;
    margin: 0 0 15px 0;
}

.item-price {
    font-size: 24px;
    font-weight: bold;
    color: #F06808;
    margin-bottom: 20px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0 25px 0;
}

.info-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.info-table td:first-child {
    font-weight: bold;
    color: #555;
    width: 35%;
}

.description-box {
    line-height: 1.6;
    color: #444;
    white-space: pre-line;
    margin-bottom: 30px;
}

.add-to-cart-btn,
.edit-listing-btn {
    background: #F06808;
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    background: #d46202;
}

/*--------Search Page---------*/

.search-page-container {
    max-width: 1100px;
    margin: 150px auto;
    padding: 20px;
    gap: 25px;
}

.search-bar-wrapper {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-form {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.search-input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.search-button {
    background-color: #013F76;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px auto;
}

.search-button:hover {
    background-color: #012b52;
}

.profiles-section {
    margin: 20px auto;
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.listings-section {
    margin: 20px auto;
    flex: 1;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: #F06808;
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    border-radius: 6px;
}

.profile-row:hover {
    background: #fafafa;
}

.profile-row img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #013F76;
}

.profile-row h4 {
    margin: 0 0 3px 0;
    color: #013F76;
}

.profile-row p {
    margin: 0;
    color: #777;
    font-size: 13px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.results-table th,
.results-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.results-table th {
    background-color: #fafafa;
    color: #333;
}

.no-data {
    color: #777;
    font-style: italic;
    padding: 15px 0;
}

/*-------View Profile-------*/

.profile-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.current_listings_container {
    width: 100%;
    box-sizing: border-box;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.current_listings {
    color: #013F76;
    margin-top: 0;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.listings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.listings-table th,
.listings-table td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.listings-table th {
    background-color: #fafafa;
    color: #333;
    font-weight: 600;
}

.empty-listings {
    text-align: center;
    color: #777;
    padding: 40px 0;
    font-style: italic;
}


/*Mobile*/
@media (max-width: 768px) {

    html, body {
        margin: auto;
        width: auto;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 30px 20px;
    }

    .header-buttons {
        flex-direction: row;
        justify-content: center;
        width: 100%;
        gap: 10px;
    }

    .listing,
    .signin {
        font-size: 16px;
        padding: 10px 20px;
        border-radius: 25px;
        width: auto;
    }

    .navigationBar ul {
        gap: 8px;
        padding: 8px 12px;
    }

    .navigationBar ul li a {
        padding: 6px 12px;
        font-size: 16px;
    }

    .category-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .index-product-card{
        margin-top: 20px;
    }

    .products-grid {
        padding: 0px 0px;
        gap: 16px 16px;
        border-radius: 16px;
    }

    .product-card {
        width: 250px;
        height: 225px;
        margin: auto;

    }

    .product-card .img-box {
        height: 100px;
        width: 100px;
        padding: 10px;
    }

    .product-name {
        font-size: 14px;
    }

    .site-footer {
        background-color: rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(7px);
        -webkit-backdrop-filter: blur(7px);
        color: black;
        padding: 10px 20px 0px 20px;
        height: auto;
        font-size: 24px;
    }


    .footer-content {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
        margin-bottom: 10px;
        padding-top: 10px;
        text-align: center;
    }

    .footer-section h4 {
        color: #F06808;
        margin-bottom: 5px;
        font-size: 16px;
    }

    .footer-section ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-section p {
        font-size: 16px;
    }

    .footer-section a {
        font-size: 16px;
        padding: 0px 15px 0px 0px;
    }

    .titleSpan {
        padding-top: 35px;
    }

    .about-us-logo {
        border-radius: 10px;
        width: 370px;
        height: auto;
    }

    .cart-wrapper {
        max-width: 600px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cart-table {
        width: 100%;
        border-collapse: collapse;
        white-space: nowrap;
    }

    .cart-table th {
        background-color: #f8f9fa;
        color: #013F76;
        padding: 5px;
        font-weight: bold;
    }

    .cart-table td {
        padding: 5px;
        vertical-align: middle;
        font-size: 14px;
    }

    .profile-container {
        margin: auto;
        width: 300px;
        flex-wrap: wrap;
    }

    .purchase-history,
    .current_listings_container {
        width: 350px;
        background: white;
        padding: 10px;
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .current_listings_container {
        margin-bottom: 40px;
    }

    .history-table,
    .listings-table {
        width: 100%;
        border-collapse: collapse;
        white-space: nowrap;
    }

    .backBtn {
        padding: 10px 20px;
        font-size: 16px;
        right: 40px;
    }

    .results-layout {
        flex-direction: column;
        padding: 0px;
    }

    .backBtn-product {
        top: 70px;
        left: 30px;
        padding: 8px 15px;
        font-size: 16px;
    }

    .search-form {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 300px;
        margin: 0px auto;
    }

    .search-page-container{
        margin: 20px auto;
    }

}