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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    background: #f7fafc;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.language-selector {
    display: flex;
    justify-content: flex-end;
}

.language-selector select {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #4a5568;
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
    padding: 0.5rem 0.75rem;
    min-width: 120px;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    border-color: #4299e1;
}

.language-selector select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Brand Styles */
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.logo-placeholder {
    background: #4299e1;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo {
    height: 50px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

.company-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Search Styles */
.search-container {
    display: flex;
    align-items: center;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-container:focus-within {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
}

.search-btn {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: #3182ce;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Cart Icon */
.cart-icon-btn {
    position: relative;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

.cart-icon-btn:hover {
    border-color: #4299e1;
    background: #ebf8ff;
    color: #4299e1;
    transform: scale(1.05);
}

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

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

/* Auth Buttons */
.auth-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #4299e1;
    color: white;
}

.btn-primary:hover {
    background: #3182ce;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.btn-outline:hover {
    background: #4299e1;
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
}

/* Navigation Styles */
.nav {
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    padding: 1rem 0;
}

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

.nav-link {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #4299e1;
    border-radius: 2px;
}

/* Main Content */
.main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* Products Section */
.products-section {
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Product Card Styles */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

.product-image svg {
    width: 100%;
    height: auto;
    display: block;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #e53e3e;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.price-original {
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 0.95rem;
}

.price-offer {
    color: #2d3748;
    font-size: 1.25rem;
    font-weight: 700;
}

.product-btn {
    width: 100%;
    justify-content: center;
}

/* Footer Styles */
.footer {
    background: #2d3748;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4299e1;
}

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

.social-link {
    color: #a0aec0;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #4299e1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
    font-size: 0.875rem;
}

/* Responsive Design - Mobile First */

/* Tablet styles */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }

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

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-container {
        min-width: 300px;
    }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .search-container {
        min-width: 400px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

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

.modal-content {
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    color: #2d3748;
    font-size: 1.375rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.modal-form {
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-group input:invalid {
    border-color: #e53e3e;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem;
}

.form-actions .btn-outline {
    font-size: 0.875rem;
    color: #718096;
    border-color: #e2e8f0;
}

.form-actions .btn-outline:hover {
    color: #4299e1;
    border-color: #4299e1;
    background: transparent;
}

/* Mobile Modal Adjustments */
@media (max-width: 480px) {
    .modal {
        width: 95%;
        margin: 1rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-form {
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }
}

/* Auth button states */
.auth-buttons .btn-primary.user-logged-in {
    background: #38a169;
    color: white;
}

.auth-buttons .btn-primary.user-logged-in:hover {
    background: #2f855a;
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Cart Modal Styles */
.cart-content {
    max-height: 70vh;
    overflow-y: auto;
}

.cart-items {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f7fafc;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #4299e1;
    font-weight: 500;
    font-size: 0.85rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.quantity-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background: #f7fafc;
}

.quantity-input {
    border: none;
    width: 40px;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.875rem;
    background: transparent;
}

.remove-item {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.remove-item:hover {
    background: #feb2b2;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
}

.cart-summary {
    padding: 1.5rem;
    background: #f8fafc;
}

.cart-totals {
    margin-bottom: 1.5rem;
}

.cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-row:last-child {
    border-bottom: none;
}

.cart-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
    border-top: 2px solid #4299e1;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Checkout Modal Styles */
.checkout-modal .modal-content {
    max-width: 800px;
    width: 95%;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
}

.checkout-summary {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.checkout-items {
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-name {
    flex: 1;
    color: #4a5568;
}

.checkout-item-quantity {
    color: #718096;
    margin: 0 0.5rem;
}

.checkout-item-price {
    color: #2d3748;
    font-weight: 500;
}

.checkout-totals {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.checkout-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
    border-top: 2px solid #4299e1;
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.payment-methods h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.payment-btn:hover {
    border-color: #4299e1;
    background: #f7fafc;
}

.paypal-btn {
    color: #0070ba;
}

.paypal-btn:hover {
    border-color: #0070ba;
    background: #f0f8ff;
}

.stripe-btn {
    color: #635bff;
}

.stripe-btn:hover {
    border-color: #635bff;
    background: #f8f7ff;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .cart-item-controls {
        justify-content: center;
    }
}

/* Mobile menu styles */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
    }

    .header-main {
        flex-wrap: wrap;
    }

    .brand {
        order: 1;
    }

    .mobile-menu-toggle {
        order: 2;
    }

    .search-container {
        order: 3;
        width: 100%;
        max-width: none;
        min-width: auto;
        margin-top: 1rem;
    }

    .header-actions {
        order: 4;
        width: 100%;
        justify-content: space-between;
        margin-top: 1rem;
    }

    .auth-buttons {
        flex: 1;
        margin-left: 1rem;
    }

    .nav {
        display: none;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-link {
        display: block;
        text-align: center;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
    }

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

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

    .company-name {
        font-size: 1rem;
    }

    .logo-placeholder {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    .logo {
        height: 40px;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

    .products-grid {
        gap: 1.5rem;
    }

    .product-info {
        padding: 1rem;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
    }
}

/* Blog Specific Styles */
.blog-card .product-image img {
    height: 250px;
    object-fit: cover;
}

.blog-date {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(66, 153, 225, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.blog-excerpt {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #a0aec0;
}

.blog-category {
    background: #f7fafc;
    color: #4299e1;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.blog-read-time::before {
    content: "📖 ";
    margin-right: 0.25rem;
}

/* Blog hover effects */
.blog-card:hover .blog-date {
    background: rgba(66, 153, 225, 1);
    transform: scale(1.05);
}

/* Full Article View Styles - Responsive Optimized */
.full-article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-to-blog {
    font-size: 0.875rem;
    flex-shrink: 0;
}

.article-meta-top {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: #718096;
    flex-wrap: wrap;
}

.article-date {
    color: #4299e1;
    font-weight: 500;
}

.article-category {
    background: #f7fafc;
    color: #4299e1;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.article-read-time::before {
    content: "📖 ";
    margin-right: 0.25rem;
}

.article-title-section {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.article-main-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-main-excerpt {
    font-size: 1.375rem;
    color: #718096;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.article-image {
    margin-bottom: 3rem;
    text-align: center;
}

.article-image img {
    width: 100%;
    max-width: 800px;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #4a5568;
    max-width: 750px;
    margin: 0 auto;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 3rem 0 1.5rem;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2.5rem 0 1rem;
    line-height: 1.4;
}

.article-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-body ul,
.article-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

/* Blog Grid Improvements */
.products-grid.blog-grid {
    grid-template-columns: 1fr;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .products-grid.blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .products-grid.blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile responsive for articles */
@media (max-width: 768px) {
    .full-article-container {
        padding: 1rem 0.5rem;
    }

    .article-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .article-main-title {
        font-size: 2rem;
        text-align: left;
    }

    .article-main-excerpt {
        font-size: 1.125rem;
        text-align: left;
    }

    .article-image img {
        height: 250px;
    }

    .article-body {
        font-size: 1rem;
        line-height: 1.7;
    }

    .article-body h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }

    .article-body h3 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
    }

    .article-meta-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .article-main-title {
        font-size: 1.75rem;
    }

    .article-main-excerpt {
        font-size: 1rem;
    }

    .article-body {
        font-size: 0.95rem;
    }
}

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

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

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}

.product-card:nth-child(7) {
    animation-delay: 0.7s;
}

.product-card:nth-child(8) {
    animation-delay: 0.8s;
}

/* Focus styles for accessibility */
.btn:focus,
.search-input:focus,
.nav-link:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #2d3748;
    }

    .btn-outline {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .product-card {
        animation: none;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] .header-main {
    flex-direction: row-reverse;
}

[dir="rtl"] .brand {
    flex-direction: row-reverse;
}

[dir="rtl"] .search-container {
    direction: ltr;
    /* Keep search input LTR for better UX */
}

[dir="rtl"] .auth-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-list {
    direction: rtl;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}

[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .product-badge {
    right: auto;
    left: 1rem;
}

[dir="rtl"] .language-selector {
    justify-content: flex-start;
}

/* Language selector improvements */
.language-selector select option {
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* Order Confirmation Styles */
.order-confirmation {
    padding: 2rem;
}

.confirmation-icon {
    margin-bottom: 1.5rem;
}

.order-confirmation h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.order-confirmation p {
    color: #718096;
    margin-bottom: 2rem;
}

.order-details {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.order-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.order-row:last-child {
    border-bottom: none;
}

/* Product Actions Styles */
.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn i {
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .product-actions {
        flex-direction: row;
    }

    .product-actions .btn {
        flex: 1;
    }
}

/* Product Details Modal */
.product-details-modal .modal-content {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

.product-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
}

.product-gallery {
    text-align: center;
}

.product-main-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-info-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
}

.product-pricing {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-original-large {
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 1.25rem;
}

.price-offer-large {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
}

.discount-badge-large {
    background: #e53e3e;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-description,
.product-specifications {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.product-description h3,
.product-specifications h3 {
    color: #2d3748;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.product-description p,
.product-specifications ul {
    color: #4a5568;
    line-height: 1.6;
}

.product-specifications ul {
    list-style: none;
    padding: 0;
}

.product-specifications li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f7fafc;
    display: flex;
    justify-content: space-between;
}

.product-specifications li:last-child {
    border-bottom: none;
}

.product-actions-detailed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-selector label {
    font-weight: 500;
    color: #4a5568;
}

.add-to-cart-detailed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.related-article {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

.related-article h3 {
    color: #2d3748;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.article-preview {
    display: flex;
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.article-preview-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.article-preview-content {
    flex: 1;
}

.article-preview-content h4 {
    color: #2d3748;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-preview-content p {
    color: #718096;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .product-details-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .product-main-image {
        max-height: 300px;
    }

    .product-detail-title {
        font-size: 1.5rem;
    }

    .price-offer-large {
        font-size: 1.5rem;
    }

    .article-preview {
        flex-direction: column;
        text-align: center;
    }

    .article-preview-image {
        width: 100%;
        height: 150px;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 18px;
    border: 1px solid var(--border-color, #e0e0e0);
    background-color: white;
    color: var(--text-dark, #333);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-btn:hover {
    border-color: var(--primary-color, #4a90e2);
    color: var(--primary-color, #4a90e2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pagination-btn.active {
    background-color: var(--primary-color, #4a90e2);
    color: white;
    border-color: var(--primary-color, #4a90e2);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.pagination-btn:disabled {
    background-color: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
    transform: none;
    box-shadow: none;
}