/* ============================================
   CARDCODE - ESHOP STYLESHEET
   ============================================ */

/* KOŠÍK STICKY */
.cart-sticky {
    position: sticky;
    top: 0;
    background-color: #2c5aa0;
    color: white;
    padding: 15px 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.cart-icon {
    font-size: 24px;
}

.cart-count {
    background-color: #ff6b6b;
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.cart-text {
    font-size: 16px;
}

.cart-total {
    font-size: 20px;
    font-weight: 700;
    margin-left: 10px;
}

.btn-cart {
    background-color: white;
    color: #2c5aa0;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.btn-cart:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* PRODUKTY GRID */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0 60px;
}

.product-card {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 220px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 20px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 10px;
    color: #333;
}

.product-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 60px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: #2c5aa0;
}

.btn-add-to-cart {
    background-color: #2c5aa0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-add-to-cart:hover {
    background-color: #1e4080;
    transform: translateY(-2px);
}

/* KOŠÍK A OBJEDNÁVKA */
.cart-order-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0 60px;
}

.cart-box,
.order-form-box {
    background-color: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cart-box h2,
.order-form-box h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 25px;
    color: #333;
}

/* KOŠÍK ITEMS */
.cart-items {
    margin-bottom: 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    gap: 15px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 14px;
    color: #666;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-quantity {
    background-color: #e0e0e0;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-quantity:hover {
    background-color: #d0d0d0;
}

.item-quantity {
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.item-total {
    font-weight: 700;
    color: #2c5aa0;
    min-width: 80px;
    text-align: right;
}

.btn-remove {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background-color: #ff5252;
}

.cart-total-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #2c5aa0;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.total-price {
    color: #2c5aa0;
    font-size: 24px;
}

/* FORMULÁŘ */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.order-form-box .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.order-form-box .form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.order-form-box .form-group input,
.order-form-box .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-family: inherit;
    font-size: 15px;
    background-color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.order-form-box .form-group input:focus,
.order-form-box .form-group textarea:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.order-form-box .form-group textarea {
    resize: vertical;
    min-height: 100px;
    border-radius: 20px;
}

.order-form-box .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}

.order-form-box .checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
    box-shadow: none;
    border-radius: 3px;
}

.order-form-box .checkbox-label a {
    color: #2c5aa0;
    text-decoration: none;
}

.order-form-box .checkbox-label a:hover {
    text-decoration: underline;
}

.btn-submit-order {
    background-color: #2c5aa0;
    color: white;
    border: none;
    padding: 16px 50px;
    border-radius: 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    width: auto;
    display: inline-block;
}

.btn-submit-order:hover {
    background-color: #1e4080;
    transform: translateY(-2px);
}

.btn-submit-order:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.order-form-box .form-note {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* SUCCESS MESSAGE */
.success-message {
    background-color: #4caf50;
    color: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin: 20px 0;
    font-weight: 600;
}

.error-message {
    background-color: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin: 20px 0;
    font-weight: 600;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cart-order-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cart-summary {
        flex-wrap: wrap;
        font-size: 14px;
    }

    .cart-total {
        font-size: 18px;
    }

    .btn-cart {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }

    .product-footer {
        flex-direction: column;
        gap: 10px;
    }

    .btn-add-to-cart {
        width: 100%;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
}
