:root {
    --primary-color: #e67e22;
    --secondary-color: #2c3e50;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
    transition: var(--transition);
}

body.dark-mode {
    background: #1a1a2e;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Top Header */

.top-header {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.social-icons a {
    color: #fff;
    margin-right: 15px;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.contact-info span {
    margin-left: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: var(--primary-color);
}


/* Main Header */

.main-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.dark-mode .main-header {
    background: #16213e;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.logo img {
    max-height: 50px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar form {
    display: flex;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px 0 0 25px;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar button:hover {
    background: #d35400;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-actions a {
    color: var(--text-color);
    font-size: 20px;
    position: relative;
    transition: var(--transition);
}

body.dark-mode .header-actions a {
    color: #fff;
}

.header-actions a:hover {
    color: var(--primary-color);
}

.count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.dark-mode-toggle,
.mobile-menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-color);
}

body.dark-mode .dark-mode-toggle,
body.dark-mode .mobile-menu-toggle {
    color: #fff;
}


/* Navigation Menu */

.nav-menu {
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

body.dark-mode .nav-menu {
    background: #0f3460;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px 0;
}

.nav-menu ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

body.dark-mode .nav-menu ul li a {
    color: #fff;
}

.nav-menu ul li a:hover {
    color: var(--primary-color);
}

.nav-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu ul li a:hover::after {
    width: 100%;
}


/* Hero Slider */

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.slide-bg {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.slide-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.slide-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
    padding-top: 200px;
}

.slide-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.3s both;
}

.slide-content .btn {
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}


/* Sections */

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background: var(--light-color);
}

body.dark-mode .bg-light {
    background: #0f3460;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.section-header p {
    color: var(--text-light);
    font-size: 16px;
}


/* Categories Grid */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.category-card {
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-card h3 {
    font-size: 18px;
    margin-top: 10px;
}

.category-card a {
    text-decoration: none;
    color: var(--text-color);
}


/* Products Grid */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

body.dark-mode .product-card {
    background: #16213e;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.product-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.product-actions button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.product-actions button:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-info h3 a {
    text-decoration: none;
    color: var(--text-color);
}

body.dark-mode .product-info h3 a {
    color: #fff;
}

.product-price {
    margin-bottom: 15px;
}

.current-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.old-price {
    font-size: 14px;
    text-decoration: line-through;
    color: var(--text-light);
    margin-left: 10px;
}

.btn-add-to-cart {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
}

.btn-add-to-cart:hover {
    background: #d35400;
}

.btn-whatsapp-order {
    width: 100%;
    padding: 10px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-whatsapp-order:hover {
    background: #128C7E;
}


/* Promo Banner */

.promo-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.banner-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 25px;
}


/* Testimonials */

.testimonial-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

body.dark-mode .testimonial-card {
    background: #16213e;
}

.testimonial-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-rating {
    margin-bottom: 15px;
}

.testimonial-rating i {
    color: #ddd;
    margin: 0 2px;
}

.testimonial-rating i.active {
    color: #ffc107;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-card h4 {
    font-size: 18px;
    margin-bottom: 5px;
}

.testimonial-position {
    color: var(--text-light);
    font-size: 14px;
}


/* Newsletter */

.newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.newsletter-wrapper {
    text-align: center;
}

.newsletter h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.newsletter p {
    margin-bottom: 25px;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
}

.newsletter-form button {
    padding: 15px 30px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: #1a252f;
}


/* Brand Partners */

.brands-slider {
    padding: 20px 0;
}

.brand-logo {
    text-align: center;
    padding: 20px;
}

.brand-logo img {
    max-width: 150px;
    max-height: 80px;
    filter: grayscale(100%);
    transition: var(--transition);
}

.brand-logo img:hover {
    filter: grayscale(0);
}


/* Blog Section */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .blog-card {
    background: #16213e;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image {
    height: 250px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image img {
    transform: scale(1.1);
}

.blog-content {
    padding: 20px;
}

.blog-content h3 {
    margin-bottom: 10px;
}

.blog-content h3 a {
    text-decoration: none;
    color: var(--text-color);
}

body.dark-mode .blog-content h3 a {
    color: #fff;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}


/* Footer */

.footer {
    background: var(--secondary-color);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    max-height: 50px;
    margin-bottom: 15px;
}

.footer-about p {
    margin: 15px 0;
    line-height: 1.8;
}

.footer-social a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: center;
    line-height: 35px;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}


/* Modal */

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    max-height: 90%;
    overflow-y: auto;
}

body.dark-mode .modal-content {
    background: #16213e;
    color: #fff;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
}


/* Toast Notification */

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #fff;
    color: #333;
    border-radius: 5px;
    box-shadow: var(--shadow);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: var(--success-color);
    color: #fff;
}

.toast.error {
    background: var(--danger-color);
    color: #fff;
}


/* Animations */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Loading Spinner */

.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================
   BACK TO TOP BUTTON - COMPLETE CSS
   ============================================ */


/* Back to Top Button Container */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* Show button when visible class is added */

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}


/* Button Link */

.back-to-top a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}


/* Hover Effect */

.back-to-top a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c0 100%);
}


/* Active/Click Effect */

.back-to-top a:active {
    transform: translateY(-2px);
}


/* Icon Styling */

.back-to-top i {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.back-to-top a:hover i {
    transform: translateY(-3px);
}


/* Ripple Effect on Click */

.back-to-top a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.back-to-top a:active::before {
    width: 120px;
    height: 120px;
}


/* Tooltip on Hover (Optional) */

.back-to-top a::after {
    content: 'Back to Top';
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #2d3748;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: inherit;
}

.back-to-top a:hover::after {
    opacity: 1;
    visibility: visible;
    right: 65px;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */


/* Tablet View */

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
    .back-to-top a {
        width: 45px;
        height: 45px;
    }
    .back-to-top i {
        font-size: 18px;
    }
    /* Hide tooltip on mobile */
    .back-to-top a::after {
        display: none;
    }
}


/* Mobile View */

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
    }
    .back-to-top a {
        width: 42px;
        height: 42px;
    }
    .back-to-top i {
        font-size: 16px;
    }
}


/* Smooth scrolling for the whole page */

html {
    scroll-behavior: smooth;
}