html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
div,
span,
nav,
header,
footer,
section,
main,
input,
button,
ul,
li,
fieldset {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-size: 100%;
}

body {
	font-family: "Roboto", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
}

a {
	text-decoration: none;
	color: black;
}

/* Navigation Bar Styles */
nav {
	position: fixed;
	top: 0;
	width: 100vw;
	height: 60px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 10px;
	border-bottom: 2px solid #000;
	background-color: #fff;
}

div.logo {
	font-family: "Staatliches", sans-serif;
	font-weight: 400;
	font-style: normal;
	font-size: 2rem;
}
ul {
	height: 100%;
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

li {
	list-style-type: none;
	padding: 0 20px;
	height: 100%;
	display: flex;
	align-items: center;
}

li div {
	font-size: 1.2rem;
	cursor: pointer;
}
.nav-cart-li,
.nav-cart-li label {
	cursor: pointer;
}

div.sub-nav {
	position: fixed;
	left: 0;
	top: 60px;
	width: 100vw;
	height: 60px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	border-bottom: 2px solid #000;
	background-color: #fff;

	visibility: hidden;
}

.sub-nav ul {
	margin: 0 auto;
}

#categories-li:hover .sub-nav,
.sub-nav:hover {
	visibility: visible;
}

main {
	margin-top: 200px;
}

/* Product bar */
h1.page-title {
	font-family: "Staatliches", sans-serif;
	font-weight: 400;
	font-style: normal;
	font-size: 10rem;
	padding: 10px;
}
.products-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px;
	border-bottom: 2px solid #000;
	font-size: 1.5rem;
	font-weight: 500;
}

input.filter-toggle {
	visibility: hidden;
	position: absolute;
}
label.filter-label,
select.sort-by {
	width: 400px;
	cursor: pointer;
	padding: 10px 30px;
	border: 2px solid black;
	border-radius: 30px;
	font-size: 1.5rem;
	font-weight: 500;
}
select.sort-by {
	appearance: none; /* remove the dropdown arrow */
	-webkit-appearance: none;
	-moz-appearance: none;
	background: url("assets/collapse-icon.svg") no-repeat;
	background-position: right 10px center;
	background-size: 20px;
}
select:active,
select:focus {
	outline: none;
	border: 2px solid black;
}

label.filter-label {
	display: none;
}

/* Products List */
section.products-list {
	max-width: 100vw;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
}

/* product card */
.product-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #000;
	cursor: pointer;
}

.product-card img {
	width: 100%;
	height: auto;
	border-bottom: 1px solid #000;
}

.product-card .product-details {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 10px;
}

/* Product Modal ---------------------------------------------------------*/
.product-modal {
	position: fixed;
	top: 0;
	bottom: 0;
	right: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	/* display: flex; */
	display: none;
}
.product-modal .product-img {
	width: 50%;
	height: 100%;
	background: black;
}
.product-modal .container {
	width: 50%;
	background: white;
	padding-top: 40px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

/* top bar --------------*/
.top-bar {
	height: fit-content;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 20px;
}
.status-box {
	width: fit-content;
	height: fit-content;

	display: flex;
	align-items: center;
	border: 1px solid #898989;
	border-radius: 15px;
	padding: 5px 10px;
}
.status-box .circle {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 10px;
	border: 3px solid rgb(255, 11, 11);
}

.status-box .status-text {
	font-size: 0.8rem;
	font-weight: 500;
}

.product-modal .close-btn {
	/* position: absolute; */
	/* top: 10px;
  right: 20px; */
	cursor: pointer;
	font-size: 3rem;
}

/* Main ----------------------- */
/* path bar */
.path-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 20px;
}

.product-modal .product-name {
	font-weight: 700;
	font-size: 3rem;
	margin-top: 20px;
	margin-bottom: 40px;
	padding: 0 20px;
}

