/**
 * Main Stylesheet - Front End
 * Fully Responsive, Mobile First Design
 */

:root {
    --primary-color: #0056b3;
    --bg-color: #f8f9fa;
    --text-color: #333333;
    --card-bg: #ffffff;
    --border-radius: 8px;
    --transition: 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
}

/* CSS Grid for Products - Responsive */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Product Card */
.product-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius);
    /* Shorthand border used as requested */
    border: 1px solid #e0e0e0; 
    transition: transform var(--transition);
    text-align: center;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.btn-buy {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: opacity var(--transition);
}

.btn-buy:hover {
    opacity: 0.9;
}

/* Media Queries for Tablets & Mobile handled inherently by auto-fit grid */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 10px;
    }
}

/**
 * Header & Navbar Styles
 */
.main-header {
    background-color: var(--card-bg, #ffffff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.brand-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color, #0056b3);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color, #333333);
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition, 0.3s ease-in-out);
}

.nav-links a:hover {
    color: var(--primary-color, #0056b3);
}

.btn-login {
    background-color: var(--primary-color, #0056b3);
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: var(--border-radius, 8px);
    border: 1px solid transparent;
}

.btn-login:hover {
    background-color: #004494;
}

/* Mobile Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-color, #333333);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/**
 * Footer Styles
 */
.main-footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    margin-top: 60px;
    padding-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-grid h4 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #bbbbbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    background-color: #111111;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #888888;
    border: 1px solid #000000; /* Strict shorthand border usage */
}

/**
 * Responsive Media Queries (Tablets & Mobile)
 */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: var(--card-bg, #ffffff);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        gap: 15px;
    }

    /* Toggled by JavaScript */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 10px 0;
    }

    /* Hamburger Animation to 'X' */
    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/**
 * Dynamic Dropdown Menu Styles
 */
.nav-links li {
    position: relative;
}

/* Main Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg, #ffffff);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    border: 1px solid #eaeaea; /* Shorthand border */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
    position: relative;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color, #333);
    font-size: 0.95rem;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color, #0056b3);
}

/* Submenu (Subcategories) */
.submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: var(--card-bg, #ffffff);
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    border: 1px solid #eaeaea;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
    list-style: none;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Responsive fixes for mobile menu */
@media screen and (max-width: 768px) {
    .dropdown-menu, .submenu {
        position: static;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding-left: 20px;
    }

    .dropdown:hover .dropdown-menu,
    .has-submenu:hover .submenu {
        display: block;
    }
}

/**
 * Product Details Stylesheet
 * Optimized for Desktop, Tablet, and Mobile
 */

.product-details-layout {
    padding: 30px 15px;
}

.breadcrumb {
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    text-decoration: none;
    color: var(--primary-color, #0056b3);
}

.product-main-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* Visuals Area */
.main-preview-area {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 15px;
}

.main-featured-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.screenshot-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumb-img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.3s;
}

.thumb-img:hover {
    border: 2px solid var(--primary-color, #0056b3);
}

/* Tabs System */
.product-tabs {
    margin-top: 40px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 15px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--primary-color, #0056b3);
    background: #fff;
    box-shadow: inset 0 -2px 0 var(--primary-color, #0056b3);
}

.tab-content {
    display: none;
    padding: 30px;
    line-height: 1.8;
}

.tab-content.active {
    display: block;
}

.changelog-text {
    background: #222;
    color: #0f0;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
}

/* Sidebar Purchase Card */
.purchase-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #eee;
    position: sticky;
    top: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.product-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.product-meta .badge {
    background: #eef2ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 5px;
}

.price-display {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 25px 0;
    color: #111;
}

.price-display .currency {
    font-size: 1.5rem;
    vertical-align: top;
    margin-right: 5px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-demo, .btn-buy-now {
    display: block;
    width: 100%;
    padding: 18px;
    text-align: center;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 10px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-demo {
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
}

.btn-demo:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.btn-buy-now {
    background: var(--primary-color, #0056b3);
    color: #fff;
}

.btn-buy-now:hover {
    background: #004494;
    transform: translateY(-2px);
}

.secure-info {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #666;
}

.secure-info p {
    margin-bottom: 8px;
}

/* Responsive Queries */
@media (max-width: 992px) {
    .product-main-grid {
        grid-template-columns: 1fr;
    }
    
    .product-sidebar {
        order: -1; /* Sidebar goes to top on small screens if desired, or keep default */
    }
    
    .purchase-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .price-display {
        font-size: 2rem;
    }
    
    .tab-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/**
 * Checkout Page Styles
 * Fully Responsive, clean, and modern
 */

.checkout-layout {
    padding: 40px 15px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Sections */
.checkout-section h2, .order-summary h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-color, #0056b3);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-color, #0056b3);
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #777;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.payment-option input[type="radio"] {
    display: none; /* Hide default radio */
}

.payment-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s;
}

.payment-card img {
    height: 40px;
    margin-bottom: 10px;
    object-fit: contain;
}

.payment-card span {
    display: block;
    font-weight: 600;
    color: #555;
}

/* Checked State for Radio */
.payment-option input[type="radio"]:checked + .payment-card {
    border-color: var(--primary-color, #0056b3);
    background: #f0f7ff;
}

/* Order Summary Box */
.order-summary {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: sticky;
    top: 90px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* Coupon Box */
.coupon-box {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-coupon {
    background: #333;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.btn-coupon:hover { background: #111; }

.applied-coupon-msg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e8f5e9;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #c8e6c9;
}

.success-text { color: #2e7d32; font-size: 0.95rem; }
.btn-remove {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    font-weight: bold;
    text-decoration: underline;
}

.coupon-message {
    margin-top: 10px;
    font-size: 0.9rem;
}
.coupon-message .error { color: #d32f2f; }
.coupon-message .success { color: #2e7d32; }

/* Totals */
.summary-totals {
    margin-bottom: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #555;
}

.discount-row {
    color: #d32f2f;
    font-weight: 600;
}

.total-row {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
    border-top: 2px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

/* Place Order Button */
.btn-place-order {
    width: 100%;
    background: var(--primary-color, #0056b3);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-place-order:hover {
    background: #004494;
    transform: translateY(-2px);
}

.secure-badge {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #2e7d32;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
        order: -1; /* Show summary before form on mobile */
    }
}