/* ===========================================
   CSS Variables - Globalne kolory i ustawienia
   =========================================== */
:root {
    --primary-color: #233362;
    --primary-hover: #1a254b;
    --secondary-color: #007bff;
    --accent-color: #ffc107;
    --text-color: #333333;
    --bg-color: #ffffff;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-duration: 0.3s;
    --radius: 8px;
}

/* ===========================================
   Reset and Base Styles
   =========================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Light Apple Theme Body Override */
body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(to bottom, #fefefe, #f9f9f9 80%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================================
   Global Containers
   =========================================== */
.container,
.container-fluid {
    padding: 0 15px;
}

/* ===========================================
   Light Apple Theme Navbar Styles - ZOPTYMALIZOWANE
   =========================================== */
.navbar {
    background: linear-gradient(to bottom, #f8f8f8, #eaeaea);
    border-bottom: 1px solid #ddd !important;
    padding: 0.25rem 0;
    /* Zmniejszone z domyślnego */
}

.navbar-brand img {
    max-height: 45px !important;
    /* Zmniejszone z 50px */
}

.navbar-toggler {
    border: none;
}

.navbar-toggler-icon {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg viewBox=%270 0 30 30%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath stroke=%27rgba%28255,255,255,0.8%29%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-miterlimit=%2710%27 d=%27M4 7h22M4 15h22M4 23h22%27/%3E%3C/svg%3E');
}

/* Zoptymalizowane style dla nawigacji */
.nav-link {
    color: #555 !important;
    font-size: 0.8rem !important;
    /* Zmniejszone z 1rem */
    padding: 0.35rem 0.5rem !important;
    /* Zmniejszone odstępy */
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-link i {
    margin-right: 3px !important;
    /* Zmniejszone z 8px */
    font-size: 0.75rem;
    /* Mniejsze ikony */
}

.navbar-nav {
    gap: 0.05rem;
    /* Minimalne odstępy między elementami */
}

.nav-link.menu-hover:hover {
    color: #007bff !important;
}

.navbar-nav .nav-link.active {
    color: #000 !important;
    font-weight: 500;
}

.navbar-nav .dropdown-menu {
    background-color: #ffffff;
    border: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
}

.navbar-nav .dropdown-item {
    color: #333333;
    font-size: 0.85rem;
}

.navbar-nav .dropdown-item:hover {
    background-color: #f0f0f0;
    color: #007bff;
}

/* Responsywność dla nawigacji */
@media (max-width: 1400px) {
    .nav-link {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.4rem !important;
    }

    .nav-link i {
        margin-right: 2px !important;
        font-size: 0.7rem;
    }
}

@media (max-width: 1200px) {
    .nav-link {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.35rem !important;
    }

    .navbar-brand img {
        max-height: 40px !important;
    }
}

@media (max-width: 992px) {
    .nav-link {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        color: #666666 !important;
    }

    .navbar-nav {
        gap: 0;
    }
}

/* ===========================================
   Light Apple Theme Components
   =========================================== */
.nav-tabs {
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(to bottom, #fafafa, #f0f0f0);
}

.nav-tabs .nav-link {
    color: #777 !important;
    border: none !important;
    border-radius: 0 !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 12px;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(to bottom, #e9ecef, #ffffff);
    color: #000 !important;
    border: none !important;
    border-bottom: 2px solid #007bff !important;
}

.nav-tabs .nav-link:not(.active) {
    color: #007bff;
}

.tab-content {
    border: 1px solid #007bff;
    border-top: none;
    padding: 15px;
    background-color: #fff;
}

/* ===========================================
   Heading & Section Styles
   =========================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #222222;
    margin-bottom: 20px;
}

h2,
h3,
h4 {
    font-size: 1.4rem;
    font-weight: 500;
    background-color: #ffffff;
    padding: 10px;
    border-radius: 0 !important;
}

.section {
    padding: 60px 0;
    background-color: #ffffff;
    color: #333333;
}

.section.bg-light {
    background-color: #ffffff;
}

.section.text-center {
    text-align: center;
}

.biz-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* ===========================================
   Card & Gallery Styles
   =========================================== */
.card {
    background-color: #ffffff;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.photo-tile {
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
    transition: transform 0.3s ease;
}

.photo-tile:hover {
    transform: scale(1.03);
}

.photo-tile img {
    width: 100%;
    display: block;
    border-radius: 0 !important;
}

.photo-card {
    position: relative;
    overflow: hidden;
}

.photo-card .overlay {
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}

.photo-card:hover .overlay {
    opacity: 1;
}

/* Nakładka na zdjęcia */
.caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-tile:hover .caption-overlay {
    opacity: 1;
}

/* ===========================================
   Light Apple Theme Button Styles
   =========================================== */
.btn {
    border-radius: 20px !important;
    transition: all 0.2s ease-in-out;
    border: none;
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

.btn-primary,
.btn-success,
.btn-outline-danger {
    background-image: linear-gradient(to bottom, #ffffff, #d7d7d7);
    color: #333;
}

.btn-primary i,
.btn-success i,
.btn-outline-danger i {
    margin-right: 5px;
}

.btn-outline-danger {
    border: 1px solid #cc0000 !important;
    background-image: linear-gradient(to bottom, #ffffff, #ffeaea);
    color: #cc0000;
}

.btn-primary:hover {
    background-image: linear-gradient(to bottom, #f0f0f0, #ccc);
}

.btn-success {
    background-image: linear-gradient(to bottom, #e0ffe0, #ccffcc);
    color: #060;
}

.btn-success:hover {
    background-image: linear-gradient(to bottom, #d0ffd0, #bbffbb);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: #007bff !important;
    border: 1px solid #007bff !important;
}

.btn-outline-primary:hover {
    background-color: #007bff !important;
    color: #ffffff !important;
}

/* ===========================================
   Footer Styles
   =========================================== */
.footer {
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    padding: 15px 0;
    color: #333333;
    text-align: center;
}

.footer a {
    color: #007bff !important;
    text-decoration: none;
}

.footer a:hover {
    color: #0056b3 !important;
}

/* ===========================================
   Scroll to Top Button
   =========================================== */
.scroll-to-top {
    border-radius: 50%;
    background: linear-gradient(to bottom, #f0f0f0, #d7d7d7);
    border: none;
    transition: all 0.2s;
    width: 40px;
    height: 40px;
    line-height: 40px;
    position: fixed;
    bottom: 40px;
    right: 40px;
    color: #333 !important;
    text-align: center;
}

.scroll-to-top:hover {
    transform: scale(1.08);
    background-color: #0056b3 !important;
    color: #ffffff !important;
}

/* ===========================================
   Form Styles
   =========================================== */
.form-group label {
    font-weight: bold;
    color: #333333 !important;
}

.form-control {
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    color: #333333 !important;
    padding: 10px;
    border-radius: 0 !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5) !important;
}

/* ===========================================
   Table Styles for DataTables
   =========================================== */
table {
    width: 100% !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    border-collapse: collapse !important;
}

table.table-sm th,
table.table-sm td {
    vertical-align: middle;
    padding: 8px !important;
    border: none !important;
}

th {
    background-color: #ffffff !important;
    color: #333333 !important;
    font-weight: bold !important;
}

tr:hover {
    background-color: #f1f1f1 !important;
}

/* ===========================================
   Menu Hover Effects
   =========================================== */
.menu-hover {
    transition: color 0.3s ease-in-out;
}

.menu-hover:hover {
    color: rgb(155, 9, 9) !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* ===========================================
   Flash Messages
   =========================================== */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    width: 90%;
    max-width: 350px;
    pointer-events: none;
}

.flash-messages .alert {
    pointer-events: all;
    margin-bottom: 10px;
    border-radius: var(--radius);
    animation: slideInFromTopRight 0.5s ease-out;
}

@keyframes slideInFromTopRight {
    0% {
        opacity: 0;
        transform: translate(50px, -50px);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translate(0, -20px);
    }
}

/* ===========================================
   Modal Styles
   =========================================== */
.modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.product-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    position: relative;
}

.product-carousel .carousel-item {
    text-align: center;
}

.product-carousel img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 8px;
}

.custom-prev,
.custom-next {
    position: absolute;
    top: 50%;
    width: 70px;
    height: 70px;
    margin-top: -35px;
    background-size: cover;
    background-position: center;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    opacity: 0.9;
}

.custom-prev {
    left: -80px;
}

.custom-next {
    right: -80px;
}

.product-info h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.product-info p {
    font-size: 1rem;
}

.metadata-section {
    margin-top: 20px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.metadata-section h5 {
    font-size: 1.2rem;
    color: #084e03;
    margin-bottom: 10px;
}

.metadata-section ul {
    list-style: none;
    padding-left: 0;
}

.metadata-section ul li {
    padding: 5px 0;
    border-bottom: 1px dotted #ccc;
}

.metadata-section ul li:last-child {
    border-bottom: none;
}

.action-buttons a,
.action-buttons button {
    margin: 5px;
}

.like-section {
    text-align: center;
    margin-top: 20px;
}

.like-section h4 {
    font-size: 1.5rem;
}

.like-section p {
    margin-bottom: 10px;
}

.star-rating label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.comments-section .list-group-item {
    display: flex;
    align-items: flex-start;
}

.comments-section img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 15px;
}

.comments-section .list-group-item p {
    margin: 0;
}

/* ===========================================
   Photo Mockup Styles
   =========================================== */
.photo-mockup {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.photo-mockup img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.photo-mockup:hover {
    transform: rotateY(3deg) rotateX(2deg) scale(1.03);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.photo-mockup:hover img {
    transform: scale(1.05);
}

.photo-mockup::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #8e44ad, #3498db);
    opacity: 0.9;
}

/* ===========================================
   Map Container
   =========================================== */
#map {
    height: calc(100vh - 420px);
    width: 100%;
    border: 1px solid #bbb;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin-top: 15px;
}

#mapProviderContainer {
    margin-bottom: 15px;
}

/* ===========================================
   Additional Animations & Custom Classes
   =========================================== */
.animate__animated.animate__fadeIn,
.animate__animated.animate__fadeInUp {
    animation-duration: 1s !important;
}

.icon-primary {
    color: #007bff !important;
}

.icon-success {
    color: #28a745 !important;
}

.icon-warning {
    color: #ffc107 !important;
}

.icon-danger {
    color: #dc3545 !important;
}

.cart-count {
    animation: cartBounce 1s infinite alternate;
}

@keyframes cartBounce {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.2);
    }
}

/* ===========================================
   Gallery Responsive Styles
   =========================================== */
@media (max-width: 768px) {
    .carousel-item img {
        height: 400px;
    }

    .carousel-caption h3 {
        font-size: 1.2rem;
    }

    .thumbnail-img {
        width: 60px;
        height: 60px;
    }

    .card,
    .photo-tile {
        height: auto !important;
    }

    .flash-messages .alert {
        animation: slideInFromTopRight 0.5s ease-out, fadeOut 0.5s ease-out 4.5s forwards;
    }
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}