:root {
    --primary-color: #0056b3;
    --secondary-color: #2c3e50;
    --accent-color: #e67e22;
    --bg-light: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* RESET & GLOBAL */
* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}


body.no-copy {
    user-select: none;
    -webkit-user-select: none;
}

main, .content-wrapper {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* NAVBAR */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* DROPDOWNS */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-radius: 8px;
    top: 100%;
    right: 0;
    z-index: 2000;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    display: block;
    font-size: 0.9rem;
    text-decoration: none;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* HERO SECTION */
.hero {
    background: var(--secondary-color);
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
}

.hero h1 {
    margin: 0 0 15px;
    font-size: 2.8rem;
    font-weight: 800;
}

.hero p {
    opacity: 0.9;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* BOXES (CARDS) */
.boxes {
    display: grid;
    grid-template-columns: repeat(var(--boxes-per-row, 3), 1fr);
    gap: 30px;
    padding: 40px 0;
}

.box {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.box img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.box-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.box h2 {
    margin: 0 0 15px;
    font-size: 1.3rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.box p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    margin-top: auto;
    text-decoration: none;
}

.button:hover {
    background: #004494;
}

/* INSTRUCTION PAGE */
.instruction-page {
    position: relative;
    padding: 40px 0;
}

.instruction-content {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
}

.instruction-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* LOCK OVERLAY */
.instruction-payment-lock {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 500;
    display: flex;
    justify-content: center;
    padding-top: 80px;
}

.instruction-payment-box {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.2);
    max-width: 550px;
    width: 95%;
    text-align: center;
    border: 1px solid #eee;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.is-blurred {
    filter: blur(18px);
    pointer-events: none;
    opacity: 0.2;
}

/* FORMS */
.modern-form .form-group { margin-bottom: 20px; text-align: left; }
.modern-form label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.9rem; color: var(--secondary-color); }
.modern-form input, .modern-form textarea, .modern-form select {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: #fdfdfd;
}

.modern-button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.modern-button:hover {
    background: #004494;
    transform: translateY(-2px);
}

/* MISC */
.time-counter {
    background: var(--accent-color);
    color: #fff;
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    white-space: nowrap;
}

footer {
    flex-shrink: 0;
    background: var(--secondary-color);
    color: #fff;
    padding: 50px 20px;
    text-align: center;
    margin-top: auto;
}

footer p { margin: 5px 0; }

@media (max-width: 992px) {
    .boxes { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar { height: auto; padding: 15px 20px; flex-direction: column; gap: 15px; }
    .nav-links { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .boxes { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
}

/* OFFER PAGE STYLES */
.offer-main {
    display: flex;
    gap: 40px;
    margin: 40px 0;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    align-items: flex-start;
}

.offer-image-container {
    flex: 0 0 400px;
    max-width: 400px;
}

.offer-image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.offer-buy-info {
    flex: 1;
}

.offer-price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 20px 0;
}

.offer-description-full {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-bottom: 60px; max-width: 900px; margin-left: auto; margin-right: auto;
}

@media (max-width: 992px) {
    .offer-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .offer-image-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
    }
}

/* PRINT STYLES */
@media print {
    header, footer, .no-print, #sticky-buy-button, .modern-button {
        display: none !important;
    }
    body, html {
        background: #fff !important;
        padding: 0 !important;
    }
    .content-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
    }
    .instruction-content {
        box-shadow: none !important;
        padding: 0 !important;
    }
    img {
        max-width: 500px !important; /* Optymalizacja pod kartkę A4 */
        page-break-inside: avoid;
    }
}

/* SECURITY WATERMARK */
.print-watermark {
    display: none;
}

@media print {
    .print-watermark {
        display: block !important;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
        font-size: 40px;
        color: rgba(0, 0, 0, 0.1) !important;
        white-space: nowrap;
        z-index: -1;
        pointer-events: none;
        font-weight: 800;
        text-align: center;
    }

    /* Dodatkowa stopka bezpieczenstwa */
    .instruction-content::after {
        content: "Ten dokument jest licencjonowany. Kopiowanie i udostepnianie bez zgody KameryCofania.us.to jest zabronione.";
        display: block;
        text-align: center;
        font-size: 10px;
        color: #aaa;
        margin-top: 50px;
        border-top: 1px solid #eee;
        padding-top: 10px;
    }
}

@media print {
    /* Nakladanie logo na zdjecia przy druku */
    .instruction-content img {
        position: relative;
    }
    
    .instruction-content p:has(img)::after {
        content: "KameryCofania.us.to";
        position: absolute;
        bottom: 10px;
        right: 10px;
        background: rgba(255,255,255,0.7);
        padding: 5px 10px;
        font-size: 12px;
        font-weight: bold;
        border-radius: 5px;
        color: #000;
    }
}

/* MODERN PRICING CARDS */
.pricing-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.price-card {
    background: #fdfdfd;
    border-radius: 10px;
    padding: 15px 20px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative; /* Pozwala na poprawne pozycjonowanie plakietki Prezent */
}

.price-card:hover {
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.price-card.featured {
    background: #fff9f0;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.1);
}

.price-card .duration {
    font-size: 0.8rem;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-card .price-row {
    margin: 5px 0;
    color: var(--primary-color);
}

.price-card .amount {
    font-size: 1.6rem;
    font-weight: 800;
}

.price-card .currency {
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 3px;
}

.badge-gift {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e67e22;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.code-entry-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #eee;
}

/* DARK MODE STYLES */
body.dark-mode {
    --bg-light: #121212;
    --text-dark: #e0e0e0;
    --text-light: #b0b0b0;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.5);
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode header, 
body.dark-mode .price-card, 
body.dark-mode .instruction-content, 
body.dark-mode .box, 
body.dark-mode .offer-description-full,
body.dark-mode .admin-panel,
body.dark-mode .instruction-payment-box {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .dropdown-content {
    background-color: #252525;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

body.dark-mode .dropdown-content a {
    color: #e0e0e0;
}

body.dark-mode .dropdown-content a:hover {
    background-color: #333;
}

body.dark-mode input, 
body.dark-mode textarea, 
body.dark-mode select {
    background-color: #252525 !important;
    border-color: #444 !important;
    color: #fff !important;
}

body.dark-mode .hero {
    background: #000 !important;
}

body.dark-mode .time-counter {
    background: #d35400;
}

body.dark-mode .instruction-payment-lock {
    background: rgba(0,0,0,0.85) !important;
}

/* BRAND SELECTOR STYLES */
.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    width: 100px;
    height: 110px;
    justify-content: flex-start;
}

.brand-circle {
    width: 65px;
    height: 65px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 2px solid transparent;
    overflow: hidden;
    font-weight: 800;
    color: #ccc;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-bottom: 8px;
    flex-shrink: 0;
}

.brand-item img {
    width: 70%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}

.brand-item:hover .brand-circle, .brand-item.active .brand-circle {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: scale(1.1);
}

.brand-item:hover img, .brand-item.active img {
    filter: grayscale(0%);
    opacity: 1;
}

.brand-item span {
    font-size: 0.7rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    display: block;
}

.brand-item.active span, .brand-item:hover span {
    color: var(--primary-color);
}
