/*
Theme Name: ShopMotive
Theme URI: 
Author URI: 
Description: To jest mój pierwszy własny motyw do WordPressa.
Version: 1.0
License: GNU General Public License v2 or later
License URI: 
Text Domain: moj-motyw
*/

:root {
  --fs-logo: clamp(1.2rem, 2vw, 1.8rem);
  --fs-nav-links: clamp(0.8rem, 2vw, 1.1rem);
  --fs-h2: clamp(1.4rem, 3vw, 1.5rem);
  --fs-h2-small: clamp(1.2rem, 2vw, 1.5rem);
  --fs-text: clamp(0.8rem, 2vw, 0.915rem);
  --fs-contact: clamp(0.9rem, 1.5vw, 1.2rem);
}

@font-face {
    font-family: 'AlanSans';
    src: url('assets/fonts/webfonts/AlanSans-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    padding: 0;
    margin: 0;
    background-color: #edf2f4;
    font-family: 'AlanSans';
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: var(  --fs-text);
}

main {
    flex: 1;
    background-color: white;
}

h2 {
    font-size: var(--fs-logo);
}
/* NAVBAR */
nav {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #d90429;
    font-size: var(--fs-nav-links);
    z-index: 9999;
    position: sticky;
    top: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0 60px;
}

/* LOGO */
#nav-logo {
    font-size: var(--fs-logo);
    color: white;
}

.link-no-decoration {
    text-decoration: none;
}

.navbar {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

/* LINKS */
.navbar li a {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.navbar li a:hover::after {
    width: 100%;
}

.navbar li a:hover {
    color: #ffcdcd;
}

/* LANGUAGE SWITCHER */
.navbar .pll-parent-menu-item {
    position: relative;
}

.navbar .pll-parent-menu-item > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #d90429;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 180px;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: all 0.3s ease;
}

.navbar .pll-parent-menu-item:hover > ul {
    display: block;
}

.navbar .pll-parent-menu-item ul li {
    padding: 8px 20px;
}

.navbar .pll-parent-menu-item ul li a {
    color: #fff;
    padding: 5px 0;
    display: block;
    transition: background 0.3s ease, color 0.3s ease;
}

.navbar .pll-parent-menu-item ul li a:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.nav-toggle {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* CONTENT */
.section {
    margin: 2% 5% 2% 5%;
}

/* FRONT PAGE */
.categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* PRODUCT SLIDER */
.product-slider {
    padding: 0 60px;
    position: relative;
    margin: 50px 0px 50px 0px;
}

.new-product-item {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    min-width: 220px;
}

.new-product-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* SWIPER */
.swiper-wrapper {
    display: flex;
}

.swiper-slide {
    width: auto;
}

.swiper-button-next, .swiper-button-prev {
    color: #d90429 !important;
}

/* FOOTER */
footer {
    display: flex;
    gap: 10vw;
    padding: 1% 5% 1% 5%;
    background-color: #d90429;
}

.no-list {
    list-style: none;
    padding: 0;
}

#contact-links a {
    text-decoration: none;
    color: white;
}

#contact-links a:hover {
    text-decoration: none;
    color: white;
}

#contact-info {
    color: white;
}

/* ARCHIVE-PRODUCTS */
.category-buttons {
    display: flex;
    justify-content: left;
    flex-wrap: wrap;
    gap: 10px;
}

.category-button {
    padding: 10px;
    background-color: #d90429;
    border-radius: 12px;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.category-button:hover {
    background-color: #740316;
}

.category-button.active {
    background-color: #740316;
}

/* SORTING */
.sort-dropdown {
    display: flex;
    justify-content: right;
    margin: 15px;
}

.sort-toggle {
    background: #d90429;
    color: white;
    text-transform: uppercase;
    padding: 10px ;
    min-width: 200px;
    border: none;
    cursor: pointer;
    font-weight: bolder;
}
    
.sort-menu {
    display: none;
    position: absolute;
    margin-top: 35px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    border-radius: 6px;
    z-index: 10;
}
    
.sort-option {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}
    
.sort-option:hover {
    background: #f2f2f2;
    }
    
.sort-option.active {
    background: #740316;
    color: white;
}
    
.sort-dropdown:hover .sort-menu {
    display: block;
}

/* PRODUCT-LIST */
.product-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.product-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding-top: 20px;
    min-width: 220px;
    min-height: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    will-change: opacity, transform;
}

.product-item img {
    display: block;
    margin: 0 auto;
}

.product-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

a.product-title {
    text-decoration: none;
    color: black;
    text-align: center;
}

.product-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
    padding: 10px;
}

.color-square {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #808080;
}

/* PRODUCT PAGE */
.product-title {
    margin: 20px 20px 0px 20px;
}

.gallery-1 img {
    border: none;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 12px;
}

.page-numbers {
    font-size: var(--fs-h2-small);
    text-decoration: none;
    color: black;
}

.page-numbers.current {
    color: rgb(158, 6, 6);
}

.gallery img {
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 1630px) {
    .navbar {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background: #d90429;
        padding: 10px 0;
        border-radius: 0;
    }

    .navbar.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .navbar .pll-parent-menu-item > ul {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        background: #ff3b4a;
    }

    .navbar li a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .navbar .pll-parent-menu-item > ul li a {
        padding: 12px 0;
        text-align: center;
        border-bottom: none;
    }
}

/* RESPONSIVE */
@media (max-width: 1500px) {
    .product-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 1110px */
@media (max-width: 1235px) {

    .new-product-item {
        min-height: 280px;
    }

    .product-list {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 850px) {
    .product-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-item {
        min-width: 200px;
    }
    .product-slider {
        overflow: hidden;
    }
    .swiper-wrapper {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .product-list {
        grid-template-columns: repeat(1, 1fr);
    }
    .product-item {
        max-width: 300px;
    }
}
