:root {
    --primary-color: #2c5e50; /* Deep River Green */
    --secondary-color: #3498db; /* River Blue */
    --accent-color: #1abc9c; /* Aqua */
    --earth-tone: #8d6e63; /* Earthy Brown */
    --bg-light: #f4f7f6;
    --text-dark: #2c3e50;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

.loader-progress-container {
    width: 200px;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.loader-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.page-loader h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
}
.page-loader h3 {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.brand-name {
    font-family: 'Playfair Display', serif;
}

/* Top Bar Styling */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: transparent;
    box-shadow: none;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.top-bar .profile-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 1px 4px rgba(255,255,255,0.6), 0 1px 3px rgba(0,0,0,0.25);
}

/* Make the brand + cart icon readable over the transparent bar / dark hero */
.top-bar .brand-name {
    text-shadow: 0 1px 4px rgba(255,255,255,0.7), 0 1px 3px rgba(0,0,0,0.25);
}
.top-bar .cart-badge {
    text-shadow: none;
}

/* Sidebar Styling (Desktop) */
.sidebar {
    width: 250px;
    height: calc(100vh - 60px); /* Ends at the top bar (Fish Nam) */
    position: fixed;
    left: 0;
    top: 60px; /* Start below the top bar (Fish Nam) */
    background: var(--primary-color);
    color: white;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Main Content Adjustment for Top Bar */
.main-content {
    padding-top: 60px;
}

/* Sidebar Ad Container - fills the whole sidebar so the ad is as large as
   possible while never exceeding the sidebar bounds */
.sidebar-ad-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    padding: 8px 8px;
    text-align: center;
}
.sidebar-ad-container .carousel,
.sidebar-ad-container .carousel-item {
    width: 100%;
    height: 100%;
}
.sidebar-ad-container .carousel-inner {
    height: 100%;
}
.sidebar-ad-container .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}
.sidebar-ad-container .carousel-item img:hover {
    transform: scale(1.02);
}

