/* =====================================
 * GLOBAL VARIABLES AND RESETS
 * ===================================== */
:root {
    --primary-color: #F5A623;
    --secondary-color: #2c3e50;
    --dark-color: #1a252f;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --whatsapp-green: #25D366;
    --danger-color: #dc3545;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

/* =====================================
 * UNIFORM SEARCH BAR STYLES
 * ===================================== */

/* Search Container - Base Styles */
.search-container {
    position: sticky;
    top: 60px;
    padding: 15px 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Search Form - Consistent Width */
.search-container form {
    width: 100%;
    max-width: 800px;
    display: flex;
    justify-content: center;
}

/* Input Group - Flex Layout */
.search-container .input-group {
    width: 100%;
    display: flex;
    gap: 0;
}

/* Search Input - Uniform Styling */
.search-container input {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 30px 0 0 30px;
    background: #fff;
    box-shadow: none;
    transition: all 0.3s ease;
    min-width: 0;
}

.search-container input:focus {
    border-color: #fbc531;
    outline: none;
    box-shadow: 0 0 8px rgba(251, 197, 49, 0.3);
}

/* Search Button - Consistent Styling */
.search-container button {
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    background-color: #fbc531;
    color: #28313B;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-container button:hover {
    background-color: #ffc857;
}

.search-container button i {
    margin-right: 8px;
}

/* Search Icon - Consistent Sizing */
.search-container .fas.fa-search {
    font-size: 16px;
}

.search-spacer {
    height: 30px;
    width: 100%;
}

/* Fixed Header - For Pages with Search in Header */
.fixed-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 1030;
    margin: 0;
    border-bottom: 1px solid #e9ecef;
}

.fixed-header .container {
    background: #f0f0f0;
    padding: 10px 0;
    border-radius: 5px;
}

/* Section Heading - For Pages with Search in Content */
.section-heading {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

/* Section Subheading */
.section-subheading {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* =====================================
 * RESPONSIVE ADJUSTMENTS
 * ===================================== */

/* Medium Devices (Tablets) */
@media (max-width: 992px) {
    .search-container {
        top: 50px;
        padding: 10px 0;
    }

    .search-container input {
        padding: 10px 15px;
    }

    .search-container button {
        padding: 10px 20px;
    }
}

/* Small Devices (Phones) */
@media (max-width: 768px) {
    .search-container {
        top: 40px;
    }

    .search-container form {
        flex-direction: column;
        align-items: center;
    }

    .search-container input {
        width: 100%;
        border-radius: 30px;
        margin-bottom: 10px;
    }

    .search-container button {
        width: 100%;
        border-radius: 30px;
    }

    .fixed-header .row {
        flex-direction: column;
        text-align: center;
    }

    .search-container {
        margin-top: 10px;
        justify-content: center;
    }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .search-container {
        top: 30px;
    }

    .section-heading {
        font-size: 20px;
    }

    .section-subheading {
        font-size: 14px;
    }
}

/* =====================================
 * SEARCH BAR VARIATIONS
 * ===================================== */

/* Dark Theme Variation */
.search-container.dark-theme {
    background: #28313B;
}

.search-container.dark-theme input {
    background: #3a424d;
    border-color: #4a5461;
    color: #fff;
}

.search-container.dark-theme input::placeholder {
    color: #aaa;
}

.search-container.dark-theme button {
    background-color: #fbc531;
    color: #28313B;
}

/* Compact Variation */
.search-container.compact {
    padding: 8px 0;
}

.search-container.compact input {
    padding: 8px 15px;
    font-size: 14px;
}

.search-container.compact button {
    padding: 8px 20px;
    font-size: 14px;
}

/* Full Width Variation */
.search-container.full-width form {
    max-width: 100%;
}

.search-container.full-width input {
    width: 100%;
}

/* =====================================
 * FIXED HEADER IMPROVEMENTS
 * ===================================== */

/* Remove any default margins/padding from parent containers */
.fixed-header .container-fluid {
    padding-left: 0;
    padding-right: 0;
    margin: 0;
}

.fixed-header .row {
    margin-left: 0;
    margin-right: 0;
    align-items: center;
}

/* Ensure the header takes full width */
.fixed-header > .container-fluid {
    width: 100%;
    max-width: 100%;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
    .fixed-header {
        top: 0 !important;
        padding: 6px 0 !important;
        margin-top: 0 !important;
    }

    .fixed-header .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .section-heading {
        font-size: 1.2rem !important;
        margin-bottom: 4px !important;
    }

    .section-subheading {
        display: none;
    }

    /* Compact search bar for mobile */
    .search-container.compact {
        padding: 0 !important;
        margin: 0 !important;
    }

    .search-container.compact .input-group {
        margin: 0;
    }

    .search-container.compact input {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 20px 0 0 20px;
    }

    .search-container.compact button {
        padding: 8px 15px;
        font-size: 14px;
        border-radius: 0 20px 20px 0;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .fixed-header {
        top: 0 !important;
        padding: 5px 0 !important;
    }

    .section-heading {
        font-size: 1.1rem !important;
        text-align: center;
        margin-bottom: 5px !important;
    }

    /* Stack elements vertically on very small screens */
    .fixed-header .row {
        flex-direction: column;
        gap: 8px;
    }

    .fixed-header .col-md-5,
    .fixed-header .col-md-7 {
        width: 100%;
        text-align: center;
    }
}

/* Product grid improvements for mobile */
@media (max-width: 768px) {
    .product-card-container {
        padding-left: 5px;
        padding-right: 5px;
        margin-bottom: 10px;
    }

    .product-card {
        margin: 0;
        border-radius: 8px;
    }

    .image-container {
        height: 150px !important;
    }

    .product-name {
        font-size: 0.9rem !important;
    }

    .price-tag {
        font-size: 0.8rem !important;
        padding: 4px 8px !important;
    }

    .btn-sm {
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
    }
}

/* Ensure products flow properly under fixed header */
.auction-page {
    padding-top: 0 !important;
}

#auction-products {
    margin-top: 15px;
}

/* Remove any unwanted spacing */
.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

/* Fix for navbar spacing */
.navbar-spacer {
    height: 0 !important;
}

/* =====================================
 * NAVBAR CUSTOM STYLES (Bootstrap 4)
 * ===================================== */
.navbar-custom {
    background: linear-gradient(45deg, #28313B, #485461);
    padding: 0.75rem 1rem;
}

.brand-logo {
    max-height: 60px;
}

.brand-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

.navbar-custom .nav-link {
    color: #fff !important;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.navbar-custom .nav-link:hover {
    color: #fbc531 !important;
}

/* Divider for nav items on small screens */
.nav-divider {
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0.5rem 0;
}

/* Custom Dropdown Background */
.custom-dropdown {
    background: linear-gradient(45deg, #28313B, #485461);
    border: none;
}

.custom-dropdown .dropdown-item {
    color: #fff;
    transition: background 0.3s ease;
}

.custom-dropdown .dropdown-item:hover {
    background-color: rgba(251, 197, 49, 0.3);
}

/* =====================================
 * NAVBAR RIGHT ALIGNMENT FIXES (Bootstrap 4)
 * ===================================== */
/* Ensure navbar collapse uses flexbox properly */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        flex-grow: 1;
        align-items: center;
    }
}

/* Left-aligned items */
.navbar-nav.mr-auto {
    margin-right: auto !important;
}

/* Right-aligned items */
.navbar-nav.ml-auto {
    margin-left: auto !important;
}

/* Dropdown menu alignment */
.dropdown-menu.dropdown-menu-right {
    right: 0;
    left: auto;
}

/* Nav item spacing for better alignment */
.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.5rem 1rem;
}

/* Mobile dropdown fixes */
@media (max-width: 991.98px) {
    .navbar-collapse {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
    }

    .navbar-nav.mr-auto,
    .navbar-nav.ml-auto {
        margin: 0 !important;
        width: 100%;
    }

    .navbar-nav .nav-item {
        width: 100%;
        padding: 0.25rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background: rgba(40, 49, 59, 0.9);
        border: none;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

/* Bootstrap 4 toggler fixes */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Ensure proper spacing between nav items */
.navbar-nav .nav-item + .nav-item {
    margin-left: 0.5rem;
}

/* Dropdown hover effects */
.navbar-nav .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
}

/* =====================================
 * NAVBAR ICON AND TEXT ALIGNMENT FIXES
 * ===================================== */
/* Ensure icons and text are aligned properly */
.navbar-nav .nav-link i {
    margin-right: 0.5rem; /* Space between icon and text */
    font-size: 1rem; /* Icon size */
    vertical-align: middle; /* Align icon vertically */
}

/* Align flex items in nav-link */
.navbar-nav .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 1rem !important;
}

/* Mobile-specific adjustments */
@media (max-width: 991.98px) {
    .navbar-nav .nav-link {
        justify-content: flex-start !important;
        padding: 0.5rem 1rem !important;
    }
}

/* Fix for dropdown items with icons */
.dropdown-menu .dropdown-item i {
    margin-right: 0.5rem;
    font-size: 1rem;
    vertical-align: middle;
}

.dropdown-menu .dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.5rem 1rem !important;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .navbar-nav .nav-item + .nav-item {
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .navbar-nav.ml-auto {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }
}


/* =====================================
 * TOGGLER -> CLOSE ICON
 * ===================================== */
.custom-toggler {
    border: none;
}

.custom-toggler .navbar-toggler-icon {
    filter: invert(1);
    transition: transform 0.3s ease;
}

.custom-toggler.active .navbar-toggler-icon {
    content: "\00d7";
    font-size: 1.8rem;
    filter: none;
    color: #fff;
    transform: rotate(0deg);
}

/* =====================================
 * BUSINESS BANNER SECTION
 * ===================================== */
.business-banner {
    position: relative;
    background-image: url('../site-images/growth-1.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    display: flex;
    align-items: center;
    color: #fff;
}

.business-banner .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    padding: 2rem;
}

.business-banner .container {
    position: relative;
    z-index: 2;
}

.banner-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.banner-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn-banner {
    background-color: #fbc531;
    border: none;
    color: #28313B;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.btn-banner:hover {
    background-color: #ffc857;
    color: #28313B;
}

/* =====================================
 * BUSINESS CATEGORIES SECTION
 * ===================================== */
.business-categories {
    background-color: #f9f9f9;
}

.business-categories .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #28313B;
}

.business-categories .section-subtitle {
    font-size: 1.1rem;
    color: #485461;
}

.business-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 1rem;
    text-align: center;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.business-card img {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.business-card h3 {
    font-size: 1.25rem;
    color: #28313B;
    margin-bottom: 0.5rem;
}

.business-card p {
    font-size: 0.95rem;
    color: #485461;
    line-height: 1.5;
}

/* =====================================
 * FOOTER CUSTOM STYLES
 * ===================================== */
.footer-custom {
    background: linear-gradient(45deg, #485461, #28313B);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer-custom h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fbc531;
    font-weight: 600;
}

.footer-custom ul {
    padding-left: 0;
    list-style: none;
}

.footer-custom ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-custom ul li a:hover {
    color: #fbc531;
}

.footer-custom .footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-custom .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.footer-custom .social-icons a.social-link {
    font-size: 32px;
    color: #fff;
    transition: color 0.3s ease;
}

.footer-custom .social-icons a.social-link:hover {
    color: #fbc531;
}

.footer-custom .newsletter {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-custom .newsletter button.btn-newsletter,
.contact-subscribe .btn-newsletter {
    border: none;
    background: #fbc531;
    color: #28313B;
    border-radius: 0.25rem;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    margin: 0 auto;
}

.footer-custom .newsletter button.btn-newsletter:hover,
.contact-subscribe .btn-newsletter:hover {
    background: #ffc857;
}

.lower-footer {
    background-color: rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
    padding: 1rem 0;
    margin-top: 1rem;
    text-align: center;
}

/* =====================================
 * CONTACT PAGE STYLES
 * ===================================== */
.contact-page {
    background: #f2f2f2;
}

.contact-section {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-info {
    font-size: 1.5rem;
    color: #fbc531;
    margin: 0.5rem 0;
}

.contact-subscribe {
    text-align: center;
}

.contact-form .btn-contact {
    background: linear-gradient(45deg, #28313B, #485461);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
    display: block;
    margin: 1rem auto;
    text-align: center;
    width: fit-content;
}

.contact-form .btn-contact:hover {
    background: #485461;
    color: #fff;
}

/* =====================================
 * AUCTION PAGE STYLING
 * ===================================== */
.auction-page {
    background: #f2f2f2;
}

.category-box {
    height: 100%;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.category-box:hover {
    background: #fbc531;
    color: #28313B;
    transform: scale(1.05);
}

.category-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(251, 197, 49, 0.1), rgba(251, 197, 49, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-box:hover::before {
    opacity: 1;
}

/* Category Icon Styling */
.category-icon {
    transition: transform 0.3s ease;
}

.category-box:hover .category-icon {
    transform: scale(1.1);
}

/* Countup animation for numbers */
.auction-count {
    font-weight: bold;
    color: var(--primary-color);
}

/* Add to your styles section */
.product-count-badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    background: linear-gradient(45deg, #fbc531, #ff9a00);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.product-count-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Mobile responsiveness for auction cards */
@media (max-width: 768px) {
    .auction-card {
        margin-bottom: 15px;
    }

    .category-box {
        padding: 20px 15px;
    }
}

/* =====================================
 * PRODUCT CARD STYLES
 * ===================================== */
.product-card {
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card-container {
    display: flex;
    justify-content: center;
}

.product-card {
    width: 100%;
    max-width: 300px;
}

.image-container {
    background: #e6e6e6;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    overflow: hidden;
    margin-bottom: 15px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 10px;
}

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

.product-name {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50.4px;
}

.info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 15px;
}

.product-info {
    flex: 1;
}

.product-detail {
    color: #333;
    font-size: 14px;
    margin-bottom: 10px;
}

.product-detail i {
    color: #d9534f;
    margin-right: 5px;
}

.price-container {
    flex-shrink: 0;
}

.price-tag {
    background: #28a745;
    color: white;
    padding: 7px 12px;
    border-radius: 5px;
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
}

.btn-container {
    text-align: center;
    margin-top: auto;
}

.btn-container .btn {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-container .btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* =====================================
 * MASONRY LAYOUT STYLING
 * ===================================== */
.masonry-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.masonry-item {
    width: 100%;
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}

@media (min-width: 768px) {
    .masonry-item {
        width: 48%;
    }
}

@media (min-width: 1200px) {
    .masonry-item {
        width: 30%;
    }
}

/* =====================================
 * PRODUCT PAGE STYLES
 * ===================================== */

/* Product Gallery Styles */
.product-gallery {
    max-width: 100%;
    position: relative;
}

.main-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-container .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.main-image-container img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 20px;
}

/* Thumbnail Styles */
.thumbnails-container {
    position: relative;
    padding: 0 30px;
}

.thumbnails-swiper {
    padding: 5px 0;
}

.thumbnails-swiper .swiper-slide {
    height: 100px;
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnails-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--primary-color);
}

.thumbnails-swiper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

/* Product Info Styles */
.product-info-card {
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #28313B;
    margin-bottom: 8px;
}

.product-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

/* Condition Badge Fix */
.condition-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

.condition-badge .badge {
    font-size: 14px;
    padding: 8px 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Action Buttons */
.product-action-btn {
    padding: 14px 20px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-wishlist {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-wishlist.active i {
    color: #e74c3c;
}

.btn-zoom {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* =====================================
 * RELATED PRODUCTS - UNIFORM & RESPONSIVE
 * ===================================== */
.related-products {
    padding: 60px 0;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.related-products h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #28313B;
    position: relative;
    padding-bottom: 15px;
}

.related-products h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

/* Swiper wrapper */
.related-swiper {
    width: 100%;
    padding: 10px 5px 40px;
    margin: 0;
}

/* Card styling */
.related-swiper .swiper-slide {
    height: auto;
}

.related-swiper .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 340px;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.related-swiper .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Image container */
.related-swiper .card-img-container {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
    padding: 10px;
}

.related-swiper .card-img-top {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.related-swiper .card:hover .card-img-top {
    transform: scale(1.05);
}

/* Card body */
.related-swiper .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    justify-content: space-between;
}

/* Product title */
.related-swiper .card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: #28313B;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
}

/* Price */
.related-swiper .card-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.related-swiper .swiper-wrapper {
    padding-left: 0 !important;
}

/* Navigation buttons */
.related-prev,
.related-next {
    color: #28313B;
    background: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    z-index: 10;
}

.related-prev:after,
.related-next:after {
    font-size: 20px;
    font-weight: bold;
}

.related-prev:hover,
.related-next:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.related-prev {
    left: -22px;
}

.related-next {
    right: -22px;
}

/* Related Products Alternative Styles */
.related-product-card {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: #fff;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.related-product-image {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.related-product-image img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    padding: 15px;
}

.related-product-info {
    padding: 20px;
}

.related-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #28313B;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .related-swiper .card {
        min-height: 320px;
    }

    .related-swiper .card-img-container {
        height: 170px;
    }

    .related-swiper .card-title {
        font-size: 15px;
        min-height: 40px;
    }

    .related-swiper .card-text {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .related-products {
        padding: 40px 0;
    }

    .related-swiper .card {
        min-height: 300px;
    }

    .related-swiper .card-img-container {
        height: 150px;
    }

    .related-prev,
    .related-next {
        width: 36px;
        height: 36px;
    }

    .related-prev:after,
    .related-next:after {
        font-size: 16px;
    }

    .related-prev {
        left: -18px;
    }

    .related-next {
        right: -18px;
    }
}

/* Bid History */
.bid-history {
    margin-top: 30px;
}

.bid-history h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #28313B;
}

.bid-item {
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
}

.bid-amount {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 18px;
}

.bid-time {
    font-size: 14px;
    color: #6c757d;
}

/* Tabs Section */
.product-tabs {
    padding: 60px 0;
}

.product-tabs .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.product-tabs .nav-link {
    padding: 12px 24px;
    font-weight: 600;
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.product-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom: 3px solid var(--primary-color);
}

.product-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-info-card {
        margin-top: 30px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 28px;
    }

    .product-action-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .main-image-container {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .main-image-container {
        height: 300px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-price {
        font-size: 24px;
    }

    .thumbnails-swiper .swiper-slide {
        height: 80px;
    }
}

/* =====================================
 * UTILITY CLASSES
 * ===================================== */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

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

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =====================================
 * ACCESSIBILITY & PERFORMANCE
 * ===================================== */
/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer-custom,
    .btn {
        display: none !important;
    }

    .container {
        width: 100% !important;
        max-width: none !important;
    }
}

/* =====================================
 * CURRENCY EXCHANGE VIEW PAGE - REDESIGNED
 * ===================================== */

.currency-hero {
    background: linear-gradient(135deg, #28313B 0%, #485461 100%);
    color: white;
    padding: 100px 0 60px;
    margin-bottom: 40px;
}

.currency-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.currency-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    opacity: 0.9;
    text-align: center;
    line-height: 1.6;
}

.converter-card, .chart-container, .news-container, .market-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 25px;
    transition: var(--transition);
}

.converter-card:hover, .chart-container:hover, .news-container:hover, .market-section:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.4rem;
    color: #28313B;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

.refresh-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-btn:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.converter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.converter-title {
    font-size: 1.5rem;
    color: #28313B;
    font-weight: 600;
    margin: 0;
}

.last-updated {
    color: #666;
    font-size: 0.9rem;
    text-align: right;
}

.converter-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

.swap-btn {
    background-color: var(--primary-color);
    color: #28313B;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.swap-btn:hover {
    background-color: #ffc857;
    transform: rotate(180deg);
}


.currency-select {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    transition: var(--transition);
    position: relative;
    background: white;
    width: 100%;
}

.currency-select:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.2);
}

.currency-flag {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.currency-select select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    appearance: none;
    padding-right: 30px;
    color: #28313B;
}

.currency-select::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    font-size: 0.9rem;
}

.amount-input {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    font-size: 1.5rem;
    outline: none;
    transition: var(--transition);
    width: 100%;
    font-weight: 600;
    color: #28313B;
}

.amount-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.2);
}

.result {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 15px;
    background-color: #fef9f0;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(245, 166, 35, 0.2);
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

.converter-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 10px;
}

.rate-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rate-info i {
    color: var(--primary-color);
    flex-shrink: 0;
}

/* =====================================
 * REDESIGNED MARKET SECTION
 * ===================================== */

.market-section {
    position: relative;
}

.market-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* First Row - Market Tabs */
.market-tabs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.market-tabs-container {
    flex: 1;
    min-width: 250px;
}

.market-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
}

.market-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.market-tab:hover {
    background: rgba(245, 166, 35, 0.1);
    color: var(--primary-color);
}

.market-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

/* Second Row - Controls and Status */
.market-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.market-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.refresh-all-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.refresh-btn:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.market-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

/* Market Content */
.market-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #28313B;
    font-weight: 600;
    margin: 0;
}

.refresh-btn-sm {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.refresh-btn-sm:hover {
    background: #f5f5f5;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.refresh-btn-sm.refreshing {
    color: var(--primary-color);
    animation: spin 1s linear infinite;
}

/* Market Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.market-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.market-card.forex {
    border-left-color: #3498db;
}

.market-card.stocks {
    border-left-color: #2ecc71;
}

.market-card.crypto {
    border-left-color: #f39c12;
}

.market-card.indices {
    border-left-color: #9b59b6;
}

.asset-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.asset-name {
    font-weight: 600;
    color: #28313B;
    font-size: 1rem;
    line-height: 1.3;
    margin: 0;
}

.asset-price {
    font-weight: 700;
    color: #28313B;
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 0;
}

.asset-change {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(40, 167, 69, 0.1);
}

.asset-change.positive {
    color: var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

.asset-change.negative {
    color: var(--danger-color);
    background: rgba(220, 53, 69, 0.1);
}

.market-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.market-content.active {
    display: block;
}

.market-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 20px;
    text-align: center;
}

/* =====================================
 * MOBILE RESPONSIVENESS FOR TWO-ROW LAYOUT
 * ===================================== */

/* Mobile devices */
@media (max-width: 768px) {
    .market-header {
        gap: 12px;
    }

    .market-tabs-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .market-tabs-container {
        min-width: auto;
    }

    .market-tabs {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        background: white;
        border: 1px solid #eee;
    }

    .market-tab {
        min-width: auto;
        padding: 12px;
        text-align: left;
        border-radius: 6px;
    }

    .market-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 0;
    }

    .market-controls {
        justify-content: space-between;
        width: 100%;
    }

    .refresh-all-container {
        justify-content: space-between;
        width: 100%;
    }

    .market-status {
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .market-content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .section-subtitle {
        text-align: center;
    }

    .refresh-btn-sm {
        align-self: center;
    }

    /* Market Grid Mobile Layout */
    .market-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .market-card {
        padding: 16px;
        gap: 10px;
    }

    .asset-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .asset-name {
        font-size: 0.95rem;
    }

    .asset-price {
        font-size: 1.2rem;
    }

    .asset-change {
        align-self: flex-start;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .market-tabs-row {
        gap: 10px;
    }

    .market-controls-row {
        gap: 10px;
        padding: 10px 0;
    }

    .refresh-btn {
        padding: 7px 12px;
        font-size: 0.85rem;
    }

    .market-status {
        font-size: 0.85rem;
    }

    .market-card {
        padding: 14px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .market-tab {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .refresh-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* =====================================
 * NEWS SECTION
 * ===================================== */

.news-container {
    position: relative;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.news-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    margin-bottom: 8px;
}

.news-item:hover {
    background-color: #f9f9f9;
    transform: translateX(5px);
    text-decoration: none;
    color: inherit;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #28313B;
    font-size: 1rem;
    line-height: 1.4;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
}

.news-source {
    font-weight: 500;
}

.news-time {
    color: #999;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.loading p {
    margin: 0;
    font-size: 1rem;
}

/* =====================================
 * AD SLOTS
 * ===================================== */

.ad-slot {
    background: linear-gradient(135deg, #fef9f0 0%, #f5f9ff 100%);
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 25px;
    color: #666;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.ad-slot:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #fef9f0 0%, #f0f7ff 100%);
    transform: translateY(-2px);
}

.ad-slot i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.ad-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #999;
    font-weight: 600;
}

.ad-slot p {
    margin-bottom: 8px;
    font-weight: 500;
}

.ad-slot small {
    color: #888;
}

/* =====================================
 * UTILITIES
 * ===================================== */

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
    font-size: 0.9rem;
    line-height: 1.4;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =====================================
 * MOBILE RESPONSIVENESS - REDESIGNED
 * ===================================== */

/* Tablet and below */
@media (max-width: 991.98px) {
    .currency-hero {
        padding: 80px 0 50px;
        margin-bottom: 30px;
    }

    .currency-hero h1 {
        font-size: 2.4rem;
    }

    .currency-hero p {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .converter-card, .chart-container, .news-container, .market-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .market-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 12px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .currency-hero {
        padding: 70px 0 40px;
        margin-bottom: 25px;
    }

    .currency-hero h1 {
        font-size: 2rem;
        padding: 0 15px;
    }

    .currency-hero p {
        font-size: 1rem;
        padding: 0 15px;
        margin-bottom: 1.5rem;
    }

    .converter-card, .chart-container, .news-container, .market-section {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 10px;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .converter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }

    .converter-title {
        font-size: 1.3rem;
    }

    .last-updated {
        text-align: left;
        font-size: 0.85rem;
    }

    /* Converter body mobile layout */
    .converter-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 15px;
    }

    .swap-btn {
        justify-self: center;
        transform: rotate(90deg);
        margin: 5px 0;
        width: 45px;
        height: 45px;
    }

    .currency-select {
        padding: 10px;
        margin-bottom: 10px;
    }

    .currency-flag {
        width: 28px;
        height: 28px;
        margin-right: 10px;
    }

    .amount-input, .result {
        font-size: 1.3rem;
        padding: 12px;
        min-height: 60px;
    }

    .converter-footer {
        flex-direction: column;
        gap: 8px;
        font-size: 0.85rem;
        margin-top: 15px;
    }

    /* Redesigned Market Tabs for Mobile */
    .market-tabs-container {
        margin-bottom: 15px;
    }

    .market-tabs {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        background: white;
        border: 1px solid #eee;
    }

    .market-tab {
        min-width: auto;
        padding: 12px;
        text-align: left;
        border-radius: 6px;
    }

    .market-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .market-controls {
        justify-content: space-between;
        width: 100%;
    }

    /* Market Grid Mobile Layout */
    .market-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .market-card {
        padding: 16px;
        gap: 10px;
    }

    .asset-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .asset-name {
        font-size: 0.95rem;
    }

    .asset-price {
        font-size: 1.2rem;
    }

    .asset-change {
        align-self: flex-start;
    }

    /* News Mobile Layout */
    .news-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .news-item {
        padding: 16px;
        margin-bottom: 6px;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Ad Slots Mobile */
    .ad-slot {
        padding: 20px 15px;
        min-height: 150px;
    }

    .ad-slot i {
        font-size: 2rem;
        margin-bottom: 12px;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .currency-hero {
        padding: 60px 0 30px;
    }

    .currency-hero h1 {
        font-size: 1.8rem;
        padding: 0 10px;
    }

    .currency-hero p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .converter-card, .chart-container, .news-container, .market-section {
        padding: 15px 12px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .section-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .amount-input, .result {
        font-size: 1.2rem;
        padding: 10px;
        min-height: 55px;
    }

    .swap-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .market-card {
        padding: 14px;
    }

    .refresh-btn {
        padding: 7px 10px;
        font-size: 0.8rem;
    }

    .loading {
        padding: 30px 15px;
        min-height: 150px;
    }

    .loading i {
        font-size: 1.8rem;
    }

    .loading p {
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .currency-hero h1 {
        font-size: 1.6rem;
    }

    .currency-hero p {
        font-size: 0.9rem;
    }

    .converter-card, .chart-container, .news-container, .market-section {
        padding: 12px 10px;
    }

    .section-title {
        font-size: 1rem;
    }

    .market-tab {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* Fix for horizontal overflow */
.container {
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure proper text wrapping */
.asset-name, .news-title, .rate-info span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}



/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .market-tab, .refresh-btn, .refresh-btn-sm, .news-item {
        min-height: 44px;
    }

    .swap-btn, .currency-select select {
        min-width: 44px;
        min-height: 44px;
    }
}
