/* ─── Body ─────────────────────────────────────────────── */
body {
    background-repeat: no-repeat;
    background-size: cover;
}

/* ─── Slide Cart ────────────────────────────────────────── */
.slide-cart {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 50%;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.slide-cart.active,
.slide-menu.active {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .slide-cart {
        width: 100%;
    }
}

/* ─── Overlay ───────────────────────────────────────────── */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 12;
}

/* ─── Close Button ──────────────────────────────────────── */
.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
}

/* ─── Newsletter Inputs ─────────────────────────────────── */
#phone,
#email,
#fname,
#lname {
    width: 300px;
    height: 46px;
    padding-left: 10px;
}

#phone::placeholder,
#phone::-webkit-input-placeholder,
#phone::-moz-placeholder,
#phone:-ms-input-placeholder,
#phone:-moz-placeholder {
    padding-left: 20px;
}

#phone::-webkit-input-placeholder {
    color: orange;
}

/* ─── Product Image Hover ───────────────────────────────── */
.back-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.product-card:hover .back-image {
    opacity: 1;
}

.product-card:hover .front-image {
    opacity: 0;
}

/* ─── Notification ──────────────────────────────────────── */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px;
    border-radius: 5px;
    font-size: 16px;
    width: 300px;
    z-index: 9999;
    display: none;
}

.notification.success {
    background-color: #28a745;
    color: white;
}

.notification.error {
    background-color: #dc3545;
    color: white;
}

.notification .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.notification .close-btn:hover {
    color: #000;
}

/* ─── Product Grid ──────────────────────────────────────── */
.product-container {
    margin-top: 50px;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    padding-left: 1rem;
    padding-right: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: stretch;
    justify-items: center;
}

@media (min-width: 1024px) {
    .product-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─── Product Card ──────────────────────────────────────── */
.product-card {
    width: 100%;
    max-width: 16rem;
    height: 350px;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    overflow: hidden;
}

.product-card:hover {
    transform: scale(1.05);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 0.75rem 0.75rem 0 0;
}

/* ─── Sold Out Badge ────────────────────────────────────── */
.sold-out {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-weight: bold;
    z-index: 1;
}

/* ─── Product Details ───────────────────────────────────── */
.product-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 150px;
    text-align: center;
}

.product-details p {
    margin: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-details .product-name {
    font-size: 0.875rem;
    font-weight: bold;
    text-transform: capitalize;
    line-height: 1.2;
    max-height: 4rem;
    overflow: hidden;
    word-wrap: break-word;
    white-space: normal;
}

.product-details .product-price {
    font-size: 1rem;
    font-weight: bold;
    margin-top: auto;
}

/* ─── Dropdown ──────────────────────────────────────────── */
.dropdown {
    position: relative;
}

.dropdown_menu {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 10rem;
}

.dropdown_menu li {
    padding: 0.5rem 1rem;
}

.dropdown_menu li a {
    text-decoration: none;
    color: #333;
    display: block;
}

.dropdown_menu li a:hover {
    background-color: #f4f4f4;
}

.dropdown:hover .dropdown_menu {
    display: block;
}