/* Sidebar brand / nav / footer layout */
.sidebar-brand {
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 4px;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
}
.sidebar-footer {
    flex-shrink: 0;
    padding: 6px 0 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Sidebar brand name (smaller, tighter than the top-bar brand) */
.sidebar .brand-name {
    color: var(--accent-color);
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.loader-fish {
    font-size: 3rem;
    color: var(--primary-color);
    animation: swim 2s infinite ease-in-out;
}
@keyframes swim {
    0%, 100% { transform: translateX(-20px) rotateY(0deg); }
    50% { transform: translateX(20px) rotateY(180deg); }
}

.brand-name {
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 991.98px) {
    .brand-name {
        font-size: 1.2rem;
    }
}

.cart-btn-remove {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}
.cart-btn-remove:hover {
    background-color: #c82333 !important;
}

/* About & Delivery Section Enhancement */
.about-card, .delivery-card {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 35px;
    height: 100%;
    transition: transform 0.3s ease;
    background: white;
}

.about-card:hover, .delivery-card:hover {
    transform: translateY(-5px);
}

.about-card h2, .delivery-card h3 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.about-card h2::after, .delivery-card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item-box {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #eee;
}

.info-item-box i {
    font-size: 1.5rem;
    margin-right: 15px;
}

.info-item-box.full-width {
    grid-column: 1 / -1;
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.delivery-card {
    background: var(--primary-color) !important;
    color: white !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Delivery + Advertising section: 90% width, responsive with the sidebar */
.delivery-wrapper-90 {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.delivery-tile {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
    min-height: 72px;
    transition: transform 0.25s ease, background 0.25s ease;
}
.delivery-tile:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
}

.advert-card {
    background: #fff;
    border: 1px solid rgba(44, 62, 80, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

.advert-plan {
    background: #f4f7f6;
    border-radius: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(44, 62, 80, 0.1);
}
.advert-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.advert-price .amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}
.advert-price .per {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}
.advert-desc {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--text-dark);
}

@media (max-width: 991.98px) {
    .delivery-wrapper-90 {
        width: 100%;
    }
    .delivery-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .delivery-tile {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .delivery-tile .icon-circle {
        margin-right: 0;
    }
}

.delivery-card h3, 
.delivery-card span, 
.delivery-card strong,
.delivery-card i {
    color: white !important;
}

.delivery-list-new li {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.delivery-list-new .icon-circle {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.delivery-list-new .icon-circle i {
    font-size: 1.2rem;
}

.carousel-item img {
    height: 70vh;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.4);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .carousel-item img {
        height: 50vh;
    }
    .carousel-caption {
        left: 5%;
        right: 5%;
        bottom: 10%;
        padding: 15px;
    }
    .carousel-caption h2 {
        font-size: 1.8rem;
    }
}

/* Login/Signup Portal */
.auth-container {
    max-width: 450px;
    margin: 100px auto;
}

@media (max-width: 991.98px) {
    .sidebar { display: none !important; }
    .main-content { margin-left: 0 !important; }
}


.sidebar.collapsed {
    width: 0;
    border-right: none;
    overflow: hidden;
}

.sidebar.collapsed .brand-name {
    font-size: 1rem;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .admin-label {
    display: none;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.2rem;
}

.sidebar .nav-link {
    color: #ecf0f1;
    padding: 12px 20px;
    border-radius: 5px;
    margin: 5px 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    margin: 5px;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

/* Main Content Area */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        margin-bottom: 70px; /* Space for bottom nav */
    }
}

/* Custom Animations */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Woodland River Elements */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/natural-paper.png');
    opacity: 0.2;
}

.card {
    border-radius: 12px;
    border: none;
    transition: 0.3s;
}

.card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #ddd;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(26, 188, 156, 0.25);
}

/* WhatsApp Button Pulse */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-success {
    background-color: #25d366;
    border: none;
}

.btn-success:hover {
    background-color: #128c7e;
    animation: pulse 1s infinite;
}


.btn-primary {
    background-color: var(--accent-color);
    border: none;
}

.btn-primary:hover {
    background-color: #16a085;
}

/* Fish Cards */
.fish-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.fish-card:hover {
    transform: translateY(-10px);
}

.fish-card img {
    height: 200px;
    object-fit: cover;
}

/* Speed up long product lists: skip off-screen rendering work */
.fish-item, .import-fish-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 380px;
}

.price-tag {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Delivery Rules Box */
.delivery-rules {
    background: #e8f5e9;
    border-left: 5px solid var(--primary-color);
}

/* ============ FLOATING GLASS NAVIGATION ============ */
/* Desktop: centered pill nav on the same line as the top bar (Fish Nam) */
.float-nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 4px;
    padding: 0 12px;
    background: rgba(44, 62, 80, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 60px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    font-family: 'Montserrat', sans-serif;
}

.float-nav .float-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 40px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: transparent;
    transition: all 0.25s ease;
}

.float-nav .float-link i {
    font-size: 0.9rem;
}

.float-nav .float-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.float-nav .float-link.active {
    color: #fff;
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hide desktop floating nav on mobile */
@media (max-width: 991.98px) {
    .float-nav { display: none; }
}

/* Mobile: floating glass pill bottom bar */
.float-bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 4px;
    width: calc(100% - 32px);
    max-width: 520px;
    padding: 10px 12px;
    background: rgba(44, 62, 80, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 40px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-family: 'Montserrat', sans-serif;
}

.float-bottom-nav .float-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 30px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border: none;
    background: transparent;
    transition: all 0.25s ease;
    min-width: 58px;
}

.float-bottom-nav .float-link i {
    font-size: 1.1rem;
}

.float-bottom-nav .float-link small {
    font-size: 0.66rem;
    line-height: 1;
}

.float-bottom-nav .float-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.float-bottom-nav .float-link.active {
    color: #fff;
    background: #fff;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hide mobile floating bar on desktop */
@media (min-width: 992px) {
    .float-bottom-nav { display: none; }
}

/* Adjust main content: offset for the restored sidebar (250px) */
.main-content {
    margin-left: 250px;
}

/* Main content padding: top bar + desktop floating nav are on the same line (60px) */
.main-content {
    padding-top: 60px;
}

/* Homepage: hero starts right below the top bar so the floating nav overlaps the banner */
body.home-page .main-content {
    padding-top: 60px;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding-top: 70px;
        margin-bottom: 96px; /* Space for floating bottom nav */
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

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

/* Import Page Styles */
.import-fish-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
}
.import-fish-card:hover {
    transform: translateY(-8px);
}
.import-fish-card img {
    height: 200px;
    object-fit: cover;
}

.import-order-summary {
    position: sticky;
    top: 80px;
}

.import-order-summary .card-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.import-origin-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    z-index: 5;
}

.import-stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 5;
}

.terms-box {
    max-height: 250px;
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    white-space: pre-wrap;
}
