/* Products Page Styles */

/* Page Header */
.page-header {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/products-header.svg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Products Section */
.products-section {
    padding: 80px 0;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.section-intro h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-intro p {
    font-size: 1.1rem;
    color: #555;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.product-card.featured {
    border: 2px solid #4285f4;
}

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

.bestseller {
    background-color: #ff9800;
}

.new {
    background-color: #4caf50;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4285f4;
}

.product-rating {
    display: flex;
    align-items: center;
}

.stars {
    color: #ffc107;
    margin-right: 5px;
}

.count {
    color: #777;
    font-size: 0.8rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 10px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: #3367d6;
}

/* Cart Section */
.cart-section {
    padding: 20px 0 60px;
}

#shopping-cart {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

#shopping-cart h2 {
    margin-bottom: 20px;
    color: #333;
}

.cart-message {
    text-align: center;
    padding: 20px;
    color: #777;
    font-style: italic;
}

.cart-items {
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.cart-item-details {
    display: flex;
    align-items: center;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 15px;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info h4 {
    margin: 0 0 5px;
    font-size: 1rem;
}

.cart-item-price {
    color: #4285f4;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    background: none;
    border: 1px solid #ddd;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-number {
    margin: 0 10px;
    font-weight: bold;
}

.remove-item {
    color: #f44336;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-summary {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 0;
    border-top: 2px solid #ddd;
}

#checkout-btn {
    padding: 12px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#checkout-btn:hover {
    background-color: #3367d6;
}

#checkout-btn.disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Testimonials Section */
.testimonials-section {
    background-color: #f9f9f9;
    padding: 80px 0;
    text-align: center;
}

.testimonials-section h2 {
    margin-bottom: 40px;
}

.testimonials-slider {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
}

.testimonial {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 300px;
    text-align: left;
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content p {
    font-style: italic;
    color: #555;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 5px;
    color: #333;
}

.author-info p {
    margin: 0;
    color: #777;
    font-size: 0.9rem;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.toggle-icon {
    font-size: 1.5rem;
    color: #4285f4;
}

.faq-answer {
    padding: 0 0 15px;
    display: none;
}

.faq-answer p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .toggle-icon {
    transform: rotate(45deg);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

/* Checkout Form */
.checkout-form {
    margin-top: 20px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Stripe Placeholder */
.stripe-placeholder {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.card-element-placeholder {
    width: 100%;
}

.placeholder-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.card-icons {
    display: flex;
    gap: 5px;
}

.card-icon {
    width: 30px;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 3px;
}

.input-placeholder {
    background-color: #f5f5f5;
    border-radius: 4px;
    height: 35px;
    margin-bottom: 10px;
}

.flex-row {
    display: flex;
    gap: 10px;
}

.flex-row .input-placeholder {
    flex: 1;
}

/* Payment Button */
.payment-button {
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.payment-button:hover {
    background-color: #3367d6;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    left: calc(50% - 10px);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* Thank You Modal */
.thank-you-content {
    text-align: center;
}

.success-animation {
    margin: 20px auto;
}

.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4285f4;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #4285f4;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.download-instructions {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.download-instructions h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.download-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.download-instructions li {
    margin-bottom: 5px;
}

.return-btn {
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.return-btn:hover {
    background-color: #3367d6;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-header {
        padding: 60px 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .testimonials-slider {
        flex-direction: column;
        align-items: center;
    }
    
    .testimonial {
        width: 90%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-quantity {
        margin-top: 10px;
    }
    
    .remove-item {
        margin-top: 10px;
    }
}