You've already forked wc-composable-product
202 lines
3.3 KiB
CSS
202 lines
3.3 KiB
CSS
|
|
/**
|
||
|
|
* Frontend Styles for Composable Products
|
||
|
|
*
|
||
|
|
* @package WC_Composable_Product
|
||
|
|
*/
|
||
|
|
|
||
|
|
.wc-composable-product-selector {
|
||
|
|
margin: 2rem 0;
|
||
|
|
padding: 2rem;
|
||
|
|
background: #f9f9f9;
|
||
|
|
border-radius: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-header {
|
||
|
|
margin-bottom: 2rem;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-header h3 {
|
||
|
|
margin: 0 0 0.5rem;
|
||
|
|
font-size: 1.5rem;
|
||
|
|
color: #333;
|
||
|
|
}
|
||
|
|
|
||
|
|
.selection-info {
|
||
|
|
margin: 0;
|
||
|
|
color: #666;
|
||
|
|
font-size: 0.95rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-products-grid {
|
||
|
|
display: grid;
|
||
|
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||
|
|
gap: 1.5rem;
|
||
|
|
margin-bottom: 2rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-product-item {
|
||
|
|
position: relative;
|
||
|
|
background: #fff;
|
||
|
|
border: 2px solid #e0e0e0;
|
||
|
|
border-radius: 6px;
|
||
|
|
transition: all 0.3s ease;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-product-item:hover {
|
||
|
|
border-color: #999;
|
||
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-product-item.selected {
|
||
|
|
border-color: #2c3e50;
|
||
|
|
background: #f0f8ff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-label {
|
||
|
|
display: block;
|
||
|
|
padding: 1rem;
|
||
|
|
cursor: pointer;
|
||
|
|
margin: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-product-checkbox {
|
||
|
|
position: absolute;
|
||
|
|
opacity: 0;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-image {
|
||
|
|
margin-bottom: 1rem;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-image img {
|
||
|
|
max-width: 100%;
|
||
|
|
height: auto;
|
||
|
|
border-radius: 4px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-details {
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-name {
|
||
|
|
margin: 0 0 0.5rem;
|
||
|
|
font-size: 1rem;
|
||
|
|
font-weight: 600;
|
||
|
|
color: #333;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-price {
|
||
|
|
color: #666;
|
||
|
|
font-size: 0.9rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.product-item-checkmark {
|
||
|
|
position: absolute;
|
||
|
|
top: 0.5rem;
|
||
|
|
right: 0.5rem;
|
||
|
|
width: 24px;
|
||
|
|
height: 24px;
|
||
|
|
background: #fff;
|
||
|
|
border: 2px solid #ddd;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-product-item.selected .product-item-checkmark::after {
|
||
|
|
content: '✓';
|
||
|
|
color: #2c3e50;
|
||
|
|
font-weight: bold;
|
||
|
|
font-size: 16px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-total {
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
align-items: center;
|
||
|
|
padding: 1.5rem;
|
||
|
|
background: #fff;
|
||
|
|
border-radius: 6px;
|
||
|
|
margin-bottom: 1.5rem;
|
||
|
|
font-size: 1.2rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.total-label {
|
||
|
|
font-weight: 600;
|
||
|
|
color: #333;
|
||
|
|
}
|
||
|
|
|
||
|
|
.total-price {
|
||
|
|
font-weight: 700;
|
||
|
|
color: #2c3e50;
|
||
|
|
font-size: 1.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-actions {
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-add-to-cart {
|
||
|
|
padding: 1rem 2rem;
|
||
|
|
font-size: 1.1rem;
|
||
|
|
min-width: 200px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-add-to-cart.loading {
|
||
|
|
opacity: 0.6;
|
||
|
|
cursor: wait;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-messages {
|
||
|
|
margin-top: 1rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-message {
|
||
|
|
padding: 1rem;
|
||
|
|
border-radius: 4px;
|
||
|
|
margin-bottom: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-message-error {
|
||
|
|
background: #fee;
|
||
|
|
color: #c00;
|
||
|
|
border: 1px solid #fcc;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-message-success {
|
||
|
|
background: #efe;
|
||
|
|
color: #060;
|
||
|
|
border: 1px solid #cfc;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Responsive design */
|
||
|
|
@media (max-width: 768px) {
|
||
|
|
.composable-products-grid {
|
||
|
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
||
|
|
gap: 1rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.wc-composable-product-selector {
|
||
|
|
padding: 1rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.composable-total {
|
||
|
|
font-size: 1rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.total-price {
|
||
|
|
font-size: 1.2rem;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@media (max-width: 480px) {
|
||
|
|
.composable-products-grid {
|
||
|
|
grid-template-columns: 1fr;
|
||
|
|
}
|
||
|
|
}
|