.product-modal .row,
.product-modal .row-can-collapse {
	border-top: 2px solid #000;
	padding: 20px;
	display: flex;
	align-items: center;
}
.row-label {
	font-weight: 700;
}
.row .row-label {
	width: 50%;
}

.row-can-collapse {
	flex-wrap: wrap;
}

.row-can-collapse p {
	margin-right: auto;
}

.row-can-collapse .row-content {
	width: 100%;
	margin-top: 20px;
}
.row-can-collapse .row-content.specification {
	width: 100%;
	display: flex;
}
.spec-item {
	margin-right: 40px;
}
.spec-key {
	opacity: 0.5;
	margin-bottom: 6px;
}

.row-can-collapse input {
	display: none;
}
/* hide row content */
.row-can-collapse input:checked ~ .collapse-label {
	transform: rotate(180deg);
}

.row-can-collapse input:checked ~ div.row-content {
	display: none;
}

.product-modal .bottom-bar {
	display: flex;
	height: 80px;
	border-top: 2px solid #000;
}

.product-modal .quantity-selector {
	width: 50%;
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 1px solid #000;
}
.product-modal .quantity-selector input {
	font-size: 3rem;
	width: 60px;
	border: none;
	text-align: center;
}
.product-modal .quantity-selector button {
	font-size: 3rem;
	width: 60px;
	border: none;
	background: none;
	cursor: pointer;
}
.product-modal .add-to-cart-modal-btn {
	width: 50%;
	color: white;
	background: black;
	font-size: 2rem;
	/* TODO */
}

/* filter menu */
.filter-menu {
	position: fixed;
	top: 0;
	bottom: 0;
	right: -410px;
	width: 400px;
	height: 100vh;
	background: white;
	border: 2px solid #000;
	z-index: 10;
	overflow: hidden;
	display: none;
}
.filter-menu .filter-header {
	height: 60px;
	border-bottom: 1px solid #000;
	display: flex;
	align-items: center;
	padding: 0 20px;
	background-color: #000;
}
.filter-menu .filter-options {
	height: calc(100vh - 120px);
	overflow-y: auto;
}
.filter-header h2 {
	font-size: 2rem;
	font-weight: 700;
	color: white;
}
.filter-menu .filter-section {
	display: flex;
	flex-direction: column;
	padding: 0 20px;
	margin-right: 40px;
}

/* Custom summary dropdown icon (uses assets/collapse-icon.svg) */
.filter-menu summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	padding: 12px 20px;
	border-bottom: 1px solid #000;
	list-style: none; /* fallback */
}

/* Hide native marker in WebKit and other browsers */
.filter-menu summary::-webkit-details-marker {
	display: none;
}
.filter-menu summary::marker {
	display: none;
}

/* Inject custom icon using a pseudo-element */
.filter-menu summary::after {
	content: "";
	width: 20px;
	height: 12px;
	background-image: url("assets/collapse-icon.svg");
	background-repeat: no-repeat;
	background-size: contain;
	transition: transform 0.18s ease;
	transform-origin: center;
	cursor: pointer;
}

/* Rotate icon when the details element is open */
.filter-menu details[open] > summary::after {
	transform: rotate(180deg);
}

/* Tidy up nested options */
.nested-options {
	width: 100%;
	padding: 8px 24px 16px 24px;
	margin: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
}
.nested-options li {
	width: 100%;

	padding: 6px 0;
	padding-left: 50px;
}
#wood-dropdown li,
#finish-dropdown li {
	padding-left: 0px;
}

details {
	border-bottom: 1px solid #000;
}
details[open] > summary {
	border-bottom: 1px solid #000;
}

#category-dropdown,
#wood-dropdown,
#finish-dropdown {
	font-weight: 500;
}
#category-dropdown[open] > summary,
#wood-dropdown[open] > summary,
#finish-dropdown[open] > summary {
	border-bottom: 2px solid #000;
}
details.filter-dropdown summary {
	padding-left: 45px;
}

