/* --- GLOBAL STYLES --- */
body {
    font-family: 'Inter', sans-serif;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.animate-scroll {
    animation: scroll 40s linear infinite;
}

.nav-link.active {
    color: #3b82f6;
    /* blue-500 */
    font-weight: 600;
}

.nav-link.cta-button.active {
    color: white;
    background-color: #2563eb;
    /* blue-600 */
}

.social-icon-svg {
    overflow: visible;
}

.filter-btn.active {
    background-color: #3b82f6;
    color: white;
}

/* --- BLOG STYLES --- */
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.blog-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* --- SHOP SECTION CUSTOM STYLES (Scoped) --- */

/* Using .shop-container to avoid conflict with Tailwind .container */
.shop-container {
    width: 95%;
    max-width: 1400px;
    margin: 30px auto;
    display: flex;
    gap: 30px;
    padding-bottom: 50px;
}

#products .main-content {
    flex-grow: 1;
}

/* Product Grid */
#products .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

#products .product-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

#products .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

#products .product-card img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

#products .product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

#products .product-info h3 {
    margin-top: 0;
    font-size: 1.3em;
    color: #004c99;
    margin-bottom: 10px;
    font-weight: 700;
}

#products .price {
    font-size: 1.6em;
    color: #e63946;
    /* Red */
    font-weight: 700;
    margin: 10px 0 20px 0;
}

#products .btn-view-details {
    background-color: #1a75ff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s;
    width: 100%;
    box-sizing: border-box;
    font-size: 1em;
    font-weight: 600;
}

#products .btn-view-details:hover {
    background-color: #005ce6;
    transform: translateY(-1px);
}

/* Message Box */
#messageBox {
    position: fixed;
    top: 100px;
    /* Adjusted to sit below sticky header */
    right: 20px;
    background-color: #4CAF50;
    /* Green for success */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    font-weight: bold;
    font-size: 1.1em;
}

/* Shop Modals */
.shop-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Higher than header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    padding-top: 60px;
    align-items: center;
    justify-content: center;
}

.shop-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation-name: animatetop;
    animation-duration: 0.4s;
}

@keyframes animatetop {
    from {
        top: -300px;
        opacity: 0
    }

    to {
        top: 0;
        opacity: 1
    }
}

.shop-close-btn {
    color: #aaa;
    float: right;
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
    margin: -10px -10px 0 0;
}

.shop-close-btn:hover,
.shop-close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    align-items: flex-start;
    margin-top: 20px;
}

.modal-details h2 {
    margin-top: 0;
    color: #004c99;
    font-size: 2em;
    font-weight: 700;
}

.modal-img-container {
    flex: 1;
}

.modal-img-container img {
    width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
}

.modal-details {
    flex: 2;
    text-align: left;
}

.modal-details ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.modal-details li {
    margin-bottom: 10px;
    padding-left: 10px;
    position: relative;
    line-height: 1.5;
}

.modal-details li::before {
    content: "•";
    color: #e63946;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Modal Purchase Controls */
.purchase-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #eee;
}

.purchase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-control label {
    font-weight: bold;
    font-size: 1.1em;
}

.quantity-control input {
    width: 70px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

.quantity-control input:focus {
    border-color: #004c99;
    outline: none;
}

.total-price-display {
    font-size: 1.4em;
    font-weight: bold;
    color: #e63946;
}

.btn-add-to-cart {
    background-color: #ffb703;
    /* Yellow-Orange */
    color: #333;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s;
    font-weight: 700;
    font-size: 1.1em;
}

.btn-add-to-cart:hover {
    background-color: #ff9f00;
    transform: translateY(-1px);
}

/* Cart Summary (Sidebar) */
#products .cart-summary {
    width: 350px;
    min-width: 300px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
    /* Offset for header */
    align-self: flex-start;
    border: 2px solid #3b82f6;
}

#products .cart-summary h3 {
    color: #3b82f6;
    margin-top: 0;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 10px;
    font-size: 1.5em;
    font-weight: 700;
}

#cart-items {
    list-style: none;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

#cart-items li {
    padding: 10px 0;
    border-bottom: 1px dotted #ccc;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#cart-items li:last-child {
    border-bottom: none;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    margin-top: 20px;
    font-size: 1.4em;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 2px solid #3b82f6;
    color: #3b82f6;
}

.btn-checkout {
    display: block;
    width: 100%;
    background-color: #333333;
    /* Darker Grey/Black for maintenance look */
    color: white;
    border: none;
    padding: 15px 0;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-checkout:hover {
    background-color: #000000;
    /* Fully black on hover */
    transform: translateY(-1px);
}

/* Styles for Plus/Minus buttons in Cart */
.qty-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    line-height: 22px;
    /* Vertically center text */
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    padding: 0;
    margin: 0 5px;
    display: inline-block;
}

.qty-btn:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

/* Utility for Cart Item Removal */
.remove-item {
    color: #e63946;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 10px;
    text-decoration: underline;
}

/* CHECKOUT FORM STYLES */
.checkout-form-group {
    margin-bottom: 15px;
    text-align: left;
}

.checkout-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.checkout-form-group input,
.checkout-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkout-header {
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

/* Responsive adjustments for Shop */
@media (max-width: 1024px) {
    .shop-container {
        flex-direction: column;
    }

    #products .cart-summary {
        width: 100%;
        position: static;
        box-sizing: border-box;
    }

    .shop-modal-content {
        margin: 20px auto;
        width: 85%;
    }
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .purchase-controls {
        flex-direction: column;
        gap: 15px;
    }

    .btn-add-to-cart {
        width: 100%;
    }

    .total-price-display {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }

    .quantity-control {
        width: 100%;
        justify-content: center;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }
}