/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Features container with flexible wrapping on small screens */
.features-container {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    /* allow wrapping for responsiveness */
}

.features-image {
    max-width: 180px;
    width: 100%;
    /* make images flexible */
    border-radius: 8px;
    object-fit: cover;
}

/* Header styles */
.header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    width: 100%;
    top: 100;
    z-index: 999;
}


#header.hide {
    top: -10px;
    /* or negative height of your header */
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* wrap on small screens */
}

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

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.logo-text h1 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 0.75rem;
    color: #666;
}

/* Cart button styles */
.cart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    transition: transform 0.2s;
}

.cart-btn:hover {
    transform: translateY(-2px);
}

/* Cart badge position */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Container for main content */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    /* optional: center text on small screens */
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filters button group */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    /* allow wrapping on small screens */
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    background: white;
    color: #333;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Products grid with flexible column sizes */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.product-card p {
    color: #666;
    margin-bottom: 1rem;
    flex-grow: 1;
    /* flexible description area */
}

.price {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* Features list with flexible layout */
.features {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.features li {
    padding: 0.5rem 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
}

/* Add to cart button styling */
.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.add-to-cart-btn:hover {
    transform: scale(1.02);
}

/* Modal overlay styles; will adapt to small screens naturally */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    /* smaller padding on small screens if needed */
}

.modal.active {
    display: flex;
}

/* Modal content box */
.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

/* Additional modal styles omitted for brevity... */

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 2rem;
}

.cart-item {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: #667eea;
    font-weight: bold;
}

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

.qty-btn {
    background: #e5e7eb;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
}

.cart-total {
    border-top: 2px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}


.payment-methods {
    margin: 2rem 0;
}

.payment-methods h3 {
    margin-bottom: 1rem;
    color: #333;
}

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

.payment-option {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    background: white;
}

.payment-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.payment-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.payment-option img {
    width: 30px;
    height: 20px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.payment-option span {
    display: block;
    font-weight: 600;
    color: #333;
}

.checkout-form {
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1rem;
}

.success-screen {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 3rem;
}

.license-key {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.license-key h4 {
    margin-bottom: 1rem;
}

.key-code {
    background: white;
    color: #667eea;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.copy-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 0.5rem;
}

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

.hidden {
    display: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {

    /* Stack header elements vertically */
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .logo-text {
        text-align: center;
        padding: 0;
    }

    #language-switcher {
        margin: auto;
    }



    /* Make grid single-column on small screens */
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* Reduce hero font size for smaller screens */
    .hero h2 {
        font-size: 2rem;
    }

    /* Stack filter buttons */
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    /* Features container stacks vertically */
    .features-container {
        flex-direction: column;
        align-items: center;
    }

    /* Optional: Adjust padding/margins for smaller screens globally */
    body {
        padding: 1rem;
    }
}



footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 15px;
}

.footer-links li {
    display: inline;
    margin: 0 10px;
}

.footer-links li a {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #764ba2;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
}

.footer-links li a:hover {
    background-color: #5245ca;
    transform: scale(1.05);
}



/* Style for the language switcher container */
#language-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

/* Style for the buttons */
#language-switcher button {
    padding: 8px 16px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background-color: #4b388f;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

/* Hover effect for buttons */
#language-switcher button:hover {
    background-color: #764ba2;
    transform: scale(1.05);
}

/* Optional: active button style */
#language-switcher button:focus {
    outline: none;
    box-shadow: 0 0 5px #333;
}

/* Style for headings or other text elements if needed */
h1,
h2 {
    text-align: center;
    font-family: Arial, sans-serif;
}



/* Style for the currency-switcher container */

/* Container styling */
.currency-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: #cccccc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
}

/* Label styling */
.currency-switcher label {
    font-weight: bold;
    font-size: 1rem;
    color: #333;
}

/* Select styling */
#currencySelect {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

/* Add hover and focus effects */
#currencySelect:hover {
    border-color: #999;
}

#currencySelect:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Default: LTR layout */
#currencySwitcher {
    display: flex;
    flex-direction: row;
    /* label on left, select on right */
    align-items: center;
    gap: 7px;
}

/* RTL layout (when Arabic) */
#currencySwitcher.rtl {
    flex-direction: row-reverse;
    /* label on right, select on left */
}

/* description floats to left when ar is selected */
.product-card.rtl {
    direction: rtl;
    text-align: right;
}


.cart-item-price {
    color: green;
}



/* Styling the payment methods bar */
.payment-ways {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border-radius: 10px;
    background-color: #575758;
}

/* Style for images */
.payment-ways img {
    width: 50px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s;
}

.payment-ways img:hover {
    transform: scale(1.1);
}


/* Categories */

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s;
    text-transform: capitalize;
}

.filter-btn:hover {
    background: #f0f0f0;
    border-color: #4b28ac;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #4b28ac;
    color: white;
    border-color: #4b28ac;
}

@media (max-width: 768px) {
    .filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}