.filter-btns {
	height: 60px;
	display: flex;
	border-top: 2px solid #000;
}

.filter-btn {
	width: 50%;
	font-size: 1.5rem;
	font-weight: 500;
	cursor: pointer;
}
.filter-btn.apply {
	background: black;
	color: white;
}
.filter-btn.clear {
	background: rgb(255, 255, 255);
	color: black;
}

/* CART */
input.cart-toggle {
	visibility: hidden;
	position: absolute;
}

/* input.cart-toggle:checked {
} */

#cart-section {
	position: fixed;
	top: 0px;
	bottom: 0;
	right: -500px;
	width: 500px;
	height: 100vh;
	background: white;
	border: 2px solid #000;
	z-index: 10;
	overflow: hidden;
	/* display: none; */
}

.cart-header {
	width: 500px;
	height: 60px;
	background-color: white;
	border-bottom: 2px solid #000;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 20px;
	z-index: 10;
}
.cart-header h1 {
	font-size: 2rem;
	font-weight: 700;
}
.cart-header div {
	font-size: 2rem;
	cursor: pointer;
}

/* cart products list */
.cart-products-list {
	height: 100%;
	max-height: calc((100vh - 120px) * 0.4);
	overflow-y: scroll;
}
.cart-product-card {
	display: flex;
	min-height: 200px;
	border-bottom: 1px solid #000;
}

.cart-product-img {
	width: 40%;
}

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

.cart-product-info {
	width: 50%;
	padding: 10px;
	display: flex;
	flex-direction: column;
}

.cart-product-info p {
	font-size: 0.8rem;
}
p.cart-product-name,
p.cart-product-price {
	font-weight: 700;
	font-size: 1.2rem;
}

/* delivery status */
.cart-product-delivery {
	margin-top: 20px;
}
.cart-product-delivery,
.cart-product-pickup {
	display: flex;
	align-items: center;
}
.available-status-circle {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 3px;
	margin-right: 5px;
}
.available-status-circle.green {
	border: 3px solid #00b646;
	color: #00b646;
}
.available-status-circle.orange {
	border: 3px solid #ff8c00;
	color: #fff;
}

.available-status-circle.red {
	border: 3px solid #ff0000;
	color: #fff;
}

.cart-product-info .flex-control {
	display: flex;
	align-items: center;
	margin-top: 10px;
}

.cart-product-price {
	margin-top: 20px;
}

.cart-product-quantity {
	display: flex;
	border: 1px solid #000;
}

.cart-product-quantity .decrease-qty-btn,
.cart-product-quantity .increase-qty-btn {
	width: 30px;
	height: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
}

.cart-product-quantity .quantity-value {
	height: 30px;
	width: 50px;
	display: flex;
	justify-content: center;
	align-items: center;
	border-right: 1px solid #000;
	border-left: 1px solid #000;
}

.controls-btns .control-btn {
	cursor: pointer;
	font-size: 0.8rem;
	margin-left: 20px;
}

/* Cart: Your Order */
.cart-footer .your-order {
	padding: 0 20px;
	height: 60px;
	display: flex;
	align-items: center;
	border-top: 2px solid #000;
	border-bottom: 1px solid #000;
}
.your-order h2 {
	font-size: 2rem;
	font-weight: 700;
}

/* Cart Footer */
.cart-footer {
	max-height: calc((100vh - 120px) * 0.6);
	overflow-y: scroll;
}
/* Cart: Promo Code */
.promo-code-section {
	padding: 20px;
	border-bottom: 1px solid #000;
}

/* .promo-code-section .header-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
} */
.promo-code-section,
.delivery-pickup-section {
	position: relative;
	min-height: 40px;
}

