/* ============================================
   Global Styles & Variables
   ============================================ */
:root {
    --primary: #1e3c72;
    --secondary: #2a5298;
    --primary-dark: #0a192f;
    --primary-light: #112240;
    --dark: #1a1a2e;
    --black: #000000;
    --light: #f8f9fa;
    --muted: #6c757d;
    --border: #e9ecef;
    --gray: #4a4a4a;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --accent: #ff6b6b;
    --facebook: #1877f2;
    --twitter: #000000;
    --whatsapp: #25d366;
    --telegram: #0088cc;
    --linkedin: #0a66c2;
    --email: #ea4335;
    --instagram: #e4405f;
    --tiktok: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 14px;
    line-height: 1.4;
    background: var(--light);
    padding-top: 3rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ============================================
   Main Content - MOBILE MARGIN FIX
   ============================================ */
.main-content {
    padding: 1rem;
    max-width: 100%;
    overflow-x: hidden;
    flex: 1;
    padding-bottom: 100px;
    margin-top: 0px;
}

/* Mobile margin adjustment - only affects mobile screens (≤768px) */
@media (max-width: 768px) {
    .main-content {
        margin-top: 55px !important;
    }
}

/* Keep original margin on larger screens */
@media (min-width: 769px) {
    .main-content {
        margin-top: 0px !important;
    }
}

.page-header {
    background: white;
    padding: 0.75rem 1rem;
    margin: -1rem -1rem 1rem -1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.page-header h1 {
    font-size: 1.3rem;
    margin: 0;
    color: var(--primary);
}

.results-info {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    color: var(--muted);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.sort-indicator {
    background: rgba(10, 25, 47, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

/* ============================================
   Rating Stars
   ============================================ */
.rating-stars {
    display: inline-flex;
    gap: 2px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.rating-count {
    font-size: 0.65rem;
    color: var(--muted);
}

/* ============================================
   Announcements Slider
   ============================================ */
.market-announcements-section {
    margin: 0 auto 20px;
    max-width: 100%;
    height: 55vh;
    min-height: 370px;
    max-height: 650px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.market-announcements-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.market-announcements-slider .swiper-slide {
    height: 100%;
    position: relative;
}

.market-announcement-slide {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

.market-announcement-media {
    width: 100%;
    height: 100%;
    position: relative;
}

.market-announcement-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease;
}

.market-announcements-slider .swiper-slide-active .market-announcement-media img {
    transform: scale(1.05);
}

.market-announcement-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}

.market-announcement-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent);
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    width: fit-content;
}

.market-announcement-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.market-announcement-description {
    font-size: 0.75rem;
    margin-bottom: 8px;
    line-height: 1.3;
    max-width: 100%;
    opacity: 0.95;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.market-announcement-company {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 30px;
    backdrop-filter: blur(3px);
    width: fit-content;
}

/* Company logo as profile image - circular */
.market-announcement-company img,
.market-announcement-company .company-logo-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: var(--primary);
}

.market-announcement-company span {
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-announcement-cta {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.market-announcement-btn {
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.market-announcement-btn-primary {
    background: var(--primary);
    color: white;
}

.market-announcement-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.market-announcement-btn-outline {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.market-announcement-btn-outline:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.market-announcements-section .swiper-button-next,
.market-announcements-section .swiper-button-prev {
    color: white;
    background: rgba(10, 25, 47, 0.8);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    backdrop-filter: blur(3px);
    transition: all 0.2s ease;
}

.market-announcements-section .swiper-button-next:hover,
.market-announcements-section .swiper-button-prev:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.market-announcements-section .swiper-button-next:after,
.market-announcements-section .swiper-button-prev:after {
    font-size: 0.9rem;
    font-weight: bold;
}

.market-announcements-section .swiper-pagination-bullet {
    background: white;
    opacity: 0.7;
    width: 8px;
    height: 8px;
    transition: all 0.2s ease;
}

.market-announcements-section .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent);
    width: 20px;
    border-radius: 10px;
}

/* ============================================
   Announcement Detail Modal Styles
   ============================================ */
.announcement-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.announcement-detail-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.announcement-detail-company {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: 10px;
    margin: 1rem 0;
}

/* Company logo in announcement detail modal - circular profile */
.announcement-detail-company img,
.announcement-detail-company .company-detail-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: white;
}

.announcement-detail-company div {
    flex: 1;
}

.announcement-detail-company strong {
    font-size: 1rem;
    color: var(--primary);
}

.announcement-detail-company small {
    font-size: 0.75rem;
    color: var(--muted);
}

.announcement-detail-meta {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.announcement-detail-meta-item {
    font-size: 0.8rem;
    color: var(--muted);
}

.announcement-detail-meta-item i {
    margin-right: 5px;
}

.announcement-detail-content {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ============================================
   Search Box & Results
   ============================================ */
.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 0.6rem 0.6rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

.search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.search-results-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    display: none;
    border: 1px solid var(--border);
}

.search-results-container.show {
    display: block;
}

.search-result-header {
    padding: 1rem;
    background: var(--light);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--primary);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.search-result-item:hover {
    background-color: var(--light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-result-category {
    font-size: 0.65rem;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.search-result-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.search-result-rating {
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
}

.search-result-seller {
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.no-search-results {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--muted);
}

.no-search-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-loading {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.search-loading .spinner,
.products-loading .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* ============================================
   Filters
   ============================================ */
.flex-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .flex-filters {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
}

@media (max-width: 480px) {
    .flex-filters {
        gap: 0.35rem;
    }
    .filter-select {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
    .price-filter input {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
}

.filter-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.8rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px 10px;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select:not([value=""]) {
    border-color: var(--primary);
    background-color: rgba(10, 25, 47, 0.05);
}

.filter-select:disabled {
    background-color: var(--light);
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.price-filter {
    display: flex;
    gap: 0.5rem;
    grid-column: span 2;
}

.price-filter input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
}

.reset-filter {
    grid-column: 1 / -1;
    padding: 0.6rem;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.reset-filter:hover {
    background: #e9ecef;
    color: var(--danger);
    border-color: var(--danger);
}

/* ============================================
   Active Filters
   ============================================ */
.active-filters {
    margin-bottom: 1rem;
}

.active-filters .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.active-filters .btn-close {
    font-size: 0.6rem;
    padding: 0.1rem;
    margin-left: 0.2rem;
}

/* ============================================
   Products Grid & Cards - 2 COLUMNS ON MOBILE
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    margin-bottom: 2rem;
}

/* Tablets - 3 columns */
@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* Medium screens - 4 columns */
@media (min-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

/* Large screens - 5 columns */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
}

/* Ultra large screens - 6 columns */
@media (min-width: 1600px) {
    .products-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.25rem;
    }
}

/* Only on extremely small screens (under 360px) show 1 column */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-img {
    height: 120px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

@media (max-width: 768px) {
    .product-img {
        height: 110px;
    }
}

@media (max-width: 480px) {
    .product-img {
        height: 100px;
    }
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-content {
    padding: 0.6rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: inline-block;
    padding: 0.15rem 0.4rem;
    background: rgba(10, 25, 47, 0.1);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.3rem 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.8rem;
}

@media (max-width: 480px) {
    .product-title {
        font-size: 0.7rem;
    }
}

.product-condition {
    margin-bottom: 0.3rem;
}

.badge.bg-dark { background-color: #000000 !important; }
.badge.bg-primary { background-color: #0a192f !important; }
.badge.bg-secondary { background-color: #6c757d !important; }
.badge.bg-danger { background-color: var(--danger) !important; }

.product-price {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

@media (max-width: 480px) {
    .product-price {
        font-size: 0.75rem;
    }
}

.negotiable-badge {
    font-size: 0.6rem;
    background: #fff3cd;
    color: #856404;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    display: inline-block;
    margin-left: 0.3rem;
}

.product-stock {
    font-size: 0.7rem;
    margin-bottom: 0.6rem;
}

.product-stock .in-stock { color: var(--success); }
.product-stock .low-stock { color: var(--warning); }
.product-stock .out-of-stock { color: var(--danger); }

/* Contact Buttons */
.contact-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}

@media (max-width: 400px) {
    .contact-buttons {
        gap: 0.3rem;
    }
    .contact-btn {
        font-size: 0.6rem;
        padding: 0.25rem;
    }
}

.contact-btn {
    padding: 0.35rem;
    border-radius: 5px;
    color: white;
    text-align: center;
    font-size: 0.7rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    transition: opacity 0.2s;
}

.contact-btn:hover {
    opacity: 0.9;
    color: white;
}

.call-btn { background: var(--dark); }
.whatsapp-btn { background: #075e54; }

/* Product Actions */
.product-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin-top: auto;
}

@media (max-width: 400px) {
    .product-actions {
        gap: 0.3rem;
    }
    .product-btn {
        font-size: 0.6rem;
        padding: 0.3rem;
    }
}

.product-btn {
    padding: 0.4rem;
    text-align: center;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-btn:hover {
    background: var(--primary-dark);
    color: white;
}

.product-btn.outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.product-btn.outline:hover {
    background: var(--primary);
    color: white;
}

.product-btn:disabled {
    background: var(--border);
    color: var(--muted);
    cursor: not-allowed;
    border: 1px solid var(--border);
}

.products-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--muted);
}

.products-loading .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--muted);
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Wishlist Button */
.wishlist-btn {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.wishlist-btn:hover,
.wishlist-btn.active {
    background: var(--primary);
    transform: scale(1.1);
}

.wishlist-btn.active i {
    color: var(--danger);
}

/* ============================================
   Pagination
   ============================================ */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding-left: 0;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .pagination {
        gap: 0.3rem;
    }
    .page-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
        min-width: 30px;
    }
}

.page-item {
    list-style: none;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--primary);
    text-decoration: none;
    background: white;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    background: var(--light);
    color: var(--muted);
    cursor: not-allowed;
}

/* ============================================
   Fixed Action Buttons
   ============================================ */
.action-buttons-fixed {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

@media (max-width: 480px) {
    .action-buttons-fixed {
        bottom: 0.75rem;
        right: 0.75rem;
        gap: 0.4rem;
    }
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .action-badge {
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.action-btn:hover {
    transform: scale(1.1);
}

.cart-btn { background: linear-gradient(135deg, var(--primary), #000000); }
.wishlist-btn-fixed { background: linear-gradient(135deg, #dc3545, #000000); }
.history-btn { background: linear-gradient(135deg, var(--primary-dark), #000000); }

.action-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    font-weight: 600;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-content {
    border-radius: 10px;
    border: none;
    max-height: 90vh;
    overflow: hidden;
}

.modal-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-body {
        padding: 0.75rem;
    }
}

.modal-header {
    background: var(--primary);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-title {
    font-size: 1.1rem;
    margin: 0;
}

.modal-img,
.modal-image-container img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
}

/* ============================================
   Specifications
   ============================================ */
.specifications-container {
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.spec-item {
    display: flex;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.spec-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 3px solid var(--primary);
}

.spec-key {
    font-weight: 600;
    color: var(--primary);
    min-width: 180px;
    display: flex;
    align-items: center;
}

.spec-key i {
    color: var(--accent);
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.spec-value {
    flex: 1;
    color: #333;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.spec-text-line {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
}

.spec-text-line:before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-weight: bold;
}

/* ============================================
   Related Products
   ============================================ */
.related-products-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.related-products-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-products-section h5 i {
    color: var(--accent);
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

@media (min-width: 576px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 992px) {
    .related-products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (min-width: 1200px) {
    .related-products-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.related-product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.related-product-img {
    height: 100px;
    overflow: hidden;
    position: relative;
}

.related-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-product-card:hover .related-product-img img {
    transform: scale(1.05);
}

.related-product-content {
    padding: 0.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-product-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.2rem 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.6rem;
}

.related-product-price {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.2rem;
}

.related-product-condition {
    margin-bottom: 0.2rem;
}

.related-product-condition .badge {
    font-size: 0.55rem;
    padding: 0.15rem 0.3rem;
}

.related-product-rating {
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-top: 0.2rem;
}

/* ============================================
   Cart & Wishlist Items
   ============================================ */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}

@media (max-width: 480px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .cart-item-img {
        width: 50px;
        height: 50px;
    }
    .cart-item-title {
        font-size: 0.8rem;
    }
    .cart-item-price {
        font-size: 0.75rem;
    }
}

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-content {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: #333;
}

.cart-item-price {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #333;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quantity-input {
    width: 40px;
    height: 25px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 4px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s;
}

.remove-btn:hover {
    background: #c82333;
}

/* ============================================
   Social Share Buttons
   ============================================ */
.share-buttons-container {
    margin: 20px 0 10px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.share-title-inline {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
}

.share-title-inline i {
    font-size: 1rem;
    margin-right: 8px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

@media (max-width: 576px) {
    .share-buttons {
        gap: 0.5rem;
    }
    .share-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    .share-btn i {
        font-size: 0.9rem;
    }
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.share-btn i { font-size: 1rem; }
.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }

.share-btn-whatsapp { background: #25D366; color: white; }
.share-btn-facebook { background: #1877F2; color: white; }
.share-btn-twitter { background: #000000; color: white; }
.share-btn-instagram { 
    background: radial-gradient(circle at 30% 110%, #ffdb8b, #d6249f, #285aeb);
    color: white;
}
.share-btn-tiktok { background: #000000; color: white; }
.share-btn-tiktok i { color: #25F4EE; }
.share-btn-email { background: #ea4335; color: white; }
.share-btn-copy { background: var(--primary); color: white; }

.social-share-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.social-share-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-share-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   Order Confirmation Modal
   ============================================ */
.confirmation-success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.confirmation-info-row {
    display: flex;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.confirmation-info-label {
    width: 140px;
    font-weight: 600;
    color: var(--muted);
}

.confirmation-info-value {
    flex: 1;
    color: var(--dark);
}

@media (max-width: 768px) {
    .confirmation-info-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    .confirmation-info-value {
        width: 100%;
    }
    .confirmation-items-table {
        display: block;
        overflow-x: auto;
    }
}

.confirmation-items-table {
    width: 100%;
    margin-bottom: 1rem;
}

.confirmation-items-table th,
.confirmation-items-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.confirmation-items-table th {
    background: var(--light);
    font-weight: 600;
    font-size: 0.85rem;
}

.confirmation-items-table td {
    font-size: 0.85rem;
}

.confirmation-items-table td img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.confirmation-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.confirmation-summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: none;
    padding-top: 1rem;
    color: var(--primary);
}

.confirmation-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   Notification
   ============================================ */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: var(--success);
    color: white;
    z-index: 9999;
    display: none;
    animation: slideIn 0.3s;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .notification {
        font-size: 0.7rem;
        padding: 0.5rem 0.7rem;
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }
}

.notification.error { background: var(--danger); }
.notification.warning { background: var(--warning); }

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   Animations
   ============================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .action-buttons-fixed,
    .modal-footer,
    .page-header .d-flex,
    .search-container,
    .flex-filters,
    .active-filters,
    .market-announcements-section,
    .notification,
    .contact-buttons,
    .product-actions {
        display: none !important;
    }
    
    .modal-content {
        border: none !important;
        box-shadow: none !important;
    }
    
    .modal-header {
        background: white !important;
        color: black !important;
    }
    
    .modal-header .btn-close {
        display: none !important;
    }
    
    .confirmation-status-badge {
        border: 1px solid #ccc;
        background: white !important;
        color: black !important;
    }
    
    body {
        padding: 0;
        margin: 0;
    }
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .market-announcements-section {
        height: 35vh;
        min-height: 280px;
    }
    
    .market-announcement-content { padding: 12px 15px; }
    .market-announcement-badge { font-size: 0.6rem; padding: 3px 8px; margin-bottom: 6px; }
    .market-announcement-title { font-size: 0.85rem; -webkit-line-clamp: 1; }
    .market-announcement-description { font-size: 0.65rem; -webkit-line-clamp: 1; }
    .market-announcement-company { padding: 3px 10px; margin-bottom: 6px; }
    .market-announcement-company img,
    .market-announcement-company .company-logo-img { width: 18px; height: 18px; }
    .market-announcement-company span { font-size: 0.65rem; max-width: 120px; }
    .market-announcement-cta { gap: 8px; }
    .market-announcement-btn { padding: 5px 12px; font-size: 0.65rem; }
    .market-announcements-section .swiper-button-next,
    .market-announcements-section .swiper-button-prev { width: 30px; height: 30px; }
    .market-announcements-section .swiper-button-next:after,
    .market-announcements-section .swiper-button-prev:after { font-size: 0.8rem; }
    
    .search-result-image {
        width: 60px;
        height: 60px;
    }
    
    .search-result-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .main-content { padding: 0.5rem; padding-bottom: 120px; }
    .page-header { padding: 0.6rem; margin: -0.5rem -0.5rem 0.8rem -0.5rem; }
    .product-img { height: 100px; }
    .product-content { padding: 0.5rem; }
    .product-title { font-size: 0.7rem; }
}

@media (max-width: 480px) {
    .market-announcements-section { height: 30vh; min-height: 250px; }
    .market-announcement-content { padding: 10px 12px; }
    .market-announcement-badge { font-size: 0.55rem; padding: 2px 6px; }
    .market-announcement-title { font-size: 0.75rem; }
    .market-announcement-description { font-size: 0.6rem; }
    .market-announcement-company { padding: 2px 8px; }
    .market-announcement-company img,
    .market-announcement-company .company-logo-img { width: 16px; height: 16px; }
    .market-announcement-company span { font-size: 0.6rem; max-width: 100px; }
    .market-announcement-cta { gap: 6px; }
    .market-announcement-btn { padding: 4px 10px; font-size: 0.6rem; }
}

/* ============================================
   SUPPLIER INFO IN MODAL - CIRCULAR PROFILE IMAGES
   ============================================ */
.supplier-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.supplier-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .supplier-info-header {
        flex-direction: column;
        text-align: center;
    }
    .supplier-info-header img {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 0.5rem;
    }
    .supplier-info-header .supplier-info-details {
        text-align: center;
    }
    .supplier-info-header h6 {
        justify-content: center;
    }
    .supplier-info .small div {
        justify-content: center;
    }
}

/* Circular profile image in supplier info */
.supplier-info-header img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid var(--primary) !important;
    background: white !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.supplier-info-header img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.supplier-info-header .supplier-info-details {
    flex: 1;
}

.supplier-info-header h6 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.supplier-info-header h6 i {
    color: var(--accent);
}

.supplier-info-header p {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2c3e50;
}

.supplier-info-header .small {
    font-size: 0.75rem;
    font-weight: normal;
    color: var(--muted);
    margin-top: 0.25rem;
}

.supplier-info .small {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.supplier-info .small div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.supplier-info .small i {
    width: 20px;
    color: var(--primary);
    font-size: 0.8rem;
}

.supplier-info .small a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.supplier-info .small a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Rating stars in modal */
.modal-body .rating-stars {
    display: inline-flex;
    gap: 3px;
    margin-right: 0.5rem;
}

.modal-body .rating-stars i {
    font-size: 0.85rem;
}

/* Product condition badges */
.modal-body .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    margin-right: 0.3rem;
}

/* Specifications table */
.specifications-info {
    background: var(--light);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.specifications-info h6 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.specifications-info .table {
    margin-bottom: 0;
}

.specifications-info .table td {
    padding: 0.5rem;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Features container */
.features-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.feature-item {
    background: rgba(10, 25, 47, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.feature-item i {
    font-size: 0.65rem;
    color: var(--success);
}

.compatible-tag {
    background: #e8f5e9;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #2e7d32;
}

/* ============================================
   RESPONSIVE STYLES FOR MODAL
   ============================================ */
@media (max-width: 576px) {
    .supplier-info {
        padding: 1rem;
    }
    
    .supplier-info-header img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .features-container {
        gap: 0.35rem;
    }
    
    .feature-item {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }
    
    .specifications-info .table td {
        display: block;
        width: 100%;
    }
    
    .specifications-info .table td:first-child {
        font-weight: 600;
        margin-top: 0.5rem;
    }
}

/* ============================================
   MODAL IMAGE CONTAINER
   ============================================ */
.modal-image-container {
    text-align: center;
    margin-bottom: 1rem;
}

.modal-img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    background: #f8f9fa;
    padding: 0.5rem;
}

/* ============================================
   CONTACT BUTTONS IN MODAL
   ============================================ */
.modal-body .d-grid {
    margin-top: 1.5rem;
}

.modal-body .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-body .btn:hover {
    transform: translateY(-2px);
}

.modal-body .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.modal-body .btn-primary:hover {
    background: var(--primary-dark);
}

.modal-body .btn-success {
    background: #25D366;
    border-color: #25D366;
}

.modal-body .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.modal-body .btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/*================================= About us page ==============================================================*/