/* Style dla kart produktów i funkcji szybkiego podglądu */

/* Karty produktów */
.product-card {
    background-color: var(--background-color);
    border-radius: var(--radius-medium);
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(33, 150, 243, 0.05);
    backdrop-filter: blur(5px);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-medium);
    padding: 2px;
    background: linear-gradient(45deg, rgba(33, 150, 243, 0), rgba(33, 150, 243, 0.3), rgba(33, 150, 243, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.product-card:hover {
    box-shadow: 0 15px 40px rgba(33, 150, 243, 0.25);
    transform: translateY(-5px) perspective(800px) rotateX(2deg);
}

.product-card:hover::after {
    opacity: 1;
}

.product-card-hover .product-actions-overlay {
    opacity: 1;
    visibility: visible;
}

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background-color: #f9f9f9;
}

.product-image-link {
    display: block;
    position: relative;
    height: 100%;
    width: 100%;
}

.main-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.43, 0.13, 0.23, 0.96);
}

.product-card:hover .main-product-image {
    transform: scale(1.07);
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.badge-new {
    background: linear-gradient(135deg, var(--primary-color), #3dabf5);
    color: white;
}

.badge-sale {
    background: linear-gradient(135deg, #f5533d, #ff3860);
    color: white;
}

.badge-bestseller {
    background: linear-gradient(135deg, #3df57a, #1cc655);
    color: white;
}

.badge-limited {
    background: linear-gradient(135deg, #f5c83d, #e09819);
    color: white;
}

/* Nakładka z akcjami */
.product-actions-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 30%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    z-index: 3;
}

.product-card:hover .product-actions-overlay {
    opacity: 1;
    visibility: visible;
}

.product-action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
}

.product-card:hover .action-btn {
    transform: translateY(0);
    opacity: 1;
}

.product-card:hover .action-btn:nth-child(1) {
    transition-delay: 0ms;
}

.product-card:hover .action-btn:nth-child(2) {
    transition-delay: 50ms;
}

.product-card:hover .action-btn:nth-child(3) {
    transition-delay: 100ms;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.05);
}

.action-btn .tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--text-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.action-btn .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--text-color) transparent transparent transparent;
}

.action-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Informacje o produkcie */
.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, #ffffff 0%, rgba(240, 246, 255, 0.5) 100%);
    border-top: 1px solid rgba(33, 150, 243, 0.1);
}

.product-category {
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-name {
    font-size: 1rem;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 600;
}

.product-name a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a:hover {
    color: var(--primary-color);
}

.product-price-container {
    margin-bottom: 10px;
}

.product-price {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-current {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-old {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: 0.9rem;
    font-weight: 400;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.product-rating .stars {
    margin-right: 5px;
    color: #f5c83d;
}

.review-count {
    color: var(--text-light);
    font-size: 0.8rem;
}

.product-sizes {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.product-status {
    margin-bottom: 15px;
    font-size: 0.875rem;
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.in-stock {
    color: var(--success-color);
}

.out-of-stock {
    color: var(--danger-color);
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    position: relative;
    padding-top: 15px;
}

.product-actions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.05), rgba(33, 150, 243, 0.2), rgba(33, 150, 243, 0.05));
}

.product-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    transform-origin: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(33, 150, 243, 0.15);
}

/* Animacja ikony koszyka */
.cart-icon-animate {
    animation: cartBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Element animacji dodawania do koszyka */
.cart-animation-element {
    box-shadow: 0 5px 25px rgba(33, 150, 243, 0.3);
    z-index: 9999;
}

.cart-animation-element img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal szybkiego podglądu */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-view-modal.active {
    opacity: 1;
    visibility: visible;
}

.quick-view-container {
    background-color: white;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: var(--radius-medium);
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: quickViewFadeIn 0.4s forwards;
}

@keyframes quickViewFadeIn {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.quick-view-close:hover {
    background-color: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.quick-view-content {
    display: flex;
    max-height: 90vh;
}

@media (max-width: 991px) {
    .quick-view-content {
        flex-direction: column;
        overflow-y: auto;
    }
}

.quick-view-gallery {
    flex: 5;
    padding: 20px;
    position: relative;
    max-width: 50%;
    background-color: #f9f9f9;
}

@media (max-width: 991px) {
    .quick-view-gallery {
        max-width: 100%;
        flex: none;
    }
}

.quick-view-main-image {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: var(--radius-small);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.quick-view-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.quick-view-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.quick-view-thumbnail {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-small);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.quick-view-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-view-thumbnail.active {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.quick-view-info {
    flex: 7;
    padding: 30px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
}

.quick-view-category {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.quick-view-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--text-color);
}

.quick-view-rating {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.quick-view-price {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-view-stock {
    margin-bottom: 20px;
    font-weight: 600;
}

.quick-view-description {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.quick-view-options {
    margin-bottom: 20px;
}

.quick-view-options .option-group {
    margin-bottom: 15px;
}

.quick-view-options label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.size-option {
    min-width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    padding: 0 12px;
    font-size: 0.9rem;
}

.size-option:hover {
    border-color: var(--primary-color);
}

.size-option.active {
    border-color: var(--primary-color);
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--primary-color);
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option.active {
    transform: scale(1.1);
    border-color: white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.quick-view-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    width: 150px;
    margin-bottom: 15px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background-color: #f0f0f0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    user-select: none;
    transition: all 0.2s ease;
}

.quantity-btn.decrease {
    border-radius: var(--radius-small) 0 0 var(--radius-small);
}

.quantity-btn.increase {
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-input {
    flex: 1;
    height: 40px;
    text-align: center;
    border: 1px solid #f0f0f0;
    font-size: 0.95rem;
    -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.view-details-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}