/* ======= Global Styles ======= */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

/* ======= Header and Navigation ======= */
header {
    background: #008000;
    padding: 10px 0;
}

.site-title {
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav li {
    margin: 5px 15px;
}

nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: white;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

nav a:hover {
    background: #006400;
}

/* Responsive Navigation */
@media screen and (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav li {
        margin: 5px 0;
    }
}

/* ======= Products Section ======= */
.products,
.product-container {
    width: 90%;
    margin: auto;
    padding: 20px;
    text-align: center;
}

.product img {
    width: 100%;
    height: auto;
}

/* Buttons */
button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px;
    cursor: pointer;
    display: block;
    width: 100%;
}

/* ======= Action Buttons ======= */
.bring_product,
.add-to-cart {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    display: inline-block;
    text-align: center;
}

.bring_product:hover,
.add-to-cart:hover {
    background: #218838;
}

/* ======= Quantity Controls ======= */
.quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
}

.quantity button {
    background: lightgrey;
    color: blue;
    border: 2px solid #ccc;
    padding: 5px 8px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.quantity button:hover {
    background: #0056b3;
    color: white;
}

.quantity input {
    width: 40px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin: 0 8px;
}

/* ======= Scrollable Container ======= */
.scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-left: 0;
}

/* Scroll Buttons */
.scroll-button {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.scroll-left {
    left: 10px;
}

.scroll-right {
    right: 10px;
}

.scroll-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ======= Popup Styles ======= */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.popup-content {
    position: relative;
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 90%;
}

.popup-content img {
    width: 300px;
    height: auto;
    border-radius: 8px;
}

.close-popup {
    position: absolute;
    top: 0;
    right: 0;
    background: white;
    color: red;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    border-radius: 0 8px 0 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.close-popup:hover {
    background: red;
    color: white;
}

/* ======= Product List and Cards ======= */
.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    padding: 5px;
    justify-content: center;
}

.product-card {
    flex: 0 1 180px;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover {
    transform: scale(1.05);
}

.product-card img {
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
}

.product-card h3 {
    font-size: 16px;
    margin: 10px 0;
    color: #333;
}

.product-card .price {
    font-size: 14px;
    font-weight: bold;
    color: #e91e63;
}

.product-card .quantity {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
}

.product-card .quantity input {
    width: 40px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.image {
    overflow: auto;
}

/* Responsive Product Card */
@media (max-width: 768px) {
    .product-card {
        flex: 1 1 calc(80% - 15px);
        max-width: calc(80% - 15px);
        width: auto;
        height: auto;
    }
}

@media (max-width: 480px) {
    .product-card {
        flex: 1 1 calc(80% - 15px);
        max-width: calc(80% - 15px);
        width: auto;
        height: auto;
    }
}

/* ======= Product Info ======= */
.product-info {
    max-width: 100%;
    white-space: normal;
    box-sizing: border-box;
}

/* ======= Pagination ======= */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination a {
    color: white;
    background: linear-gradient(135deg, #007bff, #0056b3);
    padding: 10px 15px;
    margin: 5px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pagination a:hover {
    background: linear-gradient(135deg, #0056b3, #004494);
}

.pagination a.active {
    background: #ff6600;
    pointer-events: none;
}

.pagination a.disabled {
    background: #ccc;
    color: #666;
    pointer-events: none;
}

/* ======= User Details ======= */
.user-details-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-details-container h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-info div {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    color: #555;
}

.user-info div:last-child {
    border-bottom: none;
}

.user-label {
    font-weight: bold;
    color: #222;
}

.user-value {
    color: #007bff;
}
