/* Market Page Specific Styles - Güvenli CSS */

/* CSS Injection Koruması - Sadece güvenli değerler */
.market-main {
    padding: 2rem 0;
    background-color: #F8F4E3;
    min-height: calc(100vh - 200px);
}

/* CSS Injection koruması - Güvenli değerler */
.market-main {
    /* Sadece güvenli renk kodları */
    background-color: #F8F4E3;
    color: #1C1C1C;
    border-color: #E5E5E5;
}

/* Güvenli font aileleri */
.market-main {
    font-family: 'Montserrat', 'Poppins', sans-serif;
}

/* Güvenli boyutlar */
.market-main {
    padding: 2rem 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.search-container {
    display: flex;
    max-width: 700px;
    width: 100%;
    margin: 0;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(28, 28, 28, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.search-container:focus-within {
    box-shadow: 0 12px 35px rgba(28, 28, 28, 0.2);
    transform: translateY(-3px) scale(1.02);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 1rem;
}

.search-icon {
    color: rgba(28, 28, 28, 0.4);
    font-size: 1.1rem;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
}

.search-container:focus-within .search-icon {
    color: #EBC42A;
    transform: scale(1.1);
}

.product-search {
    flex: 1;
    padding: 1.25rem 0.5rem;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
    color: #1C1C1C;
    background: transparent;
    transition: all 0.3s ease;
}

.product-search::placeholder {
    color: rgba(28, 28, 28, 0.5);
    transition: all 0.3s ease;
}

.search-container:focus-within .product-search::placeholder {
    color: rgba(28, 28, 28, 0.3);
    transform: translateX(5px);
}

.search-clear-btn {
    background: none;
    border: none;
    color: rgba(28, 28, 28, 0.4);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    opacity: 0;
    transform: scale(0);
}

.search-clear-btn.visible {
    opacity: 1;
    transform: scale(1);
}

.search-clear-btn:hover {
    background-color: rgba(28, 28, 28, 0.1);
    color: #1C1C1C;
}

.search-button {
    background: linear-gradient(135deg, #EBC42A 0%, #d4b023 100%);
    border: none;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.search-button:hover::before {
    left: 100%;
}

.search-button:hover {
    background: linear-gradient(135deg, #d4b023 0%, #EBC42A 100%);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(235, 196, 42, 0.4);
}

.search-button:active {
    transform: scale(0.98);
}

.search-button i {
    color: #1C1C1C;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-button:hover i {
    transform: scale(1.1);
}

.search-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.search-filter-btn {
    background-color: rgba(28, 28, 28, 0.05);
    border: 2px solid rgba(28, 28, 28, 0.1);
    padding: 0.75rem 1.25rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #1C1C1C;
}

.search-filter-btn:hover {
    background-color: #EBC42A;
    border-color: #EBC42A;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(235, 196, 42, 0.3);
}

.search-filter-btn i {
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-filter-btn:hover i {
    transform: rotate(180deg);
}

.search-filter-btn.active {
    background-color: #1C1C1C;
    color: #F8F4E3;
    border-color: #1C1C1C;
}

.search-filter-btn.active i {
    transform: rotate(180deg);
}

/* Desktop: Hide search filter toggle button */
@media (min-width: 769px) {
    .search-filter-btn {
        display: none;
    }
}

/* Arama önerileri kaldırıldı */

/* Search Icon Bounce */
.search-container:focus-within .search-icon {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.2);
    }
    60% {
        transform: scale(1.1);
    }
}

/* Clear Button Fade In */
.search-clear-btn.visible {
    animation: clearButtonFadeIn 0.3s ease;
}

@keyframes clearButtonFadeIn {
    from {
        opacity: 0;
        transform: scale(0) rotate(-90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}


.market-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar Styles */
.market-sidebar {
    background-color: #F8F4E3;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(28, 28, 28, 0.08);
    position: sticky;
    top: 120px;
    height: fit-content;
    z-index: 5;
}

.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(28, 28, 28, 0.1);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-section h3 {
    color: #1C1C1C;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background-color: #EBC42A;
    border-radius: 2px;
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #1C1C1C;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-list a:hover,
.category-list a.active {
    background-color: #EBC42A;
    color: #1C1C1C;
    transform: translateX(5px);
}

/* Price Filter */
.price-filter {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-input {
    width: 100%;
    max-width: 120px;
    padding: 0.5rem;
    border: 2px solid rgba(28, 28, 28, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: #EBC42A;
}

.apply-price-btn {
    background-color: #EBC42A;
    color: #1C1C1C;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-price-btn:hover {
    background-color: #1C1C1C;
    color: #EBC42A;
    transform: translateY(-2px);
}

/* Checkbox Items */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.checkbox-item:hover {
    color: #EBC42A;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #EBC42A;
}

.checkbox-item span {
    font-size: 0.9rem;
}

/* Clear Filters Button */
.clear-filters-btn {
    width: 100%;
    background-color: #1C1C1C;
    color: #F8F4E3;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.clear-filters-btn:hover {
    background-color: #EBC42A;
    color: #1C1C1C;
    transform: translateY(-2px);
}

/* Market Content */
.market-content {
    background-color: #F8F4E3;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
}

.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #F8F4E3;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(28, 28, 28, 0.05);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: #F8F4E3;
    border: 1px solid #EBC42A;
    border-radius: 6px;
    color: #1C1C1C;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 80px;
    justify-content: center;
}

.filter-btn:hover {
    background: #EBC42A;
    color: #1C1C1C;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(235, 196, 42, 0.3);
}

.filter-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(235, 196, 42, 0.2);
}

.filter-btn i {
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.filter-btn:hover i {
    transform: rotate(15deg);
}

/* Desktop: Hide filter button on wide screens */
@media (min-width: 769px) {
    .filter-btn {
        display: none;
    }
}

.results-info {
    color: #1C1C1C;
    font-weight: 500;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(28, 28, 28, 0.1);
    border-radius: 8px;
    background-color: #F8F4E3;
    color: #1C1C1C;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #EBC42A;
}

/* Products Grid */
.market-main .products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

/* Product Badges */
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #EBC42A;
    color: #1C1C1C;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.sale {
    background-color: #FF6B6B;
    color: white;
}

.product-badge.hot {
    background-color: #FF8E53;
    color: white;
}

.product-badge.new {
    background-color: #4ECDC4;
    color: white;
}


/* Price with Discount */
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.new-price {
    color: #EBC42A;
    font-size: 1.5rem;
    font-weight: 700;
}

.product-size {
    color: #1C1C1C;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0;
    padding: 0.25rem 0.5rem;
    background-color: rgba(235, 196, 42, 0.1);
    border-radius: 4px;
    display: inline-block;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 4rem auto 2rem auto;
    padding: 2rem 0;
    width: 100%;
    max-width: 1400px;
    background-color: transparent;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.page-btn {
    background-color: #F8F4E3;
    color: #1C1C1C;
    border: 2px solid rgba(28, 28, 28, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 40px;
    position: relative;
    z-index: 10;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover,
.page-btn.active {
    background-color: #EBC42A;
    color: #1C1C1C;
    border-color: #EBC42A;
    transform: translateY(-2px);
}

.page-btn.prev,
.page-btn.next {
    min-width: 80px;
}

/* Responsive Design */
@media (min-width: 1400px) {
    .market-main .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .market-layout {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
    }
    
    .market-sidebar {
        padding: 1rem;
    }
    
    .market-main .products-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .market-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .market-main .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .market-sidebar {
        position: static;
        order: 2;
        margin-top: 1rem;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 1rem;
        border-radius: 25px;
    }
    
    .search-input-wrapper {
        padding: 0 0.75rem;
        position: relative;
    }
    
    
    .product-search {
        padding: 1rem 0.5rem;
        font-size: 1rem;
    }
    
    .search-button {
        display: none;
    }
    
    .search-options {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .market-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .page-numbers {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .market-main {
        padding: 1rem 0;
    }
    
    .search-container {
        margin: 0 0.5rem;
        border-radius: 20px;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-input-wrapper {
        padding: 0 0.75rem;
        position: relative;
    }
    
    
    .product-search {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .search-button {
        display: none;
    }
    
    .search-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .market-main .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }
    
    /* Extra small mobile optimizations - Fixed height */
    .market-main .product-card {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .product-image {
        height: 120px !important;
        min-height: 120px !important;
        max-height: 120px !important;
        flex-shrink: 0 !important;
    }
    
    .product-info {
        padding: 0.5rem 0.6rem 0.6rem 0.6rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .product-info h3 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
        line-height: 1.2;
        height: 2rem !important;
        min-height: 2rem !important;
        max-height: 2rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-description {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
        min-height: 1rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .product-price {
        margin: 0.2rem 0;
        height: 1.8rem !important;
        min-height: 1.8rem !important;
        max-height: 1.8rem !important;
        display: flex;
        align-items: center;
    }
    
    .product-price .new-price {
        font-size: 0.9rem;
    }
    
    .product-price .old-price {
        font-size: 0.7rem;
    }
    
    .product-actions {
        margin-top: auto;
        flex-shrink: 0;
        position: relative;
        bottom: 0;
    }
    
    .market-main .product-card .quantity-picker {
        flex-direction: row !important;
        gap: 0.2rem;
        margin-bottom: 0.3rem;
        display: flex !important;
        justify-content: center;
    }
    
    .market-main .product-card .quantity-btn {
        width: 22px !important;
        height: 22px !important;
        font-size: 0.7rem !important;
        min-width: 22px !important;
        max-width: 22px !important;
    }
    
    .market-main .product-card .quantity-input {
        width: 30px !important;
        height: 22px !important;
        font-size: 0.7rem !important;
        min-width: 30px !important;
        max-width: 30px !important;
    }
    
    .add-to-cart-btn {
        height: 28px;
        font-size: 0.75rem;
    }
    
    .sidebar-section {
        padding: 1rem 0;
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .price-input {
        max-width: 100px;
    }
}

/* Sidebar Toggle for Mobile */
@media (max-width: 768px) {
    .market-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        z-index: 1000;
        background-color: #F8F4E3;
        overflow-y: auto;
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .market-sidebar.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .search-filter-btn.active {
        background-color: #1C1C1C;
        color: #F8F4E3;
        border-color: #1C1C1C;
    }
    
    .search-filter-btn.active i {
        transform: rotate(180deg);
    }
    
    /* Sidebar Overlay Animation */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        backdrop-filter: blur(2px);
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Animation for product cards */
.product-card {
    animation: fadeInUp 0.6s ease forwards;
    cursor: pointer;
    transition: all 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for sidebar items */
.sidebar-section:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

/* Focus states for accessibility */
.price-input:focus,
.sort-select:focus,
.checkbox-item input:focus {
    box-shadow: 0 0 0 3px rgba(235, 196, 42, 0.3);
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #EBC42A;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

.loading-spinner i {
    font-size: 3rem;
    color: #EBC42A;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    color: #1C1C1C;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Error Message */
.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

.error-message i {
    font-size: 3rem;
    color: #FF6B6B;
    margin-bottom: 1rem;
}

.error-message h3 {
    color: #1C1C1C;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.error-message p {
    color: #666;
    font-size: 1rem;
    margin: 0 0 2rem 0;
    max-width: 400px;
}

.retry-btn {
    background-color: #EBC42A;
    color: #1C1C1C;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background-color: #d4b023;
    transform: translateY(-2px);
}

/* No Products */
.no-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

.no-products i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-products h3 {
    color: #1C1C1C;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.no-products p {
    color: #666;
    font-size: 1rem;
    margin: 0;
    max-width: 400px;
}

/* Product Stock */
.product-stock {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

/* Cart stilleri kaldırıldı */

/* Pagination Styles */

.page-numbers span {
    color: #666;
    font-weight: 600;
    padding: 0 0.5rem;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1.5rem 0;
    }
    
    .page-numbers {
        display: flex;
        justify-content: center;
    }
    
    .page-btn {
        padding: 0.5rem 0.75rem;
        min-width: 40px;
    }
    
    .page-btn.prev,
    .page-btn.next {
        min-width: 80px;
    }
}

/* Product Image Styles */
.product-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

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

.product-image img[src*="placeholder"] {
    object-fit: contain;
    padding: 20px;
    background-color: #f8f8f8;
}

/* Product Card Layout */
.market-main .product-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(28, 28, 28, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(28, 28, 28, 0.15);
}

/* Product Info Styles */
.product-info {
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    color: #1C1C1C;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    min-height: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 1rem 0;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property for future compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product Price Styles */
.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}

.product-price .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    font-weight: 500;
}

.product-price .new-price {
    color: #EBC42A;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Product Size */
.product-size {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: rgba(235, 196, 42, 0.1);
    color: #1C1C1C;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 0.5rem 0;
}

/* Product Actions - Quantity Picker and Add to Cart Button */
.product-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}

.quantity-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

/* Mobile quantity picker - horizontal layout */
@media (max-width: 768px) {
    .market-main .product-card .quantity-picker {
        flex-direction: row !important;
        gap: 0.3rem;
        margin-bottom: 0.4rem;
        justify-content: center;
        display: flex !important;
    }
    
    .market-main .product-card .quantity-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.8rem !important;
        min-width: 24px !important;
        max-width: 24px !important;
    }
    
    .market-main .product-card .quantity-input {
        width: 35px !important;
        height: 24px !important;
        font-size: 0.8rem !important;
        min-width: 35px !important;
        max-width: 35px !important;
    }
    
    /* Mobile product card height reduction - Fixed height */
    .market-main .product-card {
        height: 360px !important;
        min-height: 360px !important;
        max-height: 360px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .product-image {
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
        flex-shrink: 0 !important;
    }
    
    .product-info {
        padding: 0.6rem 0.8rem 0.8rem 0.8rem;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .product-info h3 {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
        height: 2.4rem !important;
        min-height: 2.4rem !important;
        max-height: 2.4rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .product-description {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
        min-height: 1.2rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .product-price {
        margin: 0.3rem 0;
        gap: 0.3rem;
        height: 2rem !important;
        min-height: 2rem !important;
        max-height: 2rem !important;
        display: flex;
        align-items: center;
    }
    
    .product-price .new-price {
        font-size: 1rem;
    }
    
    .product-price .old-price {
        font-size: 0.8rem;
    }
    
    .product-actions {
        padding-top: 0.3rem;
        margin-top: auto;
        flex-shrink: 0;
        position: relative;
        bottom: 0;
    }
    
    .add-to-cart-btn {
        height: 32px;
        font-size: 0.8rem;
    }
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #EBC42A;
    background: white;
    color: #1C1C1C;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: #EBC42A;
    color: white;
    transform: scale(1.05);
}

.quantity-btn:disabled {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

.quantity-input {
    width: 60px;
    height: 36px;
    border: 2px solid #EBC42A;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #1C1C1C;
    border-radius: 6px;
    background: white;
}

.quantity-input:focus {
    outline: none;
    border-color: #d4b023;
    box-shadow: 0 0 0 3px rgba(235, 196, 42, 0.2);
}

.add-to-cart-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #EBC42A;
    color: #1C1C1C;
    text-decoration: none;
}

.add-to-cart-btn:hover {
    background: #d4b023;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(235, 196, 42, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn i {
    font-size: 1rem;
}

/* Ensure these styles take precedence over global button styles */
.product-card .quantity-picker .quantity-btn,
.product-card .add-to-cart-btn {
    all: unset;
    box-sizing: border-box;
}

.product-card .quantity-picker .quantity-btn {
    width: 32px;
    height: 32px;
    border: 2px solid #EBC42A;
    background: white;
    color: #1C1C1C;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-card .quantity-picker .quantity-btn:hover {
    background: #EBC42A;
    color: white;
    transform: scale(1.05);
}

.product-card .quantity-picker .quantity-btn:disabled {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
}

.product-card .quantity-picker .quantity-input {
    width: 50px;
    height: 32px;
    border: 2px solid #EBC42A;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1C1C1C;
    border-radius: 6px;
    background: white;
    flex-shrink: 0;
}

.product-card .quantity-picker .quantity-input:focus {
    outline: none;
    border-color: #d4b023;
    box-shadow: 0 0 0 3px rgba(235, 196, 42, 0.2);
}

.product-card .add-to-cart-btn {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #EBC42A;
    color: #1C1C1C;
    text-decoration: none;
}

.product-card .add-to-cart-btn:hover {
    background: #d4b023;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(235, 196, 42, 0.3);
}

.product-card .add-to-cart-btn:active {
    transform: translateY(0);
}

.product-card .add-to-cart-btn i {
    font-size: 1rem;
}
