/* Modern Professional E-commerce Styles - Afrexo Trading */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Professional Color Palette */
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --secondary-color: #1a2332;
    --accent-color: #00b4d8;
    --text-color: #2d3748;
    --text-light: #718096;
    --light-gray: #f7fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background: var(--white);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Modern Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Modern Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transition: var(--transition);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* Modern Hero Section */
/* Modern Hero Section */
.hero {
    height: 60vh;
    /* Reduced from 100vh */
    min-height: 500px;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.15), transparent 60%),
        linear-gradient(135deg, var(--secondary-color) 0%, #0f1621 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
    /* Account for fixed navbar */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.15), transparent 70%);
    pointer-events: none;
}

body:not(.home-page) .hero,
.categories .hero,
.category-page .hero {
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.15), transparent 60%),
        linear-gradient(135deg, var(--secondary-color) 0%, #0f1621 100%);
    height: 40vh;
    /* Even smaller for inner pages */
    min-height: 350px;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
    padding: 0 20px;
}

.hero-title {
    font-size: 4.5rem;
    /* Larger, more impactful */
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* Cleaner shadow */
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.6rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.95);
    /* High contrast white */
    animation: fadeInUp 0.8s ease 0.2s both;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero .btn-outline:hover {
    background: white;
    color: var(--secondary-color);
}

.hero .btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
    /* Navy text for better contrast */
    border: none;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    font-weight: 700;
    padding: 14px 35px;
    /* Slightly larger padding */
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
    flex-wrap: wrap;
}

/* Section Styles */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.about-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.about-image img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 12px;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat h4 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
}

/* Modern Product Grid - Smaller Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    z-index: 10;
}

.product-card-link:hover .product-card {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.product-image {
    height: 180px;
    overflow: hidden;
    position: relative;
    background: var(--light-gray);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.out-of-stock {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.product-info {
    padding: 1.25rem;
}

.product-info h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.price-section {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.retail-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.supermarket-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.wholesale-price {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    font-weight: 500;
}

.buy-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: auto;
}

.buy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.buy-btn:disabled {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
    cursor: not-allowed;
    opacity: 0.7;
}

.product-info ul {
    list-style: none;
    margin-top: 1rem;
}

.product-info ul li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.product-info ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Index Page Category Sections */
.category-section {
    margin-bottom: 100px;
    padding: 50px 0;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-header h2 {
    color: var(--secondary-color);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.category-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.view-all-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
}

.view-all-btn i {
    margin-left: 8px;
}

.category-products-grid {
    margin-bottom: 24px;
}

.category-products-grid .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* Services Section */
.services {
    background: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info h3,
.contact-form h3 {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 4px;
}

.contact-form {
    background: var(--light-gray);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Modern Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.social-links a:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom .far.fa-heart.text-danger {
    color: #ef4444 !important;
}

.footer-bottom a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Loading Screen */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-animation {
    display: flex;
    gap: 8px;
}

.letter {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bounce 1s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 968px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    h2 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .product-image {
        height: 140px;
    }

    .product-info {
        padding: 1rem;
    }

    .product-info h3 {
        font-size: 0.9rem;
    }

    .product-info p {
        font-size: 0.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}