/* 
   Decide Targets E-commerce Website
   Main Stylesheet
*/

/* Variables */
:root {
    --primary-red: #FF0000;
    --primary-black: #000000;
    --primary-white: #FFFFFF;
    --light-gray: #F5F5F5;
    --dark-gray: #333333;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--primary-white);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: var(--primary-black);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-red);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--primary-white);
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    text-transform: uppercase;
}

.btn:hover {
    background-color: var(--dark-gray);
    color: var(--primary-white);
}

/* Header Styles */
header {
    background-color: var(--primary-white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo img {
    max-height: 60px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: bold;
    text-transform: uppercase;
}

nav ul li a.active {
    color: var(--primary-red);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: var(--primary-red);
    color: var(--primary-white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-black);
}

/* Hero Section */
.hero {
    background-color: var(--light-gray);
    text-align: center;
    padding: 80px 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('../assets/images/hero-camo-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary-black);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--dark-gray);
}

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

.products h2 {
    text-align: center;
    margin-bottom: 10px;
}

.products > p {
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-gray);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.product-item {
    background-color: var(--primary-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
}

.price {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.add-to-cart {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    font-weight: bold;
}

.add-to-cart:hover {
    background-color: var(--dark-gray);
}

/* Bulk Offer */
.bulk-offer {
    background-color: var(--light-gray);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-top: 50px;
}

.bulk-offer h3 {
    margin-bottom: 10px;
}

.bulk-offer p {
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.add-bulk-to-cart {
    background-color: var(--primary-red);
    color: var(--primary-white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.add-bulk-to-cart:hover {
    background-color: var(--dark-gray);
}

/* Footer */
footer {
    background-color: var(--dark-gray);
    color: var(--primary-white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-logo img {
    max-height: 60px;
    margin-bottom: 20px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--primary-white);
    margin-bottom: 20px;
    position: relative;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 2px;
    background-color: var(--primary-red);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--primary-white);
}

.footer-links ul li a:hover {
    color: var(--primary-red);
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact a {
    color: var(--primary-white);
}

.footer-contact a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-modal.show {
    opacity: 1;
    visibility: visible;
}

.cart-modal-content {
    background-color: var(--primary-white);
    border-radius: 8px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: var(--transition);
}

.cart-modal.show .cart-modal-content {
    transform: translateY(0);
}

.close-cart {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-gray);
}

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

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
    position: relative;
}

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

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

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

.cart-item-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-red);
    font-weight: bold;
    margin-bottom: 5px;
}

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

.quantity-btn {
    background-color: var(--light-gray);
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.quantity {
    margin: 0 10px;
}

.remove-item {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--dark-gray);
    position: absolute;
    top: 15px;
    right: 0;
}

.cart-summary {
    margin-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.checkout-btn,
.clear-cart-btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
}

.checkout-btn {
    background-color: var(--primary-red);
    color: var(--primary-white);
}

.clear-cart-btn {
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

.checkout-btn:hover {
    background-color: var(--dark-gray);
}

.clear-cart-btn:hover {
    background-color: #ddd;
}

/* Notification */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.notification {
    background-color: var(--dark-gray);
    color: var(--primary-white);
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: var(--transition);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Admin Link */
.admin-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-left: 10px;
    text-decoration: none;
}

.admin-link:hover {
    color: var(--primary-white);
    text-decoration: underline;
}

/* Enhanced Responsive Styles */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav {
        width: 100%;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        display: none;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .products {
        padding: 60px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cart-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-image {
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .remove-item {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .products h2 {
        font-size: 1.5rem;
    }
    
    .notification {
        width: 90%;
        left: 5%;
        right: 5%;
    }
    
    .cart-modal-content {
        padding: 15px;
    }
    
    .cart-item-details h3 {
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) {
    .product-item:hover {
        transform: none;
    }
    
    .product-item:hover .product-image img {
        transform: none;
    }
    
    .add-to-cart {
        padding: 12px 15px; /* Larger touch target */
    }
    
    .filter-btn {
        padding: 10px 20px; /* Larger touch target */
    }
    
    nav ul li a {
        padding: 10px 0;
        display: block; /* Larger touch target */
    }
}


/* PayPal Checkout Modal Styles */
.paypal-checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.paypal-checkout-modal.show {
    opacity: 1;
    visibility: visible;
}

.paypal-checkout-content {
    background: var(--primary-white);
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.paypal-checkout-modal.show .paypal-checkout-content {
    transform: scale(1);
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

.checkout-header h2 {
    color: var(--primary-black);
    font-size: 1.5rem;
    margin: 0;
}

.close-checkout {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-checkout:hover {
    background-color: var(--light-gray);
    color: var(--primary-red);
}

.checkout-summary {
    margin-bottom: 25px;
}

.checkout-summary h3 {
    color: var(--primary-black);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

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

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

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

.item-name {
    flex: 1;
    font-weight: 500;
    color: var(--primary-black);
    margin-right: 10px;
}

.item-quantity {
    color: var(--dark-gray);
    margin-right: 15px;
    font-size: 0.9rem;
}

.item-price {
    font-weight: bold;
    color: var(--primary-red);
    min-width: 60px;
    text-align: right;
}

.checkout-total {
    padding: 15px 0;
    border-top: 2px solid var(--primary-red);
    text-align: right;
    font-size: 1.2rem;
    color: var(--primary-black);
}

.paypal-button-container {
    margin: 25px 0;
    min-height: 50px;
}

.checkout-security {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.checkout-security i {
    margin-right: 8px;
    color: #28a745;
}

/* PayPal Button Customization */
#paypal-button-container .paypal-button {
    margin: 5px 0;
}

/* Mobile Responsive for PayPal Modal */
@media (max-width: 768px) {
    .paypal-checkout-content {
        padding: 20px;
        margin: 10px;
        max-width: none;
        width: calc(100% - 20px);
    }
    
    .checkout-header h2 {
        font-size: 1.3rem;
    }
    
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .item-price {
        align-self: flex-end;
        min-width: auto;
    }
    
    .checkout-total {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .paypal-checkout-content {
        padding: 15px;
        margin: 5px;
        width: calc(100% - 10px);
    }
    
    .checkout-header {
        margin-bottom: 20px;
    }
    
    .checkout-header h2 {
        font-size: 1.2rem;
    }
    
    .checkout-summary h3 {
        font-size: 1.1rem;
    }
}

