/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    color: var(--text-color);
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    padding: 0.4rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #3e8e41;
}

.error-message {
    color: var(--error-color);
    padding: 1rem;
    background: rgba(255, 82, 82, 0.1);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.success-message {
    color: var(--success-color);
    padding: 1rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== GLOBAL LINK STYLES - NO UNDERLINES ===== */
a {
    text-decoration: none !important;
    color: inherit;
}

a:hover {
    text-decoration: none !important;
}

/* index file */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #333;
    --text-light: #777;
}

section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    height: 300px;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Product Grid - Fixed spacing and images */

/* Category Filter Section */
.category-filter {
    background: white;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.filter-title {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.category-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-btn {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    color: var(--text-color);
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.category-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-products i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 15px;
}

.no-products h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 15px 25px;
}

/* Product Card - Perfect image fit and spacing */
.product-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
    background: white;
    padding: 10px;
}

.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ff5252;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(0,0,0,0.7);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.product-card:hover .product-actions {
    transform: translateY(0);
}

.quick-view {
    color: white;
    text-decoration: none !important;
    padding: 6px 10px;
    background: var(--primary-color);
    border-radius: 3px;
    font-size: 0.8rem;
}

.quick-view:hover {
    background: #3e8e41;
    text-decoration: none !important;
}

/* Product Details - Compact spacing */
.product-details {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-details h3 {
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    display: -webkit-box;
    -webkit-line-ramp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4em;
    max-height: 2.4em;
}

.price {
    font-weight: 600;
    margin: 0;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    margin-right: 4px;
    font-size: 0.85rem;
}

.discounted-price {
    color: #ff4757;
    font-size: 1.1rem;
}

/* Stock Status - Compact */
.stock-status {
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
}

.in-stock {
    color: #28a745;
}

.low-stock {
    color: #ffc107;
}

.out-of-stock {
    color: #dc3545;
}

.stock-status i {
    margin-right: 3px;
}

/* Add to Cart Button - Fixed spacing */
.add-to-cart {
    width: 100%;
    padding: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 8px;
    font-size: 0.85rem;
}

.add-to-cart:hover {
    background: #3e8e41;
}

.add-to-cart.disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.add-to-cart.disabled:hover {
    background-color: #6c757d;
    transform: none;
}

/* Features Section */
.features {
    background: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item {
    padding: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Newsletter */
.newsletter {
    background: #7b785c;
    color: white;
    text-align: center;
    padding: 3rem 0;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

.newsletter-form button {
    padding: 0 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none !important;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: white;
    text-decoration: none !important;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    text-decoration: none !important;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

/*for footer pages*/
h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* FAQ Styles */
.faq-section {
    margin-bottom: 30px;
}

.faq-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

/* Contact Page Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-form .form-group {
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.contact-form textarea {
    height: 150px;
}

/* ===== SPECIFIC FIXES FOR ALL LINKS ===== */
/* Ensure no links anywhere have underlines */
a, a:link, a:visited, a:hover, a:active, a:focus {
    text-decoration: none !important;
}

/* Specific components that should never show underlines */
.product-card a,
.product-actions a,
.quick-view,
.category-btn,
.footer-column a,
.social-links a,
.navbar a,
.cart-item a,
.remove-item,
.btn {
    text-decoration: none !important;
}

.product-card a:hover,
.product-actions a:hover,
.quick-view:hover,
.category-btn:hover,
.footer-column a:hover,
.social-links a:hover,
.navbar a:hover,
.cart-item a:hover,
.remove-item:hover,
.btn:hover {
    text-decoration: none !important;
}

/* Mobile Responsiveness - Perfect image fit */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    
    .product-image {
        height: 230px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 10px 15px;
    }
    
    .product-card {
        min-height: 320px;
    }
    
    .product-image {
        height: 190px;
    }
    
    .product-image img {
        padding: 8px;
    }
    
    .product-details {
        padding: 10px;
        gap: 3px;
    }
    
    .product-details h3 {
        font-size: 0.85rem;
        min-height: 2.2em;
        max-height: 2.2em;
    }
    
    .discounted-price {
        font-size: 1rem;
    }
    
    .stock-status {
        font-size: 0.75rem;
    }
    
    .add-to-cart {
        padding: 6px;
        font-size: 0.8rem;
        margin-top: 6px;
    }
    
    h1 {
        font-size: 1.6rem;
        margin: 12px 0 18px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 5px 12px;
    }
    
    .product-card {
        min-height: 300px;
    }
    
    .product-image {
        height: 170px;
    }
    
    .product-image img {
        padding: 6px;
    }
    
    .product-details {
        padding: 8px;
        gap: 2px;
    }
    
    .product-details h3 {
        font-size: 0.8rem;
        min-height: 2em;
        max-height: 2em;
    }
    
    .price {
        margin: 0;
    }
    
    .discounted-price {
        font-size: 0.9rem;
    }
    
    .original-price {
        font-size: 0.75rem;
    }
    
    .stock-status {
        font-size: 0.7rem;
    }
    
    .add-to-cart {
        padding: 5px;
        font-size: 0.75rem;
        margin-top: 4px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 4px;
        margin-bottom: 8px;
    }
    
    .newsletter-form button {
        border-radius: 4px;
        padding: 0.7rem;
    }
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0 3px 10px;
    }
    
    .product-card {
        min-height: 280px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-image img {
        padding: 4px;
    }
    
    .product-details h3 {
        font-size: 0.75rem;
        min-height: 1.8em;
        max-height: 1.8em;
    }
    
    .add-to-cart {
        font-size: 0.7rem;
        padding: 4px;
        margin-top: 3px;
    }
    
    .stock-status {
        margin: 0;
    }
}