.promo-code-section label.checkbox-label,
.delivery-pickup-section label.checkbox-label {
	cursor: pointer;
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	padding: 10px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.promo-code-section input:checked ~ label img,
.delivery-pickup-section input:checked ~ label img {
	transform: rotate(180deg);
}

.promo-code-section input:checked ~ .collapse-content,
.delivery-pickup-section input:checked ~ .collapse-content {
	display: none;
}

.promo-code-section input ~ .collapse-content {
	margin-top: 20px;
}

/* .promo-code-section input ~ .collapse-content,
.delivery-pickup-section input ~ .collapse-content {
	margin-top: 20px;
} */

.cart-footer .collapse-input {
	visibility: hidden;
	position: absolute;
}

.promo-wrapper {
	display: flex;
	align-items: center;
	margin-top: 10px;
}
.promo-wrapper input,
.promo-wrapper button {
	height: 40px;
	border: 2px solid #000;
	padding: 5px 10px;
	cursor: pointer;
}

.promo-wrapper input {
	width: 200px;
}

.promo-wrapper button {
	background-color: #000;
	color: #fff;
}

.promo-wrapper .apply-promo-response {
	margin-left: 10px;
}

/* CART: Delivery*/
.delivery-pickup-section {
	border-bottom: 1px solid #000;
	padding: 20px;
}

.delivery-pickup-section fieldset {
	padding-top: 20px;
	border: 0;
	margin: 0;
	display: flex;
	align-items: center;
}

fieldset .delivery-option,
fieldset .pickup-option {
	display: flex;
	align-items: start;
	width: 50%;
}

fieldset .delivery-option label,
fieldset .pickup-option label {
	margin-left: 10px;
	cursor: pointer;
}

fieldset p.description {
	font-size: 0.6rem;
	color: #909090;
}

/* Code Reference: https://moderncss.dev/pure-css-custom-styled-radio-buttons/ */
input[type="radio"] {
	appearance: none;
	background-color: #fff;
	margin: 0;
	font: inherit;
	color: #000;
	width: 16px;
	height: 16px;
	border: 2px solid #000;
	border-radius: 50%;
	/* transform: translateY(-0.075em); */
	display: grid;
	place-content: center;
}

input[type="radio"]::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	transform: scale(0);
	transition: 120ms transform ease-in-out;
	box-shadow: inset 1em 1em #000;
}

input[type="radio"]:checked::before {
	transform: scale(1);
}

/* CART: Summary */
.cart-summary-section {
	padding: 20px;
	padding-bottom: 0;
}

.cart-summary-section .cart-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.cart-summary-section .divide-line {
	border-top: 1px solid #000;
	margin: 10px 0;
}

/* CART: Subtotal Price */
.cart-footer .subtotal-price {
	/* position: absolute;
	bottom: 60px; */
	height: 60px;
	width: 100%;
	padding: 0 20px;
	display: flex;
	border-top: 2px solid #000;
	justify-content: space-between;
	align-items: center;
}

.cart-footer .subtotal-price h2 {
	font-size: 2rem;
	font-weight: 700;
}
.cart-footer .subtotal-price h2 span {
	font-weight: 400;
	font-size: 1rem;
}

/* CART: Checkout */
.cart-checkout-btn {
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 60px;
	padding: 0 20px;
	background-color: black;
	color: #fff;
	font-size: 2rem;
	display: flex;
	justify-content: right;
	align-items: center;
	align-self: end;
}
.cart-checkout-btn img {
	margin-left: 10px;
	height: 25px;
}

/* Authentication */

.avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	margin-right: 10px;
}

.nav-user-profile a.button {
	display: flex;
	align-items: center;
	justify-content: center;
}

li.login-out-button {
	padding: 0;
}

div.login-cart-warning {
	padding: 20px;
	border: 2px solid #000;
	text-align: center;
	font-size: 1.2rem;
	margin: 20px;
}
div.login-cart-warning a.button {
	margin-top: 10px;
	padding: 10px 20px;
	border: 2px solid #000;
	background-color: #000;
	color: #fff;
	font-size: 1.2rem;
	display: inline-block;
}
