/* ===========================================
 * Amazon Bestseller Table – scoped version
 * Namespace: .boxyfy-amz-table
 * =========================================*/

/* ---------- generic notice ------------------------------------------------ */
.boxyfy-amz-table .disclaimer-amz-liste {
    margin: 6px 0 25px;
    padding: 1px 5px;
    font-size: 13px;
    color: #727272;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3,
.boxyfy-amz-table .amazon-bestseller-liste-table3 * {
    box-sizing: border-box !important;
}


/* ---------- sort & reset controls ---------------------------------------- */
.boxyfy-amz-table .tsreset-btn svg {
    height: 18px;
    width: 18px;
}

.boxyfy-amz-table .sort-controls-mobile {
    display: none;
    margin-bottom: 10px;
    text-align: center;
}

.boxyfy-amz-table .sort-controls-mobile button {
    border: none;
    border-radius: 4px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 16px;
    margin: 0 4px;
}

.amazon-bestseller-liste-table3 tr .tsreset-btn,
.amazon-bestseller-liste-table3 tr .tssort-btn {
	max-height: 30px;
	min-height: 30px;
}

.boxyfy-amz-table .tssort-btn {
    background: transparent;
    padding: 0 2px;
    border: none;
	width: 15px !important;
	height: 15px !important;
    font-size: 18px;
    cursor: pointer;
}

.boxyfy-amz-table .tsreset-btn {
	background: transparent;
    padding: 0 2px;
    border: none;
	width: 15px !important;
	height: 15px !important;
    font-size: 14px;
    cursor: pointer;
}

.boxyfy-amz-table .tssort-btn svg,
.boxyfy-amz-table .tsreset-btn svg {
    width: 15px;
    height: 15px;
    display: block;
}


/* ---------- table --------------------------------------------------------- */
.boxyfy-amz-table .amazon-bestseller-liste-table3 {
    width: 100%;
    border-collapse: collapse !important;
    margin-top: 25px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    box-sizing: content-box !important;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 tr {
    border: 0.5px solid #dddddd;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 th {
    border: 1px solid #dddddd !important;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 thead tr th {
    text-align: center;
    vertical-align: baseline;
    line-height: normal;
    padding: 4px 2px;
    font-weight: 400 !important;
    box-sizing: border-box;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 tbody tr {
    border-right: none;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td {
    background-color: #ffffff !important;
    border-left: none;
    border-right: none;
    vertical-align: middle;
    position: relative;
    height: 105px;
    max-height: 120px;
    padding: 0 9px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	line-height: 1.45em;
    box-sizing: border-box;
}

/* ---------- coloured left border for 1st–3rd rank (unsorted) ------------- */
.boxyfy-amz-table .amazon-bestseller-liste-table3:not(.sorted) tr td:first-child {
    border-left: 5px solid transparent;
    padding-left: 3px;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3:not(.sorted) tr:nth-child(1) td:first-child {
    border-left-color: gold !important;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3:not(.sorted) tr:nth-child(2) td:first-child {
    border-left-color: silver !important;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3:not(.sorted) tr:nth-child(3) td:first-child {
    border-left-color: #cd7f32 !important;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3.sorted tr td:first-child {
    border-left: none;
}

/* ---------- column specifics --------------------------------------------- */
.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(1) {
    text-align: center;
    width: 120px;
    font-weight: 600;
    color: #3f4444;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(2) {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 140px;
    border: none;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(2) img {
    display: block;
    width: auto;
    height: auto;
    max-width: 90px;
    max-height: 90px;
    opacity: 1;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(3) a {
    font-weight: 600;
    color: #3f4444;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) {
    min-width: 130px;
    text-align: center;
    color: #000000;
    font-size: 17px;
    font-weight: 600;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 thead th .th-flex {
    display: flex;
    align-items: center;
    justify-content: center;
	gap: 5px;
}

.boxyfy-amz-table .discount-label {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    background-color: rgba(203, 5, 5, 0.84);
    font-size: 13px;
    font-weight: 400 !important;
    height: 19px;
    border: 0.5px solid #f30606;
    border-radius: 2px;
    padding: 2px;
}

.boxyfy-amz-table .discount-label-platz-container {
    display: flex;
    width: 100%;
    margin-bottom: 10px;
    justify-content: center;
}

.boxyfy-amz-table .boxyfy-product-uvp {
    font-size: 12px;
    color: #2f2c2c;
    font-weight: 400;
    text-decoration: line-through;
    margin-top: 4px;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) {
    min-width: 165px;
    text-align: center;
    font-weight: 400;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 500;
	line-height: 1.5em;
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a:hover {
    filter: brightness(0.62);
}

.boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a svg {
    width: 17px;
    height: 17px;
    margin: 2px 7px 0 0;
}

/* ---------- responsive ≤ 935 px ------------------------------------------ */
@media (max-width: 935px) {

    .boxyfy-amz-table .sort-controls-mobile {
        display: flex;
        width: 100%;
        gap: 4px;
        margin-bottom: 10px;
        text-align: center;
    }

    .boxyfy-amz-table .sort-controls-mobile button {
        display: flex;
        flex: 1;
        justify-content: center;
        align-items: center;
        margin: 0;
        border-radius: 4px;
    }
	
	.boxyfy-amz-table .amazon-product-list .amazon-bestseller-liste-table3 {
		border: none;
	}
	
    .boxyfy-amz-table .amazon-bestseller-liste-table3 thead {
        display: none;
    }

    .boxyfy-amz-table #product-list-body tr td {
        font-size: 18px;
        justify-content: center;
        align-items: center;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 tbody tr {
        padding: 0;
        background-color: #ffffff;
        border-right: 1px solid #dddddd !important;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(1) {
        height: 40px;
		padding: 8px 8px 12px 10px !important;
        width: 100%;
        background-color: #f7f7f7;
        border-radius: 8px 8px 0 0;
		text-align: center;
		border-bottom: 1px solid #ededed !important;
    }

    .boxyfy-amz-table #product-list-body td:nth-child(2) {
        margin: 10px 0 0 0;
        height: 200px;
        border: none !important;
        width: 100%;
        max-height: 220px;
    }

    .boxyfy-amz-table #product-list-body tr img {
        width: auto;
        max-height: 180px;
        max-width: 180px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(3) {
        font-size: 17px !important;
        text-align: center;
        height: 100px !important;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(3) a {
        display: -webkit-box;
        padding: 0 8px !important;
        text-align: left;
        width: 100%;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4em;
    }

    .boxyfy-amz-table #product-list-body tr .discount-label-platz-container {
        max-width: 143px;
    }

    .boxyfy-amz-table .product-price-container {
        display: flex !important;
        align-items: center !important;
        width: 100%;
        gap: 10px;
        margin: 11px 0 8px 0;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start;
        flex-direction: row;
        font-size: 20px !important;
        width: 100%;
		height: 70px;
        gap: 10px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) .discount-label {
        order: -1;
        flex-shrink: 0;
        background-color: #db0404;
        color: #ffffff;
        height: 26px !important;
        margin: 0 0 0 7px !important;
        padding: 2px 12px 2px 10px !important;
        font-size: 15px !important;
        border-left: 5px solid #7c0303;
        clip-path: polygon(0% 0%, 93% 0, 100% 50%, 93% 100%, 0% 100%);
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) .boxyfy-product-uvp {
        order: 0;
        flex-grow: 1;
        text-align: right;
        font-size: 16px;
        text-decoration: line-through;
        color: #555555;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) .product-price {
        order: 1;
        flex-shrink: 0;
        font-weight: 600;
        padding-right: 8px;
        font-size: 24px;
        margin-left: auto;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) {
        height: 72px;
        padding: 5px 6px;
        font-size: 19px !important;
        border-radius: 0 0 8px 8px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a {
        width: 100%;
        font-size: 0;
        padding: 12px 10px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a svg {
        width: 20px;
        height: 20px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a::after {
        content: " bei Amazon kaufen";
        font-size: 19px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(5) a span {
        display: none !important;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 th,
    .boxyfy-amz-table .amazon-bestseller-liste-table3 td {
        border: none !important;
    }

    /* make each row a card */
    .boxyfy-amz-table .amazon-bestseller-liste-table3 {
        display: block;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #dddddd;
        border-radius: 8px;
        padding: 10px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 8px 0;
    }
}

/* ---------- responsive ≤ 410 px ----------------------------------------- */
@media (max-width: 410px) {

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) .boxyfy-product-uvp {
        font-size: 15px;
    }

    .boxyfy-amz-table .amazon-bestseller-liste-table3 td:nth-child(4) .product-price {
        font-size: 21px;
    }
}