@import url('/static/css/variables.css');

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Body */
body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Mobile Top Bar */
.mobile-top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: var(--bg-header);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    transition: transform 0.3s ease-in-out;
}

.mobile-top-bar-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 100vw;
    
}

.mobile-logo-container img {
    height: 50px;
}

#hamburger-menu {
    background: none;
    border: none;
    filter: invert(100%);
    padding: 0;
}

#hamburger-menu img {
    height: 30px;
    padding-right: 10px;
}

/* Mobile Menu */
.mobile-menu-bar {
    display: none;
    flex-direction: column;
    background: var(--bg-main);
    padding: 10px;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 100;
    border-radius: 20px;
    box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.mobile-menu-bar.active {
    display: flex;
    z-index: 100;
}

.mobile-search-bar {
    width: 100%;
    display: flex;
    align-items: center;
}

.mobile-search-bar button {
    padding: 0px;
    width: 10%;
    border: none;
    border-left: none;
    background-color: rgba(255, 255, 255, 0);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
}

#search-icon {
    max-height: 50px;
    object-fit: cover;
}

#min-price, #max-price {
    border: 1px solid var(--input-border);
    border-radius: 20px;
}

.mobile-search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: 20px;
    background: var(--input-bg);
    color: var(--text-main);
}

.mobile-search-input::placeholder {
    color: var(--input-placeholder);
}

.mobile-menu-options ul {
    list-style: none;
}

.mobile-menu-options li {
    padding: 10px 0;
    text-decoration: none !important;
    border-bottom: 1px solid var(--border-light);
}

.mobile-dropdown-content {
    display: none;
    padding-left: 20px;
    background: var(--dropdown-bg);
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block;
}

.mobile-dropdown-content a {
    display: inline-flex;
    align-content: flex-start;
    flex-wrap: wrap;
    box-sizing: border-box;
    color: var(--text-light) !important;
    font-size: 1rem;
    background-color: var(--btn-primary-bg);
}

.mobile-dropdown a, li a {
    padding: 10px;
    margin: 2px;
    color: var(--text-link);
    text-decoration: none;
    border-radius: 15px;
}

.mobile-dropdown-content a:hover {
    color: var(--text-link-hover);
}

/* Mobile Filters */
.mobile-filter-row {
    position: fixed;
    width: 100%;
    bottom: 0;
}

.mobile-filter-toggle {
    width: 100%;
    padding: 3px;
    background: var(--bg-header);
    color: var(--text-light);
    border: none;
    border-radius: 20px 20px 0 0;
    cursor: pointer;
    box-shadow: 0px 0px 10px 0px rgb(0, 0, 0);
}

.mobile-filter-toggle:hover {
    background: var(--btn-primary-hover);
    color: var(--text-link-hover);
}

.mobile-filter-options {
    display: none;
    margin-top: 10px;
}

.mobile-filter-options.active {
    display: block;
}

.mobile-filter-group {
    margin-bottom: 1px;
}

.mobile-filter-group label {
    display: block;
    color: var(--text-main);
}

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

.mobile-apply-filters,
.mobile-cancel-filters {
    width: 100%; /* Equal width for both */
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.mobile-dropdown-toggle {
    width: 100%;
    padding: 8px;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 15px;
    text-align: left;
    color: var(--text-light);
    background-color: var(--btn-primary-bg);
}

.mobile-dropdown-toggle:hover {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);

}

.mobile-checkbox-list {
    background: var(--dropdown-bg);
    border: 2px solid var(--dropdown-border);
    border-radius: 20px;
    padding: 5px;

    color: var(--text-main);
}

.mobile-custom-price input {
    width: 45%;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text-main);
}

#filter-btns {
    display: flex;
}


.mobile-apply-filters {
    width: 100%;
    padding: 10px;
    background: rgb(5, 83, 53);
    color: var(--btn-secondary-text);
    border: none;
    border-radius: 20px 0 0 0;
    cursor: pointer;
}

.mobile-cancel-filters {
    width: 100%;
    padding: 10px;
    background: rgb(79, 78, 78);
    color: var(--btn-secondary-text);
    border: none;
    border-radius: 0 20px 0 0;
    cursor: pointer;
}

.mobile-apply-filters:hover {
    background: rgb(7, 143, 91);
}

.mobile-cancel-filters:hover {
    background: rgb(187, 68, 38);
}

/* Product Grid */
.mobile-product-grid {
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 100vw;
    width: 100%;
    background: var(--bg-main);
}

.mobile-product-grid .product-item {
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0px 15px 25px 8px rgba(0,0,0,0.1);
    background: var(--bg-card);
}

.mobile-product-grid .product-item h3 {
    text-align: center;
    padding: 10px;
    margin: 0;
    color: var(--text-main);
}

.card p {
    font-size: .8rem;
    padding: 0px 10px 0px 10px;
}

.mobile-product-grid img {
    width: 100%;
    max-height: 200px;
    object-fit: scale-down;
}

.mobile-product-grid .card-footer {
    display: flex;
    align-items: center;
    padding: 2px;
    flex-wrap: nowrap;
}

.mobile-product-grid .price {
    margin: 0;
    font-size: 30px;
    color: rgb(197, 55, 37);
    font-weight: 800;
    text-shadow: 1px 1px 2px rgb(0, 0, 0);
    text-align: left;
}

#heart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-right: 10px;
    margin-left: 5px;
}

.like-count {
    margin: -8px 0px 0px 0;
}

.mobile-product-grid .action-buttons {
    display: flex;
    align-items: flex-end;
    align-items: center;
    justify-content: center;
}

.action-buttons {
    display: -webkit-flex; /* NEW */
    -webkit-justify-content: flex-end;
    justify-content: flex-end !important;
}

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

.mobile-product-grid .check-out-btn {
    padding: 8px 8px;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.check-out-btn {
    text-align: center;
    text-wrap: nowrap;
}

.mobile-product-grid .check-out-btn:hover {
    background: var(--btn-primary-hover);
}

.mobile-product-grid .save-heart img {
    height: 30px;
    width: 30px;
}

.mobile-product-grid .like-count {
    font-size: 14px;
    color: var(--text-muted);
}

/* Loading */
.mobile-loading {
    text-align: center;
    padding: 20px;
    display: none;
    color: var(--text-main);
}

/* Footer */
.mobile-footer {
    text-align: center;
    padding: 20px;
    background: var(--bg-footer);
    border-top: 1px solid var(--border-dark);
    color: var(--text-light);
}

.mobile-footer a {
    color: var(--text-link);
}

.mobile-footer a:hover {
    color: var(--text-link-hover);
}

.mobile-social-icons img {
    height: 30px;
    margin: 0 10px;
}

.mobile-disclosure {
    font-size: .5rem;
    text-align: center;
    background-color: var(--bg-main);
    color: rgb(9, 66, 136);
    position: sticky;
    top: 0;
    box-shadow: rgba(0, 0, 0, 0.09) 0px 2px 1px, rgba(0, 0, 0, 0.09) 0px 4px 2px, rgba(0, 0, 0, 0.09) 0px 8px 4px, rgba(0, 0, 0, 0.09) 0px 16px 8px, rgba(0, 0, 0, 0.09) 0px 32px 16px;
}