/* Frontend E-commerce Styles */

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1001;
    position: relative;
}

.cart-link {
    position: relative;
    color: white !important;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.cart-link:hover {
    color: #ffc107 !important;
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 20px;
}

.cart-count.empty {
    display: none;
}

.nav-brand a i {
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
    list-style-type: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem !important;
    color: #333 !important;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s, padding-left 0.2s !important;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: var(--primary-color) !important;
    padding-left: 2rem !important;
    opacity: 1;
}

/* Submenu */
.dropdown-menu li {
    position: relative;
}

.dropdown-submenu {
    position: absolute !important;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid #eee;
    display: none !important;
    padding: 0.5rem 0 !important;
    z-index: 1001;
}

.dropdown-menu li:hover > .dropdown-submenu {
    display: block !important;
}

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

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 50vh;
    display: flex;
    align-items: center;
    margin-top: 80px;
}

.hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.hero-content h1 {
    font-size: 2.25rem;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

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

.hero-image {
    font-size: 10rem;
    color: rgba(255,255,255,0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Categories Section */
.categories {
    padding: 3rem 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.category-card:hover,
.category-card:focus,
.category-card:visited,
.category-card:active {
    text-decoration: none !important;
    color: inherit !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.category-card h3,
.category-card p {
    color: inherit !important;
}

.category-card i {
    font-size: 3rem;
    color: #667eea !important;
    margin-bottom: 1rem;
}

.category-card:hover h3,
.category-card:hover p {
    color: inherit !important;
}

.category-card:hover i {
    color: #667eea !important;
}

.category-card h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.category-card p {
    color: #666;
}

/* Products Section */
.products {
    padding: 3rem 0;
}

.products h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.product-badge.hot {
    background: #ff6b6b;
}

.product-badge.bestseller {
    background: #28a745;
}

.product-badge.new {
    background: #007bff;
}

.product-badge.2nd-hand {
    background: #6c757d;
    color: white;
}

.product-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.product-desc {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.product-rating span {
    color: #666;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.features-section .section-header h2 {
    color: white;
}

.features-section .section-header p {
    color: rgba(255,255,255,0.9);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s, background 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.15);
}

.feature-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.feature-card p {
    color: rgba(255,255,255,0.8);
}

/* Categories Page Styles */
.categories-page {
    padding: 8rem 0 5rem;
}

.category-header {
    text-align: center;
    margin-bottom: 4rem;
}

.category-header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.category-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.category-card-link {
    text-decoration: none;
    color: inherit;
}

.category-card-link:hover .category-card {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.category-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.category-products-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin: 0;
}

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-products i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-products p {
    font-size: 1.2rem;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

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

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

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

.footer-section a:hover {
    color: white;
}

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

/* Products Page Styles */
.products-page {
    padding: 8rem 0 5rem;
}

.products-header {
    text-align: center;
    margin-bottom: 3rem;
}

.products-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 1rem;
    min-width: 150px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.product-badge.hot {
    background: #ff6b6b;
}

.product-badge.bestseller {
    background: #28a745;
}

.product-badge.new {
    background: #007bff;
}

.product-badge.2nd-hand {
    background: #6c757d;
    color: white;
}

.product-image {
    height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    position: relative;
}

.product-info {
    padding: 1rem;
}

.product-info h3 {
    font-size: 0.95rem; /* Made slightly smaller for the dense grid */
    color: #0f172a;
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
}

.product-desc {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.55rem; /* line-height * 1.5 = ~3 lines max if clamp fails, but specifically 2 lines for this height */
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.product-rating span {
    color: #666;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination .btn {
    min-width: 50px;
}

/* Active nav link */
.nav-menu a.active {
    color: #ffc107;
    font-weight: bold;
}

/* About Page Styles */
.about-page {
    padding: 8rem 0 5rem;
}

.about-header {
    text-align: center;
    margin-bottom: 4rem;
}

.about-header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.about-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1rem;
}

.about-image {
    text-align: center;
    font-size: 10rem;
    color: #667eea;
    opacity: 0.3;
}

.features-section {
    margin-bottom: 4rem;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
}

.stats-section {
    margin-bottom: 4rem;
}

.stats-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 3rem;
}

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

.stat-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.team-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 3rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-member {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.team-member h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.team-member p {
    color: #666;
    margin-bottom: 1rem;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.member-social a {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.3s;
}

.member-social a:hover {
    background: #764ba2;
}

/* Contact Page Styles */
.contact-page {
    padding: 8rem 0 5rem;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-header h1 {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.contact-header p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid #c3e6cb;
}

.success-message i {
    margin-right: 0.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.contact-info h2,
.contact-form h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-top: 0.25rem;
    min-width: 30px;
}

.contact-item h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    margin-bottom: 0.25rem;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.map-section {
    text-align: center;
    margin-bottom: 4rem;
}

.map-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
}

.map-placeholder {
    height: 400px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
}

.map-placeholder i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.map-placeholder p {
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

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

    .hamburger {
        display: flex;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-image {
        font-size: 8rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .category-grid,
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .categories h2,
    .products h2 {
        font-size: 2rem;
    }
}
